Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


SDL / OpenGL texturing


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 doyleman77   Members   -  Reputation: 366

Like
0Likes
Like

Posted 25 July 2012 - 07:49 PM

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...

Sponsor:

#2 doyleman77   Members   -  Reputation: 366

Like
0Likes
Like

Posted 27 July 2012 - 08:25 PM

bump

#3 Acharis   Crossbones+   -  Reputation: 3995

Like
0Likes
Like

Posted 27 July 2012 - 11:05 PM

Your question is confusing, what "using SDL to place in textures" means?

Europe1300.eu - Historical Realistic Medieval Sim (RELEASED!)

PocketSpaceEmpire - turn based 4X with no micromanagement FB


#4 doyleman77   Members   -  Reputation: 366

Like
0Likes
Like

Posted 28 July 2012 - 07:15 AM

sorry. reword: load up images, and then convert them to opengl textures.

#5 Acharis   Crossbones+   -  Reputation: 3995

Like
1Likes
Like

Posted 28 July 2012 - 11:33 AM

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)

Europe1300.eu - Historical Realistic Medieval Sim (RELEASED!)

PocketSpaceEmpire - turn based 4X with no micromanagement FB


#6 doyleman77   Members   -  Reputation: 366

Like
0Likes
Like

Posted 28 July 2012 - 02:58 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS