diff options
| -rw-r--r-- | libs/rs/rsContext.cpp | 10 | ||||
| -rw-r--r-- | libs/rs/rsScript.cpp | 11 | ||||
| -rw-r--r-- | libs/rs/rsScript.h | 20 | ||||
| -rw-r--r-- | libs/rs/rsScriptC.h | 16 |
4 files changed, 27 insertions, 30 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index a16bfc7..6a47de1 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -86,11 +86,11 @@ bool Context::runRootScript() glDepthMask(GL_TRUE); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - glClearColor(mRootScript->mClearColor[0], - mRootScript->mClearColor[1], - mRootScript->mClearColor[2], - mRootScript->mClearColor[3]); - glClearDepthf(mRootScript->mClearDepth); + glClearColor(mRootScript->mEnviroment.mClearColor[0], + mRootScript->mEnviroment.mClearColor[1], + mRootScript->mEnviroment.mClearColor[2], + mRootScript->mEnviroment.mClearColor[3]); + glClearDepthf(mRootScript->mEnviroment.mClearDepth); glClear(GL_COLOR_BUFFER_BIT); glClear(GL_DEPTH_BUFFER_BIT); diff --git a/libs/rs/rsScript.cpp b/libs/rs/rsScript.cpp index 24a630c..ae85c9c 100644 --- a/libs/rs/rsScript.cpp +++ b/libs/rs/rsScript.cpp @@ -21,11 +21,12 @@ using namespace android::renderscript; Script::Script() { - mClearColor[0] = 0; - mClearColor[1] = 0; - mClearColor[2] = 0; - mClearColor[3] = 1; - mClearDepth = 1; + memset(&mEnviroment, 0, sizeof(mEnviroment)); + mEnviroment.mClearColor[0] = 0; + mEnviroment.mClearColor[1] = 0; + mEnviroment.mClearColor[2] = 0; + mEnviroment.mClearColor[3] = 1; + mEnviroment.mClearDepth = 1; } Script::~Script() diff --git a/libs/rs/rsScript.h b/libs/rs/rsScript.h index 0229860..efe52ad 100644 --- a/libs/rs/rsScript.h +++ b/libs/rs/rsScript.h @@ -33,13 +33,19 @@ public: virtual ~Script(); - bool mIsRoot; - bool mIsOrtho; - - float mClearColor[4]; - float mClearDepth; - uint32_t mClearStencil; - + struct Enviroment_t { + bool mIsRoot; + bool mIsOrtho; + float mClearColor[4]; + float mClearDepth; + uint32_t mClearStencil; + + bool mUseStateVertex; + bool mUseStateRaster; + bool mUseStateFragment; + bool mUseStateStore; + }; + Enviroment_t mEnviroment; const Type * mConstantBufferTypes; uint32_t mCounstantBufferCount; diff --git a/libs/rs/rsScriptC.h b/libs/rs/rsScriptC.h index 5b79b90..892d21e 100644 --- a/libs/rs/rsScriptC.h +++ b/libs/rs/rsScriptC.h @@ -40,24 +40,14 @@ public: const char * mScriptText; uint32_t mScriptTextLength; - bool useStateVertex; - bool useStateRaster; - bool useStateFragment; - bool useStateStore; - rsc_RunScript mScript; - }; + int mVersionMajor; + int mVersionMinor; - struct Enviroment_t { - bool mIsRoot; - bool mIsOrtho; - float mClearColor[4]; - float mClearDepth; - uint32_t mClearStencil; + rsc_RunScript mScript; }; Program_t mProgram; - Enviroment_t mEnviroment; ACCscript* mAccScript; |
