Move placement of script enviroment data to base.
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index a16bfc7..6a47de13 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -86,11 +86,11 @@
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 @@
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 @@
virtual ~Script();
- bool mIsRoot;
- bool mIsOrtho;
+ struct Enviroment_t {
+ bool mIsRoot;
+ bool mIsOrtho;
+ float mClearColor[4];
+ float mClearDepth;
+ uint32_t mClearStencil;
- 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 @@
const char * mScriptText;
uint32_t mScriptTextLength;
- bool useStateVertex;
- bool useStateRaster;
- bool useStateFragment;
- bool useStateStore;
+
+ int mVersionMajor;
+ int mVersionMinor;
rsc_RunScript mScript;
};
- struct Enviroment_t {
- bool mIsRoot;
- bool mIsOrtho;
- float mClearColor[4];
- float mClearDepth;
- uint32_t mClearStencil;
- };
-
Program_t mProgram;
- Enviroment_t mEnviroment;
ACCscript* mAccScript;