View Full Version : OpenGL and Bitmaps

08-09-2001, 11:55 PM
I want to make an RPG using Bitmaps, 2d. I just want to know if theres a tutorial arround on how to work with Bitmaps in OpenGL.

Michael Steinberg
08-10-2001, 05:45 AM
I would use OpenGL for 2d only when there's no other possibility (like DirectDraw). If you want to read image files, check out OpenIL. Search for that on the web.

08-10-2001, 07:00 AM

you will find everthing u need to use bitmaps with opengl

08-10-2001, 12:36 PM
For some reason, it's has become a popular belief that opengl is not good for doing 2D but that is simply untrue. Why use DirectDraw when it's being dropped out of DX?
It's no longer part of DX8.


Michael Steinberg
08-10-2001, 06:58 PM
Nothing presses one to use DirectX 8. DirectDraw will still be supported since DirectX 8 is backwards compatible to DirectX 7 anyway. Yes, I believe it is bad, since it wants you to have 2^something textures etc. Using fonts is crappy in OpenGL 1.1 at least, but usable anyway. Only thing that is good is interpolation, but in 2D you will most likely have pixel aligned stuff. Remains rotation which is easier to do in OpenGL I believe.

08-12-2001, 03:16 AM
Yes you are right about 2^m textures, but that's not such a big deal. For example, you can make a 512 x 512 texture and put all your sprites inside it and bind with that texture once. Anyway, ARB will probably release an extension for this. A second point is rotation of a sprite. Imagine that a wall or something blows up and pieces go fyling off. You can use glRotate to make them spin as they go flying in the air. With DirectDraw, you have to store an animation inside a bitmap.
Its also my opinion that using something obsolete is not a good idea, even if backward compatibility exists.
I find that fonts made with wglFontBitmaps looks as excellent as GDI fonts.


Michael Steinberg
08-12-2001, 04:19 AM
Fonts with wgl stuff are slow like crap. The rotation stuff I mentioned, and multiple stuff into one texture is crappy, since you probably have to create extra borders for each element. Also, how to effectively order them?

Michael Steinberg
08-12-2001, 04:20 AM
BTW: Did you ever use DirectDraw?