Merge pull request #15241 from newnon/v3_gl_program_imageview

GLProgram for ImageView
This commit is contained in:
zilongshanren 2016-03-17 11:39:58 +08:00
commit 535d3b3c32
2 changed files with 14 additions and 0 deletions

View File

@ -302,6 +302,18 @@ ResourceData ImageView::getRenderFile()
rData.file = _textureFile;
return rData;
}
void ImageView::setGLProgram(GLProgram* glProgram)
{
Widget::setGLProgram(glProgram);
_imageRenderer->setGLProgram(glProgram);
}
void ImageView::setGLProgramState(cocos2d::GLProgramState* glProgramState)
{
Widget::setGLProgramState(glProgramState);
_imageRenderer->setGLProgramState(glProgramState);
}
}

View File

@ -126,6 +126,8 @@ public:
ResourceData getRenderFile();
virtual void setGLProgram(GLProgram* glProgram) override;
virtual void setGLProgramState(cocos2d::GLProgramState* glProgramState) override;
CC_CONSTRUCTOR_ACCESS:
//initializes state of widget.
virtual bool init() override;