Mixing SDL surfaces and OpenGL

I am a novice SDL user and I am very happy to say that it’s easy to use
and pretty fun as well. I recently started using the OpenGL video mode
and have enjoyed the experience.

Since I am so new to SDL, can any one explain, or point to an
explanation, of how SDL surfaces and OpenGL context(s?) interact? More
to the point, once you set the video flag for SDL_OPENGL, can you still
blit surfaces using the SDL calls? Or this not doable?

Ok, ok, I know I could just try it and find out… but has any tried it
or is this just not going to work?

Thanks in advance,

James Jeffers
@James_Jeffers

I am a novice SDL user and I am very happy to say that it’s easy to use
and pretty fun as well. I recently started using the OpenGL video mode
and have enjoyed the experience.

Since I am so new to SDL, can any one explain, or point to an
explanation, of how SDL surfaces and OpenGL context(s?) interact? More
to the point, once you set the video flag for SDL_OPENGL, can you still
blit surfaces using the SDL calls? Or this not doable?

This isn’t doable.
The right way to do this is to upload an SDL surface to a texture and
then manipulate the texture with GL calls.

I have an open invitation to the SDL list to write a tutorial showing
how this is done. :slight_smile:

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

An exhaustive tutorial or howto would be great. In addition to more
complete commenting in the demo’s source code. I’m too new to SDL to
jump in just yet - but when I’m feeling more confident, I’d love to
help…> I have an open invitation to the SDL list to write a tutorial showing

how this is done. :slight_smile:

See ya!


Cheers,
Mike

http://dotfile.net/
mailto:info at dotfile.net
<------------------------------------------------->
“My zeal to start using Linux is stronger than my
fear of looking like a dummy.” --Some Wise Man
<------------------------------------------------->
Why does Sea World have a seafood restaurant? I’m
halfway through my fishburger and I realize, Oh my
God…I could be eating a slow learner.