Jason Sams | d19f10d | 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_SCRIPT_C_H |
| 18 | #define ANDROID_RS_SCRIPT_C_H |
| 19 | |
| 20 | #include "rsScript.h" |
| 21 | |
| 22 | #include "RenderScriptEnv.h" |
| 23 | |
| 24 | // --------------------------------------------------------------------------- |
| 25 | namespace android { |
| 26 | namespace renderscript { |
| 27 | |
| 28 | |
| 29 | |
| 30 | class ScriptC : public Script |
| 31 | { |
| 32 | public: |
| 33 | |
| 34 | ScriptC(); |
| 35 | virtual ~ScriptC(); |
| 36 | |
| 37 | |
| 38 | virtual void run(Context *, uint32_t launchID); |
| 39 | |
| 40 | |
| 41 | rsc_RunScript mScript; |
| 42 | |
| 43 | |
| 44 | struct Env { |
| 45 | Context *mContext; |
| 46 | ScriptC *mScript; |
| 47 | }; |
| 48 | |
| 49 | }; |
| 50 | |
| 51 | class ScriptCState |
| 52 | { |
| 53 | public: |
| 54 | ScriptCState(); |
| 55 | ~ScriptCState(); |
| 56 | |
| 57 | |
| 58 | rsc_RunScript mScript; |
| 59 | float mClearColor[4]; |
| 60 | float mClearDepth; |
| 61 | uint32_t mClearStencil; |
| 62 | bool mIsRoot; |
| 63 | bool mIsOrtho; |
| 64 | |
| 65 | Vector<const Type *> mConstantBufferTypes; |
| 66 | |
| 67 | void clear(); |
| 68 | }; |
| 69 | |
| 70 | |
| 71 | } |
| 72 | } |
| 73 | #endif |
| 74 | |
| 75 | |
| 76 | |