rsProgramStore.h revision 326e0ddf89e8df2837752fbfd7a014814b32082c
1/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_RS_PROGRAM_FRAGMENT_STORE_H
18#define ANDROID_RS_PROGRAM_FRAGMENT_STORE_H
19
20#include "rsProgram.h"
21
22// ---------------------------------------------------------------------------
23namespace android {
24namespace renderscript {
25
26
27class ProgramFragmentStore : public Program
28{
29public:
30
31
32
33    ProgramFragmentStore(Element *in, Element *out);
34    virtual ~ProgramFragmentStore();
35
36    virtual void setupGL();
37
38
39    void setDepthFunc(RsDepthFunc);
40    void setDepthMask(bool);
41
42    void setBlendFunc(RsBlendSrcFunc src, RsBlendDstFunc dst);
43    void setColorMask(bool, bool, bool, bool);
44
45    void setDitherEnable(bool);
46
47protected:
48    bool mDitherEnable;
49
50    bool mBlendEnable;
51    bool mColorRWriteEnable;
52    bool mColorGWriteEnable;
53    bool mColorBWriteEnable;
54    bool mColorAWriteEnable;
55    int32_t mBlendSrc;
56    int32_t mBlendDst;
57
58
59
60    bool mDepthTestEnable;
61    bool mDepthWriteEnable;
62    int32_t mDepthFunc;
63
64
65
66    bool mStencilTestEnable;
67
68
69
70};
71
72class ProgramFragmentStoreState
73{
74public:
75    ProgramFragmentStoreState();
76    ~ProgramFragmentStoreState();
77
78    ProgramFragmentStore *mPFS;
79
80
81};
82
83
84}
85}
86#endif
87
88
89
90