[SDL] OpenGL-surface + "2D-surface"
priest at seraphim.info
Wed Sep 18 08:42:02 PDT 2002
> To make it short (too late, but still) - Can I
> render an opengl-sphere with a texture on a 2D-blitted surface? ... Can i
> capture the opengl-output somewhere in the "background" and blit it onto
> the surface as 2D? .... please help!
I guess I haven't understood completely what you intend to do, but maybe
it helps if you think "the other way round".
First - I guess it's not possible to render on a surface, BUT you could
do the following: Switch over to OepnGl, meaning not drawing with SDL,
but OpenGl. Build your Main SDL_Surface as usual and than map it as a
texture on a Quad (2D Quad, no Cube, just 2 Triangles building a quad)
which fit's the entire screen. After this do the Sphere Stuff and add it
just in Front of the Quad.
To do so, I would recommend you to use an orthogonal view, because your
objects don't grow smaller in the Distance. This will be easier for the
adding of your sphere.
More information about the SDL