| Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 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 | // --------------------------------------------------------------------------- | 
 | 23 | namespace android { | 
 | 24 | namespace renderscript { | 
 | 25 |  | 
 | 26 |  | 
 | 27 | class ProgramFragmentStore : public Program | 
 | 28 | { | 
 | 29 | public: | 
 | 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 |  | 
 | 47 | protected: | 
 | 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 |  | 
 | 72 | class ProgramFragmentStoreState  | 
 | 73 | { | 
 | 74 | public: | 
 | 75 |     ProgramFragmentStoreState(); | 
 | 76 |     ~ProgramFragmentStoreState(); | 
 | 77 |  | 
 | 78 |     ProgramFragmentStore *mPFS; | 
| Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 79 | }; | 
 | 80 |  | 
 | 81 |  | 
 | 82 | } | 
 | 83 | } | 
 | 84 | #endif | 
 | 85 |  | 
 | 86 |  | 
 | 87 |  |