diff options
| author | Jason Sams <rjsams@android.com> | 2009-08-04 16:58:20 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2009-08-04 17:05:43 -0700 |
| commit | 22534176fb5c1257130ef4ee589739ca42766a32 (patch) | |
| tree | d7efb4494b65e4769203b9a879646c7407d63cc9 /libs/rs | |
| parent | 959b7bd96b18f84510e8af72d7a439140edb5169 (diff) | |
| download | frameworks_base-22534176fb5c1257130ef4ee589739ca42766a32.zip frameworks_base-22534176fb5c1257130ef4ee589739ca42766a32.tar.gz frameworks_base-22534176fb5c1257130ef4ee589739ca42766a32.tar.bz2 | |
Split ProgramFragment and ProgramStore from RenderScript.java. Update Element and Type to new cached builder for easier app developement.
Diffstat (limited to 'libs/rs')
| -rw-r--r-- | libs/rs/java/Film/res/raw/filmstrip.c | 21 | ||||
| -rw-r--r-- | libs/rs/java/Film/src/com/android/film/FilmRS.java | 51 | ||||
| -rw-r--r-- | libs/rs/java/Fountain/src/com/android/fountain/FountainRS.java | 22 | ||||
| -rw-r--r-- | libs/rs/java/Grass/src/com/android/grass/rs/GrassRS.java | 57 | ||||
| -rw-r--r-- | libs/rs/java/Rollo/src/com/android/rollo/RolloRS.java | 56 | ||||
| -rw-r--r-- | libs/rs/rs.spec | 22 | ||||
| -rw-r--r-- | libs/rs/rsScript.cpp | 26 | ||||
| -rw-r--r-- | libs/rs/rsScriptC.cpp | 35 |
8 files changed, 146 insertions, 144 deletions
diff --git a/libs/rs/java/Film/res/raw/filmstrip.c b/libs/rs/java/Film/res/raw/filmstrip.c index ac694ab..e9c7f28 100644 --- a/libs/rs/java/Film/res/raw/filmstrip.c +++ b/libs/rs/java/Film/res/raw/filmstrip.c @@ -3,7 +3,7 @@ #pragma version(1) #pragma stateVertex(PVBackground) #pragma stateFragment(PFBackground) -#pragma stateFragmentStore(PFSBackground) +#pragma stateFragmentStore(PSBackground) /* typedef struct FilmScriptUserEnvRec { @@ -29,16 +29,15 @@ typedef struct FilmScriptUserEnvRec { int main(int index) { - int f1,f2,f3,f4, f5,f6,f7,f8, f9,f10,f11,f12, f13,f14,f15,f16; - int g1,g2,g3,g4, g5,g6,g7,g8, g9,g10,g11,g12, g13,g14,g15,g16; + float mat1[16]; float trans = loadF(1, POS_TRANSLATE); float rot = loadF(1, POS_ROTATE); - matrixLoadScale(&f16, 2.f, 2.f, 2.f); - matrixTranslate(&f16, 0.f, 0.f, trans); - matrixRotate(&f16, 90.f, 0.f, 0.f, 1.f); - matrixRotate(&f16, rot, 1.f, 0.f, 0.f); - storeMatrix(3, 0, &f16); + matrixLoadScale(mat1, 2.f, 2.f, 2.f); + matrixTranslate(mat1, 0.f, 0.f, trans); + matrixRotate(mat1, 90.f, 0.f, 0.f, 1.f); + matrixRotate(mat1, rot, 1.f, 0.f, 0.f); + storeMatrix(3, 0, mat1); //materialDiffuse(con, 0.0f, 0.0f, 0.0f, 1.0f); //materialSpecular(con, 0.5f, 0.5f, 0.5f, 0.5f); @@ -47,7 +46,7 @@ int main(int index) // Start of images. - bindProgramFragmentStore(NAMED_PFSImages); + bindProgramFragmentStore(NAMED_PSImages); bindProgramFragment(NAMED_PFImages); bindProgramVertex(NAMED_PVImages); @@ -108,8 +107,8 @@ int main(int index) } bindTexture(NAMED_PFImages, 0, loadI32(0, imgId - 1)); - matrixLoadTranslate(&f16, -pos - loadF(5, triangleOffsetsCount / 2), 0, 0); - vpLoadTextureMatrix(&f16); + matrixLoadTranslate(mat1, -pos - loadF(5, triangleOffsetsCount / 2), 0, 0); + vpLoadTextureMatrix(mat1); drawTriangleMeshRange(NAMED_mesh, loadI32(4, start), loadI32(4, end) - loadI32(4, start)); } } diff --git a/libs/rs/java/Film/src/com/android/film/FilmRS.java b/libs/rs/java/Film/src/com/android/film/FilmRS.java index a9eaead..760beb8 100644 --- a/libs/rs/java/Film/src/com/android/film/FilmRS.java +++ b/libs/rs/java/Film/src/com/android/film/FilmRS.java @@ -31,6 +31,8 @@ import android.renderscript.Allocation; import android.renderscript.Dimension; import android.renderscript.ScriptC; import android.renderscript.Script; +import android.renderscript.ProgramFragment; +import android.renderscript.ProgramStore; public class FilmRS { private final int POS_TRANSLATE = 0; @@ -73,10 +75,10 @@ public class FilmRS { private Element mElementVertex; private Element mElementIndex; private RenderScript.Sampler mSampler; - private RenderScript.ProgramFragmentStore mPFSBackground; - private RenderScript.ProgramFragmentStore mPFSImages; - private RenderScript.ProgramFragment mPFBackground; - private RenderScript.ProgramFragment mPFImages; + private ProgramStore mPSBackground; + private ProgramStore mPSImages; + private ProgramFragment mPFBackground; + private ProgramFragment mPFImages; private RenderScript.ProgramVertex mPVBackground; private RenderScript.ProgramVertex mPVImages; private ProgramVertexAlloc mPVA; @@ -99,21 +101,21 @@ public class FilmRS { private int[] mBufferState; private void initPFS() { - mRS.programFragmentStoreBegin(null, null); - mRS.programFragmentStoreDepthFunc(RenderScript.DepthFunc.LESS); - mRS.programFragmentStoreDitherEnable(true); - mRS.programFragmentStoreDepthMask(true); - mPFSBackground = mRS.programFragmentStoreCreate(); - mPFSBackground.setName("PFSBackground"); - - mRS.programFragmentStoreBegin(null, null); - mRS.programFragmentStoreDepthFunc(RenderScript.DepthFunc.EQUAL); - mRS.programFragmentStoreDitherEnable(false); - mRS.programFragmentStoreDepthMask(false); - mRS.programFragmentStoreBlendFunc(RenderScript.BlendSrcFunc.ONE, - RenderScript.BlendDstFunc.ONE); - mPFSImages = mRS.programFragmentStoreCreate(); - mPFSImages.setName("PFSImages"); + ProgramStore.Builder b = new ProgramStore.Builder(mRS, null, null); + + b.setDepthFunc(ProgramStore.DepthFunc.LESS); + b.setDitherEnable(true); + b.setDepthMask(true); + mPSBackground = b.create(); + mPSBackground.setName("PSBackground"); + + b.setDepthFunc(ProgramStore.DepthFunc.EQUAL); + b.setDitherEnable(false); + b.setDepthMask(false); + b.setBlendFunc(ProgramStore.BlendSrcFunc.ONE, + ProgramStore.BlendDstFunc.ONE); + mPSImages = b.create(); + mPSImages.setName("PSImages"); } private void initPF() { @@ -128,15 +130,14 @@ public class FilmRS { RenderScript.SamplerValue.WRAP); mSampler = mRS.samplerCreate(); + ProgramFragment.Builder b = new ProgramFragment.Builder(mRS, null, null); - mRS.programFragmentBegin(null, null); - mPFBackground = mRS.programFragmentCreate(); + mPFBackground = b.create(); mPFBackground.setName("PFBackground"); - mRS.programFragmentBegin(null, null); - mRS.programFragmentSetTexEnable(0, true); - mRS.programFragmentSetTexEnvMode(0, RenderScript.EnvMode.REPLACE); - mPFImages = mRS.programFragmentCreate(); + b.setTexEnable(true, 0); + b.setTexEnvMode(ProgramFragment.EnvMode.REPLACE, 0); + mPFImages = b.create(); mPFImages.bindSampler(mSampler, 0); mPFImages.setName("PFImages"); } diff --git a/libs/rs/java/Fountain/src/com/android/fountain/FountainRS.java b/libs/rs/java/Fountain/src/com/android/fountain/FountainRS.java index c8d02c1..4c2ab68 100644 --- a/libs/rs/java/Fountain/src/com/android/fountain/FountainRS.java +++ b/libs/rs/java/Fountain/src/com/android/fountain/FountainRS.java @@ -31,6 +31,8 @@ import android.renderscript.Element; import android.renderscript.Allocation; import android.renderscript.Script; import android.renderscript.ScriptC; +import android.renderscript.ProgramFragment; +import android.renderscript.ProgramStore; public class FountainRS { @@ -60,8 +62,8 @@ public class FountainRS { private Allocation mPartAlloc; private Allocation mVertAlloc; private Script mScript; - private RenderScript.ProgramFragmentStore mPFS; - private RenderScript.ProgramFragment mPF; + private ProgramStore mPFS; + private ProgramFragment mPF; private Bitmap mBackground; @@ -75,16 +77,16 @@ public class FountainRS { mPartAlloc.setName("PartBuffer"); mVertAlloc = Allocation.createSized(mRS, Element.USER_I32, partCount * 5 + 1); - mRS.programFragmentStoreBegin(null, null); - mRS.programFragmentStoreBlendFunc(RenderScript.BlendSrcFunc.SRC_ALPHA, RenderScript.BlendDstFunc.ONE); - mRS.programFragmentStoreDepthFunc(RenderScript.DepthFunc.ALWAYS); - mRS.programFragmentStoreDepthMask(false); - mRS.programFragmentStoreDitherEnable(false); - mPFS = mRS.programFragmentStoreCreate(); + ProgramStore.Builder bs = new ProgramStore.Builder(mRS, null, null); + bs.setBlendFunc(ProgramStore.BlendSrcFunc.SRC_ALPHA, ProgramStore.BlendDstFunc.ONE); + bs.setDepthFunc(ProgramStore.DepthFunc.ALWAYS); + bs.setDepthMask(false); + bs.setDitherEnable(false); + mPFS = bs.create(); mPFS.setName("PFSBlend"); - mRS.programFragmentBegin(null, null); - mPF = mRS.programFragmentCreate(); + ProgramFragment.Builder bf = new ProgramFragment.Builder(mRS, null, null); + mPF = bf.create(); mPF.setName("PgmFragParts"); mParams[0] = 0; diff --git a/libs/rs/java/Grass/src/com/android/grass/rs/GrassRS.java b/libs/rs/java/Grass/src/com/android/grass/rs/GrassRS.java index 55b77e5..8852b3c 100644 --- a/libs/rs/java/Grass/src/com/android/grass/rs/GrassRS.java +++ b/libs/rs/java/Grass/src/com/android/grass/rs/GrassRS.java @@ -19,11 +19,13 @@ package com.android.grass.rs; import android.content.res.Resources; import static android.renderscript.RenderScript.SamplerParam.*; import static android.renderscript.RenderScript.SamplerValue.*; -import static android.renderscript.RenderScript.EnvMode.*; -import static android.renderscript.RenderScript.DepthFunc.*; -import static android.renderscript.RenderScript.BlendSrcFunc; -import static android.renderscript.RenderScript.BlendDstFunc; +import static android.renderscript.ProgramFragment.EnvMode.*; +import static android.renderscript.ProgramStore.DepthFunc.*; +import static android.renderscript.ProgramStore.BlendSrcFunc; +import static android.renderscript.ProgramStore.BlendDstFunc; import android.renderscript.RenderScript; +import android.renderscript.ProgramFragment; +import android.renderscript.ProgramStore; import android.renderscript.Allocation; import android.renderscript.ProgramVertexAlloc; import static android.renderscript.Element.*; @@ -72,9 +74,9 @@ class GrassRS { @SuppressWarnings({"FieldCanBeLocal"}) private RenderScript.Sampler mSampler; @SuppressWarnings({"FieldCanBeLocal"}) - private RenderScript.ProgramFragment mPfBackground; + private ProgramFragment mPfBackground; @SuppressWarnings({"FieldCanBeLocal"}) - private RenderScript.ProgramFragmentStore mPfsBackground; + private ProgramStore mPfsBackground; @SuppressWarnings({"FieldCanBeLocal"}) private RenderScript.ProgramVertex mPvBackground; @SuppressWarnings({"FieldCanBeLocal"}) @@ -91,9 +93,9 @@ class GrassRS { @SuppressWarnings({"FieldCanBeLocal"}) private Allocation mBlades; @SuppressWarnings({"FieldCanBeLocal"}) - private RenderScript.ProgramFragment mPfGrass; + private ProgramFragment mPfGrass; @SuppressWarnings({"FieldCanBeLocal"}) - private RenderScript.ProgramFragmentStore mPfsGrass; + private ProgramStore mPfsGrass; public GrassRS(int width, int height) { mWidth = width; @@ -116,10 +118,10 @@ class GrassRS { ScriptC.Builder sb = new ScriptC.Builder(mRS); sb.setScript(mResources, R.raw.grass); - sb.setTimeZone(TimeZone.getDefault().getID()); sb.setRoot(true); mScript = sb.create(); mScript.setClearColor(0.0f, 0.0f, 0.0f, 1.0f); + mScript.setTimeZone(TimeZone.getDefault().getID()); loadSkyTextures(); mScript.bindAllocation(mState, RSID_STATE); @@ -210,36 +212,33 @@ class GrassRS { mRS.samplerSet(WRAP_MODE_T, CLAMP); mSampler = mRS.samplerCreate(); - mRS.programFragmentBegin(null, null); - mRS.programFragmentSetTexEnable(0, true); - mRS.programFragmentSetTexEnvMode(0, REPLACE); - mPfBackground = mRS.programFragmentCreate(); + ProgramFragment.Builder b; + b = new ProgramFragment.Builder(mRS, null, null); + b.setTexEnable(true, 0); + b.setTexEnvMode(REPLACE, 0); + mPfBackground = b.create(); mPfBackground.setName("PFBackground"); mPfBackground.bindSampler(mSampler, 0); - mRS.programFragmentBegin(null, null); - mRS.programFragmentSetTexEnable(0, true); - mRS.programFragmentSetTexEnvMode(0, MODULATE); - mPfGrass = mRS.programFragmentCreate(); + b.setTexEnvMode(MODULATE, 0); + mPfGrass = b.create(); mPfGrass.setName("PFGrass"); mPfGrass.bindSampler(mSampler, 0); } private void createProgramFragmentStore() { - mRS.programFragmentStoreBegin(null, null); - mRS.programFragmentStoreDepthFunc(ALWAYS); - mRS.programFragmentStoreBlendFunc(BlendSrcFunc.SRC_ALPHA, BlendDstFunc.ONE_MINUS_SRC_ALPHA); - mRS.programFragmentStoreDitherEnable(true); - mRS.programFragmentStoreDepthMask(false); - mPfsBackground = mRS.programFragmentStoreCreate(); + ProgramStore.Builder b; + b = new ProgramStore.Builder(mRS, null, null); + + b.setDepthFunc(ALWAYS); + b.setBlendFunc(BlendSrcFunc.SRC_ALPHA, BlendDstFunc.ONE_MINUS_SRC_ALPHA); + b.setDitherEnable(true); + b.setDepthMask(false); + mPfsBackground = b.create(); mPfsBackground.setName("PFSBackground"); - mRS.programFragmentStoreBegin(null, null); - mRS.programFragmentStoreDepthFunc(ALWAYS); - mRS.programFragmentStoreBlendFunc(BlendSrcFunc.ONE, BlendDstFunc.ONE_MINUS_SRC_ALPHA); - mRS.programFragmentStoreDitherEnable(true); - mRS.programFragmentStoreDepthMask(false); - mPfsGrass = mRS.programFragmentStoreCreate(); + b.setBlendFunc(BlendSrcFunc.ONE, BlendDstFunc.ONE_MINUS_SRC_ALPHA); + mPfsGrass = b.create(); mPfsGrass.setName("PFSGrass"); } diff --git a/libs/rs/java/Rollo/src/com/android/rollo/RolloRS.java b/libs/rs/java/Rollo/src/com/android/rollo/RolloRS.java index 578c225..9389688 100644 --- a/libs/rs/java/Rollo/src/com/android/rollo/RolloRS.java +++ b/libs/rs/java/Rollo/src/com/android/rollo/RolloRS.java @@ -24,6 +24,8 @@ import android.renderscript.Element; import android.renderscript.Allocation; import android.renderscript.Script; import android.renderscript.ScriptC; +import android.renderscript.ProgramFragment; +import android.renderscript.ProgramStore; import android.graphics.Bitmap; import android.graphics.BitmapFactory; @@ -95,10 +97,10 @@ public class RolloRS { private Script mScript; private RenderScript.Sampler mSampler; private RenderScript.Sampler mSamplerText; - private RenderScript.ProgramFragmentStore mPFSBackground; - private RenderScript.ProgramFragmentStore mPFSText; - private RenderScript.ProgramFragment mPFImages; - private RenderScript.ProgramFragment mPFText; + private ProgramStore mPSBackground; + private ProgramStore mPSText; + private ProgramFragment mPFImages; + private ProgramFragment mPFText; private RenderScript.ProgramVertex mPV; private ProgramVertexAlloc mPVAlloc; private RenderScript.ProgramVertex mPVOrtho; @@ -142,37 +144,33 @@ public class RolloRS { mSamplerText = mRS.samplerCreate(); - mRS.programFragmentBegin(null, null); - mRS.programFragmentSetTexEnable(0, true); - mRS.programFragmentSetTexEnvMode(0, RenderScript.EnvMode.MODULATE); - mPFImages = mRS.programFragmentCreate(); + ProgramFragment.Builder bf = new ProgramFragment.Builder(mRS, null, null); + bf.setTexEnable(true, 0); + bf.setTexEnvMode(ProgramFragment.EnvMode.MODULATE, 0); + mPFImages = bf.create(); mPFImages.setName("PF"); mPFImages.bindSampler(mSampler, 0); - mRS.programFragmentBegin(null, null); - mRS.programFragmentSetTexEnable(0, true); - mRS.programFragmentSetTexEnvMode(0, RenderScript.EnvMode.MODULATE); - mPFText = mRS.programFragmentCreate(); + bf.setTexEnvMode(ProgramFragment.EnvMode.MODULATE, 0); + mPFText = bf.create(); mPFText.setName("PFText"); mPFText.bindSampler(mSamplerText, 0); - mRS.programFragmentStoreBegin(null, null); - mRS.programFragmentStoreDepthFunc(RenderScript.DepthFunc.LESS); - mRS.programFragmentStoreDitherEnable(false); - mRS.programFragmentStoreDepthMask(true); - mRS.programFragmentStoreBlendFunc(RenderScript.BlendSrcFunc.SRC_ALPHA, - RenderScript.BlendDstFunc.ONE_MINUS_SRC_ALPHA); - mPFSBackground = mRS.programFragmentStoreCreate(); - mPFSBackground.setName("PFS"); - - mRS.programFragmentStoreBegin(null, null); - mRS.programFragmentStoreDepthFunc(RenderScript.DepthFunc.ALWAYS); - mRS.programFragmentStoreDitherEnable(false); - mRS.programFragmentStoreDepthMask(false); - mRS.programFragmentStoreBlendFunc(RenderScript.BlendSrcFunc.SRC_ALPHA, - RenderScript.BlendDstFunc.ONE_MINUS_SRC_ALPHA); - mPFSText = mRS.programFragmentStoreCreate(); - mPFSText.setName("PFSText"); + ProgramStore.Builder bs = new ProgramStore.Builder(mRS, null, null); + bs.setDepthFunc(ProgramStore.DepthFunc.LESS); + bs.setDitherEnable(false); + bs.setDepthMask(true); + bs.setBlendFunc(ProgramStore.BlendSrcFunc.SRC_ALPHA, + ProgramStore.BlendDstFunc.ONE_MINUS_SRC_ALPHA); + mPSBackground = bs.create(); + mPSBackground.setName("PFS"); + + bs.setDepthFunc(ProgramStore.DepthFunc.ALWAYS); + bs.setDepthMask(false); + bs.setBlendFunc(ProgramStore.BlendSrcFunc.SRC_ALPHA, + ProgramStore.BlendDstFunc.ONE_MINUS_SRC_ALPHA); + mPSText = bs.create(); + mPSText.setName("PFSText"); mPVAlloc = new ProgramVertexAlloc(mRS); mRS.programVertexBegin(null, null); diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec index d9a6456..e118ace 100644 --- a/libs/rs/rs.spec +++ b/libs/rs/rs.spec @@ -127,14 +127,14 @@ AllocationDestroy { AllocationData { param RsAllocation va param const void * data - } + } Allocation1DSubData { param RsAllocation va param uint32_t xoff param uint32_t count param const void *data - } + } Allocation2DSubData { param RsAllocation va @@ -168,14 +168,14 @@ Adapter1DSetConstraint { Adapter1DData { param RsAdapter1D adapter param const void * data - } + } Adapter1DSubData { param RsAdapter1D adapter param uint32_t xoff param uint32_t count param const void *data - } + } Adapter2DCreate { ret RsAdapter2D @@ -199,7 +199,7 @@ Adapter2DSetConstraint { Adapter2DData { param RsAdapter2D adapter param const void *data - } + } Adapter2DSubData { param RsAdapter2D adapter @@ -273,23 +273,27 @@ ScriptBindAllocation { ScriptCBegin { } -ScriptCSetClearColor { +ScriptSetClearColor { + param RsScript s param float r param float g param float b param float a } -ScriptCSetTimeZone { +ScriptSetTimeZone { + param RsScript s param const char * timeZone param uint32_t length } -ScriptCSetClearDepth { +ScriptSetClearDepth { + param RsScript s param float depth } -ScriptCSetClearStencil { +ScriptSetClearStencil { + param RsScript s param uint32_t stencil } diff --git a/libs/rs/rsScript.cpp b/libs/rs/rsScript.cpp index ae85c9c..6ce9f61 100644 --- a/libs/rs/rsScript.cpp +++ b/libs/rs/rsScript.cpp @@ -49,6 +49,32 @@ void rsi_ScriptBindAllocation(Context * rsc, RsScript vs, RsAllocation va, uint3 s->mSlots[slot].set(static_cast<Allocation *>(va)); } +void rsi_ScriptSetClearColor(Context * rsc, RsScript vs, float r, float g, float b, float a) +{ + Script *s = static_cast<Script *>(vs); + s->mEnviroment.mClearColor[0] = r; + s->mEnviroment.mClearColor[1] = g; + s->mEnviroment.mClearColor[2] = b; + s->mEnviroment.mClearColor[3] = a; +} + +void rsi_ScriptSetTimeZone(Context * rsc, RsScript vs, const char * timeZone, uint32_t length) +{ + Script *s = static_cast<Script *>(vs); + s->mEnviroment.mTimeZone = timeZone; +} + +void rsi_ScriptSetClearDepth(Context * rsc, RsScript vs, float v) +{ + Script *s = static_cast<Script *>(vs); + s->mEnviroment.mClearDepth = v; +} + +void rsi_ScriptSetClearStencil(Context * rsc, RsScript vs, uint32_t v) +{ + Script *s = static_cast<Script *>(vs); + s->mEnviroment.mClearStencil = v; +} } } diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 3b9d27a..b0b8404 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -49,7 +49,7 @@ ScriptC::~ScriptC() bool ScriptC::run(Context *rsc, uint32_t launchIndex) { - Context::ScriptTLSStruct * tls = + Context::ScriptTLSStruct * tls = (Context::ScriptTLSStruct *)pthread_getspecific(Context::gThreadTLSKey); if (mEnviroment.mFragmentStore.get()) { @@ -100,7 +100,7 @@ void ScriptCState::clear() } -static ACCvoid* symbolLookup(ACCvoid* pContext, const ACCchar* name) +static ACCvoid* symbolLookup(ACCvoid* pContext, const ACCchar* name) { const ScriptCState::SymbolTable_t *sym = ScriptCState::lookupSymbol(name); if (sym) { @@ -194,7 +194,7 @@ void ScriptCState::runCompiler(Context *rsc) mEnviroment.mFragmentStore.clear(); continue; } - ProgramFragmentStore * pfs = + ProgramFragmentStore * pfs = (ProgramFragmentStore *)rsc->lookupName(str[ct+1]); if (pfs != NULL) { mEnviroment.mFragmentStore.set(pfs); @@ -205,7 +205,7 @@ void ScriptCState::runCompiler(Context *rsc) } - + } else { // Deal with an error. } @@ -221,33 +221,6 @@ void rsi_ScriptCBegin(Context * rsc) ss->clear(); } -void rsi_ScriptCSetClearColor(Context * rsc, float r, float g, float b, float a) -{ - ScriptCState *ss = &rsc->mScriptC; - ss->mEnviroment.mClearColor[0] = r; - ss->mEnviroment.mClearColor[1] = g; - ss->mEnviroment.mClearColor[2] = b; - ss->mEnviroment.mClearColor[3] = a; -} - -void rsi_ScriptCSetTimeZone(Context * rsc, const char * timeZone, uint32_t length) -{ - ScriptCState *ss = &rsc->mScriptC; - ss->mEnviroment.mTimeZone = timeZone; -} - -void rsi_ScriptCSetClearDepth(Context * rsc, float v) -{ - ScriptCState *ss = &rsc->mScriptC; - ss->mEnviroment.mClearDepth = v; -} - -void rsi_ScriptCSetClearStencil(Context * rsc, uint32_t v) -{ - ScriptCState *ss = &rsc->mScriptC; - ss->mEnviroment.mClearStencil = v; -} - void rsi_ScriptCAddType(Context * rsc, RsType vt) { ScriptCState *ss = &rsc->mScriptC; |
