opengl - How do you apply shader on CCRenderTexture twice? -


i managed apply blur shader on ccrendertexture. works single-pass shader (in case 1 direction).

/* ... after initializing ccglprogram ... */ rendertexture->getsprite()->setshaderprogram( shader ); rendertexture->begin(); parallaxnode->visit(); rendertexture->end(); 

in case program draw horizontally blurred image, image composite made parallax node. if apply vertical blur shader on same ccrendertexture object again, ignore previous applied shader, image end vertical blurring.

retrieving cctexture rendertexture right after begin - end block, e.g:

rendertexture->begin(); parallaxnode->visit(); rendertexture->end(); cctexture2d * texture = rendertexture->getsprite()->gettexture(); ccsprite * sprite = ccsprite::createwithtexture( texture ); 

shows sprite still image before shader applied on it.

so, how 1 approach ? when , how can retrieve texture has shader applied on ccrendertexture ?

can me ?


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -