Original Post
🔒 Locked
i
Advertisement
no, none.
Sorry.
Sorry.
Unless I am misinterpreting your question, the previous answer in slightly incorrect. It''s not exactly possible to do absolute 2D in OpenGL... however it is possible to use 3D surfaces in a 2D manner. I believe there are several articles that cover using a 2D (Ortho mode, I believe it''s called) for 2D graphics and using surfaces that basically lay on top of each other and you just manipulate your surfaces images accordingly.
I know only that which I know, but I do not know what I know.
I know only that which I know, but I do not know what I know.
Try looking for some source code. Unfortunately, most books only go over 3D. If you can find some source code, or an online tutorial, you can do it easily, or you can just look at the problem and design your own approach with the programming paradigm you prefer.
Scott Simontis
e-mail:ageofscott@NOSPAM.comcast.net
AIM:ssimontis
Scott Simontis
e-mail:ageofscott@NOSPAM.comcast.net
AIM:ssimontis
I completely forgot... I haven''t had time to really start reading it, but I purchased the OpenGL game programming book that is part of Andre Lamothe''s game programming line of books (the green and black cover). I''ve noticed that there is some mention and what appears to be some examples and documentation on 2D uses of OpenGL, as well as it being oriented toward implementation in games.
I know only that which I know, but I do not know what I know.
I know only that which I know, but I do not know what I know.
quote:
Original post by Daishi
it is possible to use 3D surfaces in a 2D manner.
The only problem with this is that it''s really slow if you don''t have acceleration hardware, which could be a problem. My advice is to learn some DirectDraw for 2D. If you are going to use 3D, then use opengl. If you want to use opengl for 2d, then you should test if there is acceleration hardware. Here is some pseudocode:
Initialize(EVERYTHING);
if(acceleration_hardware)
{
Do_Whatever_In_OpenGL();
}
else
{
Do_Whatever_In_DirectDraw();
}
Does that help at all, or am I just a madman blurbing about idiotic things?
There is a reason for everything.
oberonstudios.cjb.net
not really, unless you are runnning on a Voodoo, permedia, 3Dlabs, S3s, or any 1990''s graphic accelerators, which I doubt. Anything DirectX7 and up should support OpenGL fully.
OpenGL or DirectX, it''s the same thing as long as your card supports it. If you know openGL, stick with it, DirectX can take a bit of time to start up.
all you need to do for strict 2D graphics, is to use Vertex2f(), no normals, gluOrtho2D(), and lots of GL_QUADS. You won;t need lighting either, since there are no concepts of normals.
however, you can still use 3D models, lighting, full on 3D features. All you''s need is then to use an orthographic projection to get the 2D effect.
In short, nothing really special if you already know how to do 3D stuff.
OpenGL or DirectX, it''s the same thing as long as your card supports it. If you know openGL, stick with it, DirectX can take a bit of time to start up.
all you need to do for strict 2D graphics, is to use Vertex2f(), no normals, gluOrtho2D(), and lots of GL_QUADS. You won;t need lighting either, since there are no concepts of normals.
however, you can still use 3D models, lighting, full on 3D features. All you''s need is then to use an orthographic projection to get the 2D effect.
In short, nothing really special if you already know how to do 3D stuff.
Here''s some tutorials that cover 2D in OpenGL. I''m not sure how good they are though.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement