Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: OpenGL and 2D graphics

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2000
    Location
    NY, NY, USA
    Posts
    2

    OpenGL and 2D graphics

    OpenGL excels in its 3D real-time rendering capabilities.

    It also offers many features which are highly desirable for 2D graphical applications, e.g. hardware-assisted double buffering, antialiasing, texturing and blending. These things simply aren't found in the 2D APIs out there (XLib, QuickDraw, GDI, etc.) and writing 2D apps which do efficient double buffering, texturing and blending is a huge problem for developers.

    Unfortunately, OpenGL's commitment to 2D graphics is half hearted. For example, it does not provide a wide range of line styles, or support self-intersecting 2D polygons, or offer a standard set of outline fonts, or offer good support for indexed-mode images. Furthermore, the same rendering calls produce different results on different platforms, which can be problematic for 2D apps. And some things just look bad - for example, translucent thick lines in OpenGL have ugly artifacts at the joints between segments.

    I've spoken to several OpenGL advocates about this. The response is always that these things are easy to work around by writing code which converts the 2D geometry (thick lines, fonts, polygons, etc) into triangles and quads, and rendering those. [Not only is this not "easy", it also limits opportunities for hardware acceleration of standard 2D operations.]

    I challenge all you OpenGL advocates out there to:

    * Provide a standard utility library for using OpenGL in 2D apps.

    * Offer ways for OpenGL vendors to provide access to hardware acceleration for 2D operations as well as 3D ops.

    * Offer better guidelines regarding rendering accuracy for 2D graphics

    * Provide clearer guidelines regarding mixed-mode rendering, whereby applications use both GDI (or Xlib or QuickDraw) and OpenGL together in a single window.

    The OpenGL 2D Utility library must at least include support for:

    * 2D thick-line styles, such as miters
    and bevels.

    * proper translucency for thick lines

    * support for concave/complex
    self-intersecting flat 2D polygons
    with even-odd and non-zero winding
    rules

    * A collection of standard outline fonts

    * Bezier curves and Bezier filled shapes

    A good test case would be to make an OpenGL implementation of the Java2D graphics API (what a great combo!)

    If the OpenGL standard was extended to better support 2D graphics, I believe that the win for OpenGL is huge. OpenGL usage would grow significantly - OpenGL would quite possible become -the- standard cross-platform graphics API for both 2D and 3D graphics.
    I hope it makes it.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Apr 2000
    Posts
    117

    Re: OpenGL and 2D graphics

    Couldn't agree more. Esp. about the Java bit.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Apr 2000
    Location
    Thunder Bay,ON,Canada
    Posts
    135

    Re: OpenGL and 2D graphics

    I SOOOOOO agree with you here! The way OpenGL handles 2D bitmaps with 3D stuff REALLY REALLY sucks!
    -------------------------
    "Bad bad programmer! No Mountain Dew for you!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •