diff options
Diffstat (limited to 'libs/rs/rsProgramVertex.h')
-rw-r--r-- | libs/rs/rsProgramVertex.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/libs/rs/rsProgramVertex.h b/libs/rs/rsProgramVertex.h index da5ed81..c9ce7aa 100644 --- a/libs/rs/rsProgramVertex.h +++ b/libs/rs/rsProgramVertex.h @@ -23,21 +23,19 @@ namespace android { namespace renderscript { +class ProgramVertexState; class ProgramVertex : public Program { public: - const static uint32_t MAX_CONSTANTS = 2; const static uint32_t MAX_LIGHTS = 8; ProgramVertex(Element *in, Element *out); virtual ~ProgramVertex(); - virtual void setupGL(); + virtual void setupGL(ProgramVertexState *state); - void setConstantType(uint32_t slot, const Type *); - void bindAllocation(uint32_t slot, Allocation *); void setTextureMatrixEnable(bool e) {mTextureMatrixEnable = e;} void addLight(const Light *); @@ -46,21 +44,15 @@ public: void setTextureMatrix(const rsc_Matrix *) const; protected: - bool mDirty; uint32_t mLightCount; - - ObjectBaseRef<Allocation> mConstants[MAX_CONSTANTS]; - ObjectBaseRef<const Type> mConstantTypes[MAX_CONSTANTS]; ObjectBaseRef<const Light> mLights[MAX_LIGHTS]; - // Hacks to create a program for now bool mTextureMatrixEnable; - }; -class ProgramVertexState +class ProgramVertexState { public: ProgramVertexState(); @@ -69,8 +61,9 @@ public: void init(Context *rsc, int32_t w, int32_t h); ObjectBaseRef<ProgramVertex> mDefault; + ObjectBaseRef<ProgramVertex> mLast; ObjectBaseRef<Allocation> mDefaultAlloc; - + ProgramVertex *mPV; |