View Full Version : 2D Graphics!
08-15-2001, 07:43 PM
Hi! I'm a beginner in OpenGL, and I want to know how do I write 2D graphics?
I have tried to search some topics about this, but all that I found were documents telling about 3D graphics, like "creating squares and triangles..."
Is it possible to write 2D graphics in Open GL?? or only 3D graphics are valid?
yes. this has been done before, btw.
| | |
moral? don't draw the third dimension.
08-15-2001, 08:08 PM
Yes, but i think when we draw a rectangle in Open GL, it automaticaly Loaded a Z buffer... it should not appear, but it is loadded and taking memory....
Am I right?
08-15-2001, 10:11 PM
OpenGL uses a pipeline architecture, this means that your graphics don't use any memory (except of course for the frame buffer) and you can disable the Z-buffer.
So you can just use the 2D version of the glVertex calls (glVertex2xxx).
Rob The Bloke
08-16-2001, 05:48 PM
At last, someone who wants to program Streetfighter !! http://www.opengl.org/discussion_boards/ubb/smile.gif
Why disable the Z-buffer when you don't even have to enable it in the first place, it's disable by default. And if you don't want a Z-buffer at all, then don't ask for one when creating the context.
After all, 2D is just a special case of 3D. It's 3D where all coordinates has the same Z-value.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.