Vector Sprites: "Sprite2D & Sprite3D"

OpenGL still lacks capabilities to be used as a serious tool for high quality text rendering. This can be easily improved.

My suggestions:

  1. Extend the “PointSprites” API for “Vector-texturing”
    Rename it “Sprite1D”, “Sprite2D” and “Sprite3D”.

  2. Introduce commands to

  • draw lines and curves ( = 2D and 3D “Shapes” or “Sprites” ) with different pen sizes and line styles
  • Make anti-aliasing sub-pixel-precision.
  • Allow bitmap texture on top of the new sprites !

This is all basically realized in AGG (Anti-Grain-geometry), you just need to take this code and put it in hardware and reimburse the author for his code :slight_smile:

These easy steps will make OpenGL THE STANDARD for computer graphics on all platforms. Now, OpenGL can barely be used by authors of “serious software” because it is lacking font and line display quality.

OpenGL has many great features, this is why I am suggesting this extension to extend the capabilities for serious applications to use OpenGL.

Basic thought: There must be routines to produce HIGH QUALITY anti-aliased Lines and Curves ( = Shapes ! ) for any modern graphic application.

That’s what OpenVG is for, but there are a lot of solutions for OpenGL as well, using third party libraries and there is even a new NVIDIA extension NV_path_rendering that accomplishes the same goals.

I wouldn’t say that OpenGL is unable to render fonts. There are a huge amount of CAD softwares and games (mostly for embedded devices) that managed to solve this. Rendering fonts is more high level than what OpenGL deals with, thus it should be a layered library on top of it, not a core feature of OpenGL itself.

This is more of a design question. Your request should be rather target the creation of a “good” font library that uses OpenGL for rendering.

Fonts are very OS-dependent and so really wouldn’t have a place in OpenGL. No reason why a vendor couldn’t provide an appropriate extension with their OS-specific drivers though, if they were sufficently motivated to do so.

Vector graphics in general are a nice idea, but there would need to be hardware support for them in the first place, and in the absence of that a driver-implemented software layer probably wouldn’t look a million miles away from something you’d put together yourself using an existing vector graphics library.

Implementing this hardware support may or may not be non-trivial. GPUs have evolved to specialize very heavily in raster graphics, and this may or may not be too much of a breaking change. (On the other hand something like an OpenCL implementation of vector graphics with some appropriate wrappers may be very do-able.)

OpenGL still lacks capabilities to be used as a serious tool for high quality text rendering.

You’re absolutely right. So… why should it?

OpenGL does not exist to solve every problem you have ever had. OpenGL is not a big wish-list that you should ask anything related to drawing of any kind from.

OpenGL has no business having glyph rendering functionality. It is not a part of the core concept of what it is for. It is something you could do quite easily yourself. And indeed, it’s not even hard. Just use FreeType, and you’ve got a quality glyph rasterizer. There’s no need to put that into OpenGL.

These easy steps will make OpenGL THE STANDARD for computer graphics on all platforms. Now, OpenGL can barely be used by authors of “serious software” because it is lacking font and line display quality.

You honestly believe that the lack of 2D vector drawing software is what stops “serious software” makers from using OpenGL? Even though there are entire OS’s that use OpenGL as their core rendering system?

Then again, the fact that you cite AGG as the de-facto standard for vector drawing (as opposed to, say, Cario, or any other vector graphics library) suggests that you perhaps don’t have very much experience outside of your own personal field and work. Tunnel vision should not be the basis of any OpenGL feature.

You’re absolutely right. So… why should it?

OpenGL does not exist to solve every problem you have ever had. OpenGL is not a big wish-list that you should ask anything related to drawing of any kind from.

OpenGL has no business having glyph rendering functionality. It is not a part of the core concept of what it is for. It is something you could do quite easily yourself. And indeed, it’s not even hard. Just use FreeType, and you’ve got a quality glyph rasterizer. There’s no need to put that into OpenGL.

Fonts are very OS-dependent and so really wouldn’t have a place in OpenGL. No reason why a vendor couldn’t provide an appropriate extension with their OS-specific drivers though, if they were sufficently motivated to do so.

Um… that NVIDIA extension GL_NV_path_rendering does provide an interface to draw fonts… fonts can be sourced from the system or a file… for sourcing a font from a system, the actual mechanism depends, for Linux it is essentially use font config to give you a file name for the font you will use… on the issues of actual font rendering, things are can be very hairy. Indeed, TrueType fonts include a hinting mechanism for adjust a glyph for when that glyph is rendered at not so high a resolution… that hinting mechanism is highly non-trivial (it is quite involved)… though in truth, most folks just hope that the pixel density is high enough so that hinting is not needed… that is becoming more true each day… even in mobile.