diff options
| author | Jason Sams <rjsams@android.com> | 2009-12-17 16:55:08 -0800 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2009-12-17 16:55:08 -0800 |
| commit | 68afd01ec9fd37774d8291192952a25e5605b6fb (patch) | |
| tree | b75c5b23b57446285d9c14a5d789722b916ea1e8 /libs/rs/rsProgramFragment.h | |
| parent | 8bb41dd61474e977aa61048ba8f733a984a3b22d (diff) | |
| download | frameworks_base-68afd01ec9fd37774d8291192952a25e5605b6fb.zip frameworks_base-68afd01ec9fd37774d8291192952a25e5605b6fb.tar.gz frameworks_base-68afd01ec9fd37774d8291192952a25e5605b6fb.tar.bz2 | |
Move texture bindings to base program object. Change ProgramFragment creation to require a texture format in 1.0 mode.
Diffstat (limited to 'libs/rs/rsProgramFragment.h')
| -rw-r--r-- | libs/rs/rsProgramFragment.h | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/libs/rs/rsProgramFragment.h b/libs/rs/rsProgramFragment.h index 14b4ec3..9fa565d 100644 --- a/libs/rs/rsProgramFragment.h +++ b/libs/rs/rsProgramFragment.h @@ -28,11 +28,7 @@ class ProgramFragmentState; class ProgramFragment : public Program { public: - const static uint32_t MAX_TEXTURE = 2; - - - - ProgramFragment(Context *, Element *in, Element *out, bool pointSpriteEnable); + ProgramFragment(Context *, const uint32_t * params, uint32_t paramLength); ProgramFragment(Context *rsc, const char * shaderText, uint32_t shaderLength, const uint32_t * params, uint32_t paramLength); @@ -41,33 +37,14 @@ public: virtual void setupGL(const Context *, ProgramFragmentState *); virtual void setupGL2(const Context *, ProgramFragmentState *, ShaderCache *sc); - - void bindTexture(uint32_t slot, Allocation *); - void bindSampler(uint32_t slot, Sampler *); - void setType(uint32_t slot, const Element *, uint32_t dim); - - void setEnvMode(uint32_t slot, RsTexEnvMode); - void setTexEnable(uint32_t slot, bool); - virtual void createShader(); virtual void loadShader(Context *rsc); virtual void init(Context *rsc); - protected: - // The difference between Textures and Constants is how they are accessed - // Texture lookups go though a sampler which in effect converts normalized - // coordinates into type specific. Multiple samples may also be taken - // and filtered. - // - // Constants are strictly accessed by programetic loads. - ObjectBaseRef<Allocation> mTextures[MAX_TEXTURE]; - ObjectBaseRef<Sampler> mSamplers[MAX_TEXTURE]; - ObjectBaseRef<const Element> mTextureFormats[MAX_TEXTURE]; - uint32_t mTextureDimensions[MAX_TEXTURE]; - - // Hacks to create a program for now + uint32_t mTextureFormats[MAX_TEXTURE]; + uint32_t mTextureDimensions[MAX_TEXTURE]; RsTexEnvMode mEnvModes[MAX_TEXTURE]; uint32_t mTextureEnableMask; bool mPointSpriteEnable; |
