mirror of https://github.com/axmolengine/axmol.git
commit
6837cea2e6
|
@ -240,11 +240,14 @@ void VertexAttribValue::setPointer(GLint size, GLenum type, GLboolean normalized
|
||||||
GLProgramState* GLProgramState::create(GLProgram *glprogram)
|
GLProgramState* GLProgramState::create(GLProgram *glprogram)
|
||||||
{
|
{
|
||||||
GLProgramState* ret = nullptr;
|
GLProgramState* ret = nullptr;
|
||||||
ret = new (std::nothrow) GLProgramState;
|
ret = new (std::nothrow) GLProgramState();
|
||||||
if(!ret || !ret->init(glprogram))
|
if(ret && ret->init(glprogram))
|
||||||
CC_SAFE_RELEASE(ret);
|
{
|
||||||
|
ret->autorelease();
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
CC_SAFE_DELETE(ret);
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLProgramState* GLProgramState::getOrCreateWithGLProgramName(const std::string &glProgramName )
|
GLProgramState* GLProgramState::getOrCreateWithGLProgramName(const std::string &glProgramName )
|
||||||
|
|
Loading…
Reference in New Issue