I was wondering if anyone knew how to load a bitmap from a resource file and then draw it on screen with opengl?
I've seen some examples around but they don't seem to cut it :p
[Edit]Or I can't get them to work properly :$[/Edit]
Thanks!
Printable View
I was wondering if anyone knew how to load a bitmap from a resource file and then draw it on screen with opengl?
I've seen some examples around but they don't seem to cut it :p
[Edit]Or I can't get them to work properly :$[/Edit]
Thanks!
I'd use the SDL library to work with OpenGL.
Not exactly sure how to open the bitmap form a resource file though... why would you need to use a resource file anyway?
so as to not have external files :o
What's wrong with external files?Quote:
Originally posted by da_silvy
so as to not have external files :o
That's not the point!
Forget the file loading method
How do I draw them !
they were theh examples that didn't cut it :p
thanks anyway D:
forget opengl and use directx
Or how about no?Quote:
Originally posted by abcdefg
forget opengl and use directx
I'm using opengl...
I'll try and find a tutorial.
thanks :)
Ok, I found something extremly simple here:
http://www.ncrg.aston.ac.uk/~cornfos...penglcode.html
The opengl2d*.c files show some basic 2d drawing in OpenGL. All you have to do is to set the texture to the image you want displayed.
http://graphics.tu-bs.de/people/schuberth/opengl/oglut
Of course, given that this is a 2-d game I recommend SDL instead.
www.libsdl.org