From 980d5fec6835d71a609f7949dec0b2487a0a130e Mon Sep 17 00:00:00 2001 From: Sergey Date: Fri, 29 Jan 2016 11:55:28 +0300 Subject: [PATCH] GLProgram for ImageView --- cocos/ui/UIImageView.cpp | 12 ++++++++++++ cocos/ui/UIImageView.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/cocos/ui/UIImageView.cpp b/cocos/ui/UIImageView.cpp index d9af32b8a9..8bcbf124a0 100644 --- a/cocos/ui/UIImageView.cpp +++ b/cocos/ui/UIImageView.cpp @@ -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); +} } diff --git a/cocos/ui/UIImageView.h b/cocos/ui/UIImageView.h index 0b8a4a3571..6c05dd7287 100644 --- a/cocos/ui/UIImageView.h +++ b/cocos/ui/UIImageView.h @@ -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;