I need to draw inside a buffer and then upload it as texture to OpenGL. So basicaly unsigned char* buffer and then call to glTexImage2D().
I will be using Marmalade mobile SDK and OpenGL ES 1.0.
|
I need to draw inside a buffer and then upload it as texture to OpenGL. So basicaly unsigned char* buffer and then call to glTexImage2D(). I will be using Marmalade mobile SDK and OpenGL ES 1.0. |
|||
|
|
|
You're looking for a frame buffer object (FBO). If you're buffer generating doesn't need anything too complex, you can just do as you said.. |
|||||||||
|
|
In addition to DevilWithin's answer using FBOs, you can also use |
|||
|
|
|
This function can create 4 different OpenGL textures (red, green, blue, or chessboard) programmatically, of size
|
|||
|
|
|
Marmalade has exactly that example
It implements CFBO class that is used to render in buffer then it uses FBO's texture for further rendering. Also it checks if FBO extension is available if there is not FBO extension then you get red square texture 1x1 pixel size. |
|||
|
|