X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fgl-resources%2Fcontext.h;h=664c3a421211a75726f3ef6ed27352de158b5a54;hb=refs%2Fchanges%2F43%2F160543%2F2;hp=59ed39659b0fe479a0056405f9c16d75547ac3bc;hpb=15667b2f6a89cc0acd92b2bce111b69fb62e8711;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 59ed396..664c3a4 100644 --- a/dali/internal/render/gl-resources/context.h +++ b/dali/internal/render/gl-resources/context.h @@ -262,26 +262,12 @@ public: * @param textureunit to bind to * @param texture to bind */ - void BindTextureForUnit( TextureUnit textureunit, GLuint texture ) + void BindTextureForUnit( TextureUnit textureunit, int target, GLuint texture ) { - if( mBound2dTextureId[ textureunit ] != texture ) + if( mBoundTextureId[ textureunit ] != texture ) { ActiveTexture( textureunit ); - Bind2dTexture( texture ); - } - } - - /** - * Wrapper for OpenGL ES 2.0 glBindTexture(GL_TEXTURE_2D) - */ - void Bind2dTexture( GLuint texture ) - { - if (mBound2dTextureId[ mActiveTextureUnit ] != texture) - { - mBound2dTextureId[ mActiveTextureUnit ] = texture; - - LOG_GL("BindTexture GL_TEXTURE_2D %d\n", texture); - CHECK_GL( mGlAbstraction, mGlAbstraction.BindTexture(GL_TEXTURE_2D, texture) ); + BindTexture( target, texture ); } } @@ -290,9 +276,9 @@ public: */ void BindTexture( int target, GLuint texture ) { - if (mBound2dTextureId[ mActiveTextureUnit ] != texture) + if (mBoundTextureId[ mActiveTextureUnit ] != texture) { - mBound2dTextureId[ mActiveTextureUnit ] = texture; + mBoundTextureId[ mActiveTextureUnit ] = texture; LOG_GL("BindTexture target(%d) %d\n", target, texture); CHECK_GL( mGlAbstraction, mGlAbstraction.BindTexture(target, texture) ); @@ -300,15 +286,6 @@ public: } /** - * Wrapper for OpenGL ES 2.0 glBindTexture(GL_TEXTURE_CUBE_MAP) - */ - void BindCubeMapTexture( GLuint texture ) - { - LOG_GL("BindTexture GL_TEXTURE_CUBE_MAP %d\n", texture); - CHECK_GL( mGlAbstraction, mGlAbstraction.BindTexture(GL_TEXTURE_CUBE_MAP, texture) ); - } - - /** * Wrapper for OpenGL ES 2.0 glBlendColor() */ void SetDefaultBlendColor() @@ -669,7 +646,7 @@ public: // when creating new textures for( unsigned int i=0; i < MAX_TEXTURE_UNITS; ++i ) { - mBound2dTextureId[ i ] = 0; + mBoundTextureId[ i ] = 0; } } @@ -1734,7 +1711,7 @@ private: // Data // glBindTexture() state TextureUnit mActiveTextureUnit; - GLuint mBound2dTextureId[ MAX_TEXTURE_UNITS ]; ///< The ID passed to glBindTexture(GL_TEXTURE_2D) + GLuint mBoundTextureId[ MAX_TEXTURE_UNITS ]; ///< The ID passed to glBindTexture() // glBlendColor() state Vector4 mBlendColor; ///< Blend color