>>How can I draw the quad to a SDL_Surface or a GLuint(texture), so I can combine them later?
I don't know exactly how to do that, but I know it is not the best/easiest way to do it (in fact, it is probably the worst way). What you want to do is render-to-texture. This can be done in OpenGL. Don't use SDL surfaces to do that, OpenGL is far more powerful, faster and more flexible. I'm not so up-to-date on OpenGL coding so I can't really give you specific functions to use and all, but I would suggest you look up the topic of "Render to Texture in OpenGL". As it says, you can basically render an entire 3D scene onto a texture (internally stored on the graphics card) and then apply it to another object in the scene that actually gets drawn on the screen. They can do some pretty cool effects with this nowadays (especially with shaders). But the last time I implemented this type of effects (almost 10 years ago), the graphics cards didn't have the render-to-texture feature (let alone shaders) and the code I managed to hack-up to achieve this was pretty ugly and slow (almost as bad as your idea of copying the SDL_surface onto a texture, but in those days there wasn't too many possibilities), so I can't recommend anything more contemporary.
mike_2000_17
Posting Virtuoso
2,136 posts since Jul 2010
Reputation Points: 1,634
Solved Threads: 457