2D OpenGL

Started by
2 comments, last by alchemar 19 years, 6 months ago
Any 2D OpenGL tutorials? I have a sprite game written using GDI. GDI used to be suffice for me. But I'm going to modify this game, so that the background is changing, opposed to the old one is static. I'm deciding to use OpenGL for this new version, meaning the sprite is a surface above the background surface.
Advertisement
You probably want to look at Orthographic projection (NeHe #21) for this. Alternatively, you can set it up with the camera looking directly down your scene to simlate 2d drawing. As for rendering, look at GL_QUADS and set the texture on the quad to get your 'sprite'. The benefit of this is that you can employ blending and other texture filter goodies.
Free scaling and rotation is nice, too.
I did the exact thing myself, I used

http://www.gametutorials.com/

and

http://nehe.gamedev.net/

These two sites with thier OpenGL tutorials got me going. It mostly takes time to learn the lingo. The code is fairly easy.

This topic is closed to new replies.

Advertisement