real newbie question ogl 3d & 2d

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?

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

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)’

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?

Originally posted by ogl_is_great:
[b]
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?

[/b]

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