PDA

View Full Version : real newbie question ogl 3d & 2d



ogl_is_great
04-21-2002, 10:50 AM
I'm very new to graphics programming. Thank you in advance to anyone who replies.

I understand the benefits of OpenGL to be cross platform libraries that are supported by hardware graphics accelerators.

1. Is OpenGL only for 3d rendering and not 2d graphics?

2. What would be the 2d equivalent to OpenGL? Are there open source, cross-platofrm, hardware supported libraries for 2d graphics?

3. If this 2d-equivalent doesn't exist, why not?

teflon_dragon
04-21-2002, 12:11 PM
Welcome to our discussion boards, good luck to you and your OGL pursuits ...

1. OGL is for both 2d and 3d (for example, textures are 2d)
It all depends on implementation

Hope this helps!

TEFLON DRAGON

zed
04-21-2002, 02:11 PM
from the about opengl page
'OpenGL is the premier environment for developing portable, interactive 2D and 3D graphics applications. Since its introduction in 1992, OpenGL has become the industry's most widely used and supported 2D and 3D graphics application programming interface (API)'

ogl_is_great
04-21-2002, 03:29 PM
If OpenGL can be used for 2d graphics, has anyone tried using it for the foundation of a windowing system?

For instance, why or why not would it make sense to implement XWindows using OpenGL as the foundation?

Rob The Bloke
04-21-2002, 10:56 PM
Originally posted by ogl_is_great:

If OpenGL can be used for 2d graphics, has anyone tried using it for the foundation of a windowing system?

For instance, why or why not would it make sense to implement XWindows using OpenGL as the foundation?



Firtsly, Opengl is a graphics API, it allows you to draw 2D & 3D graphics to a portion of that screen. Ultimately it requires a windowing system for it to be used. Implimenting XWindows using openGL is a paradox, it requires XWindows in order to be used (or any other system, eg win32 api etc)

There are however portable UI's that are available specifically for openGL (check out glui), but usually that side of things is taken care of by the native windowing systems