Can I create custom framebuffer and render to it in cocos2dx?

by Ankit singh kushwah   Last Updated July 17, 2017 07:13 AM

I want to do post processing effects so I was thinking If I could just make custom framebuffer in cocos2dx like OpenGL and render the ALL SCENES objects in it. I want a single frame buffer for all scenes. Is there any way? Thanks.



Answers 2


Framebuffers will be your friend. You can create as many as you wish with glCreateFramebuffers(). Here is a documentation page, which lists all handy functions for doing that in "raw" OpenGL. Documentation

cocos2d has the RenderTexture class, which will fit also your needs. Here is a quick overview click me

Hannes Hauptmann
Hannes Hauptmann
July 18, 2017 00:07 AM

Here is some theory and practise on framebuffers:https://learnopengl.com/#!Advanced-OpenGL/Framebuffers it also explaines how to implement some very simple post-processing effects

user100681
user100681
November 19, 2017 11:47 AM

Related Questions




OpenGL ES3 framebuffer never draw the depth on texture

Updated September 07, 2017 15:13 PM