X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fgl-resources%2Fcontext.h;h=e285ae60e51846593fc8d036ae85f5cefb65bd33;hb=8295300529456e6693e04d8bc7998db85263c7c5;hp=073a2a08dc84e8a42496e812c7498175733fca06;hpb=fc069138105cb9e965b842529d57f609d7b203e8;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/gl-resources/context.h b/dali/internal/render/gl-resources/context.h index 073a2a0..e285ae6 100644 --- a/dali/internal/render/gl-resources/context.h +++ b/dali/internal/render/gl-resources/context.h @@ -21,7 +21,7 @@ // INTERNAL INCLUDES #include #include -#include +#include #include #include #include @@ -64,6 +64,8 @@ public: */ static const unsigned int MAX_ATTRIBUTE_CACHE_SIZE = 8; + static const unsigned int MAX_TEXTURE_UNITS = 8; // for GLES 2.0 its 8, which is more than DALi uses anyways + /** * Creates the Dali Context object. * This method does not create an OpenGL context i.e. that is done from outside dali-core. @@ -636,7 +638,7 @@ public: // reset the cached texture id's incase the driver re-uses them // when creating new textures - for( int i=0; i < mMaxTextureUnits; ++i ) + for( unsigned int i=0; i < MAX_TEXTURE_UNITS; ++i ) { mBound2dTextureId[ i ] = 0; } @@ -1615,7 +1617,7 @@ public: */ GLint CachedNumberOfProgramBinaryFormats() const { - return mProgramBinaryFormats.size(); + return mProgramBinaryFormats.Count(); } /** @@ -1625,7 +1627,7 @@ public: */ GLint CachedProgramBinaryFormat( const unsigned int formatIndex = 0 ) const { - DALI_ASSERT_ALWAYS( formatIndex < mProgramBinaryFormats.size() && "formatIndex out of bounds"); + DALI_ASSERT_ALWAYS( formatIndex < mProgramBinaryFormats.Count() && "formatIndex out of bounds"); return mProgramBinaryFormats[ formatIndex ]; } @@ -1797,7 +1799,7 @@ private: // Data // glBindTexture() state unsigned int mActiveTextureUnit; - std::vector mBound2dTextureId; ///< The ID passed to glBindTexture(GL_TEXTURE_2D) + GLuint mBound2dTextureId[ MAX_TEXTURE_UNITS ]; ///< The ID passed to glBindTexture(GL_TEXTURE_2D) // glBlendColor() state bool mUsingDefaultBlendColor; @@ -1813,10 +1815,9 @@ private: // Data GLenum mBlendEquationSeparateModeAlpha; ///< Controls Alpha blend mode GLint mMaxTextureSize; ///< return value from GetIntegerv(GL_MAX_TEXTURE_SIZE) - GLint mMaxTextureUnits; ///< return value from GetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS) Vector4 mClearColor; ///< clear color - std::vector mProgramBinaryFormats; ///< array of supported program binary formats + Dali::Vector mProgramBinaryFormats; ///< array of supported program binary formats // Face culling mode CullFaceMode mCullFaceMode;