View Full Version : I was making a 2d game.. porting to OpenGL?
I was making a 2d RPG (i don't want it to be 3d) The library I was using is really lacking in display modes and font support. Can anyone point me in the direction of tutorials on 2d in OpenGL? Or should I look at a different API? I hear DirectDraw is gone from DirectX and will be completely removed by the next release. (with XP)
if you want to use opengl for 2d drawings, look how to init an opengl rendering context, and some orthoview containing the x-y-plane, and then call the commands like this, both do the same think(3D get 2d if you set one axis to 0 for each point/vertex on it):
glVertex2f(x,y); or glVertex3f(x,y, 0);
this commands for example would insert an Vertex( not working without glBegin(); and glEnd(); )
and so on ...
07-18-2001, 05:46 AM
Just wanted to comment on you thinking that DirectDraw will be completely removed from the next release of DirectX. This is most likely false information. DirectX adds new interfaces, but it does not remove any of the old interfaces. (i.e. DirectX 7 interfaces are still available in Dx8 as well as Dx5 interfaces, Dx3 interfaces, etc.)
Removing DirectDraw completely would be a huge mistake for a couple of reasons. First, the COM specifications say that new interfaces can be added, but old interfaces should remain, and remain unchanged. Second, there are a ton of games out there that use DirectDraw and removing those interfaces would directly affect all of them. I don't think MS would want to do that.
MS may have not included any new DirectDraw interfaces in Dx8, but I think you can be fairly confident that the DirectDraw interfaces for Dx7 will remain.
So far as using 2d in OpenGL, it is a fairly simple matter. You can simply setup an orthographic projection the same size as your window and use textured quads to display things.
thanks for your help, and thanks for clearing up the info on DirectDraw.. I still think I'd rather use OpenGL. Could you point me in the direction of some reading on OpenGL in 2d (nehe's (has great tutorials) only does a bit of 2d.. and by the time he gets to texturing everything is 3d and more advanced than i'm ready to get just yet)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.