Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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: 3888

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!)


#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: 3888

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!)


#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