Hi!
So i’ve started learning something about openGL…But already i got an error:
That says: OpenGL error 0x0506 in /Users/Admin/Downloads/cocos2d-x-2.2.6old/cocos2dx/sprite_nodes/CCSprite.cpp draw 584
My code is: [code]CCSprite* HelloWorld::spriteWithColor(ccColor4F bgColor, float textureWidth, float textureHeight)
{
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
CCRenderTexture *rt = CCRenderTexture::create(textureWidth, textureHeight);
rt->beginWithClear(bgColor.r, bgColor.g, bgColor.b, bgColor.a);
rt->end();
CCSprite *texture = CCSprite::createWithTexture(rt->getSprite()->getTexture());
CCSprite *noise = CCSprite::create("Noise.png");
noise->setBlendFunc((ccBlendFunc){GL_DST_COLOR, GL_ZERO});
noise->setPosition(ccp(winSize.width/2, winSize.height/2));
noise->visit();
return texture;
}
[/code]
I know it’s something about the noise sprite because it happens when i run the code with the functions applied to the noise sprite…?
AND the noise isn’t even showing up? Look: The noise picture:
And the screen on the simulator when i run it:
Please help, Thanks!!!<333
Anyone??:(( I mean there must be someone who knows this…

