Change function parameter
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 12 Nov 2013 07:51:53 +0000 (16:51 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 12 Nov 2013 07:51:53 +0000 (16:51 +0900)
Change-Id: Id41f1a930a38b7da0c1ac5e04cf9629c4e4aa9a5

src/ui/animations/FUiAnim_GlContext.h
src/ui/animations/FUiAnim_GlRenderManager.cpp
src/ui/animations/platform/FUiAnim_GlContext.cpp

index 80887d6..5dd057a 100644 (file)
@@ -73,7 +73,7 @@ public:
        unsigned int  BuildShaderProgram(unsigned int vertexShader, unsigned int fragmentShader);
        bool DeleteShaderProgram(unsigned int programId);
 
-       void UseShaderProgram(ShaderProgram* pShaderProgram);           // TODO: _ShaderProgramImpl?
+       void UseShaderProgram(_ShaderProgramImpl* pShaderProgram);
 
        void GetShaderProgramInfo(_ShaderProgramImpl* pShaderProgram);
 
@@ -112,7 +112,7 @@ protected:
 
        unsigned int __textureId;
 
-       ShaderProgram* __pCurrentShader;
+       _ShaderProgramImpl* __pCurrentShader;
 
        ShaderProgram* __pColorShader;
        ShaderProgram* __pUniformColorShader;
index 2d347a6..7c0174b 100644 (file)
@@ -727,7 +727,7 @@ _GlRenderManager::FlushRenderQueue(void)
        {
                _ShaderProgramImpl* pProgramImpl = _ShaderProgramImpl::GetInstance(*__pRenderQueue[i].__pProgram);
 
-               __pGlContext->UseShaderProgram(__pRenderQueue[i].__pProgram);
+               __pGlContext->UseShaderProgram(pProgramImpl);
 
                // Set attribute
                glVertexAttribPointer(__pRenderQueue[i].__aPosition, 3, GL_FLOAT, GL_FALSE, VERTEX_BUFFER_STRIDE * sizeof(float), __pRenderQueue[i].__pVertices);
index 166f2dc..680f44e 100644 (file)
@@ -493,7 +493,7 @@ _GlContext::DeleteTexture(TextureInfo *pTextureInfo)
 }
 
 void
-_GlContext::UseShaderProgram(ShaderProgram* pShaderProgram)
+_GlContext::UseShaderProgram(_ShaderProgramImpl* pShaderProgram)
 {
        if (__pCurrentShader == pShaderProgram)
        {
@@ -502,7 +502,7 @@ _GlContext::UseShaderProgram(ShaderProgram* pShaderProgram)
 
        if (__pCurrentShader)
        {
-               DisableVertexAttribArray(_ShaderProgramImpl::GetInstance(*__pCurrentShader));
+               DisableVertexAttribArray(__pCurrentShader);
                __pCurrentShader = null;
        }
 
@@ -511,11 +511,9 @@ _GlContext::UseShaderProgram(ShaderProgram* pShaderProgram)
        {
                __pCurrentShader = pShaderProgram;
 
-               _ShaderProgramImpl* pShaderProgramImpl = _ShaderProgramImpl::GetInstance(*__pCurrentShader);
+               EnableVertexAttribArray(pShaderProgram);
 
-               EnableVertexAttribArray(pShaderProgramImpl);
-
-               glUseProgram(pShaderProgramImpl->__program);
+               glUseProgram(pShaderProgram->__program);
        }
        else
        {