PDA

View Full Version : [SOLVED] SDL with OpenGL - Images (textures)?



Zeotronic
July 16th, 2008, 12:15 AM
C++/SDL/OpenGL: A long while ago when I was first getting into programming, I 'learned' OpenGL. Since then I have forgotten OpenGL, but I am trying to learn it again, only this time to use along side SDL. Presently I am trying to figure out how images (or perhaps more properly referred to as textures) work in OpenGL... everything points to GLuint storing images, but I cannot for the life of me figure out how that works... its practically an unsigned integer isn't it? But, more importantly, I'm trying to figure out if I can just load images up with SDL, into it's image structure, and then use that with OpenGL... either directly, or perhaps by converting it into, I guess, GLuint? (partially because I want to support SDL rendering, but also because memory suggests I had a bad experience with OpenGL image loading... in relation to PNGs I think) (I'm making a 2D game at the moment... my interest in OpenGL is video acceleration)

slavik
July 16th, 2008, 04:03 AM
one of my posts gives a link to one of my projects that do what you need. search for ai escape