Skip to main content
GameDev.net gamedev.net
🔒 Locked

SDL / OpenGL texturing

Started by doyleman77 Jul 26, 2012 at 1:49 AM 4 replies 1.9k views
Original Post
doyleman77
doyleman77
I am trying to move from standard software SDL to OpenGL 2D using SDL to place in textures; but unfortunately I havent come across any detailed example using SDL to place say, 2 or more textures. Sure, I can follow maybe NeHe or the Lazyfoo article to a bit, but those are for one texture. Are there any OOP designs / tricks / techniques to loading up a SDL_Surface and planting it on a 2D Quad to display right away?
I appreciate any help...
Acharis
Acharis
Your question is confusing, what "using SDL to place in textures" means?
doyleman77
doyleman77
sorry. reword: load up images, and then convert them to opengl textures.
Acharis
Acharis
http://content.gpwiki.org/index.php/SDL:Tutorials:Using_SDL_with_OpenGL (also, don't forget to flip the image data, BMPs have weird byte order)
doyleman77
doyleman77
Thanks. I want to be using SDL_Image for .PNGs; though I imagine it works much like the example provided there. Though, I am still confused on encapsulating all of this into an object. the whole GL_Begin and GL_End just.... confuses me.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.