View Full Version : [3.0] Wide lines deprecated

08-29-2008, 04:01 AM
I'd like to know, why wide lines supoort has been deprecated.

See this post:

I can't speak for other vendors. All NVIDIA hardware since NV10 has included support for these features and the latest hardware is no different in that respect. I can't say if/when this may change.

If/when these features are actually removed from the core API, some vendors may choose to continue support via "core extensions" wherein the API for these features remains unchanged but you'll need to check for the extension before using it. Since you must opt-in to a version which removes the functionality, that gives you the opportunity to add code which checks for the extension. And of course, existing binaries will continue to function as long as 2.1 is supported.

The idea of an extension with undecorated names is likewise being applied to several new ARB extensions, so that an application can target either 2.1 or 3.0 with shared source code. For example, ARB_vertex_array_object introduces "glBindVertexArray" rather than "glBindVertexArrayARB", since the behavior exactly matches the 3.0 functionality.
link (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=243569#Post243569)

So wide lines will stay on nVidia as a core extension. But this also means, we can't rely on them to be supported by ATI and others. In fact this seem to be the reason why they are deprecated now.

In my opinion, wide lines are a very important feature. Almost all CAD apps make use of them. What are the alternatives?


08-29-2008, 04:37 AM
I'm doing some wide lines with a fairly simple GS and IMO they beat the canned alternatives out of the box 9 ways to Sunday.

Can't speak to the situation with professional grade cards, but dollars/deutsche marks for doughnuts my lines are just as phat ;-)

08-29-2008, 05:19 AM
Oh, Deutsche Mark is deprecated also. :)

Do your wide lines handle AA correctly? And what does "fairly simple" mean?

Wait, I remember something... you mean these (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=241523#Post241523)?


Seth Hoffert
08-29-2008, 06:39 AM
How efficient is the GS method as compared to NVIDIA's line smoothing (with FSAA disabled)?

08-29-2008, 06:51 AM
Why don't you guys get off your duffs and give it a go yourselves?

08-29-2008, 06:53 AM
Lacking DX10 hardware. :(


Seth Hoffert
08-29-2008, 06:58 AM
Because then I'd have to implement the method. But since you've already implemented it, it'd be simpler for you to test. ;)

But really, this does kind of suck. Having to use the GS for this means it'll be hard to mix the GS line smoothing with the GS emitting lines of its own; one would probably have to emit actual lines in a separate pass and store the results using transform feedback.

08-29-2008, 07:09 AM
Actually I haven't done any perf comparisons, just after maximum quality at this point. Not exactly a solution with overwhelmingly broad appeal at this point, just looking down the road a bit. By golly it does look good though... really ought to try it if you can. If I can put some code together that's not too unpleasant to look at I'll post it later (it's a real stink bomb right now).

08-29-2008, 09:56 AM
Linky (http://snpow.wordpress.com/2008/08/29/phat-gpu-lines/)

Don't know if it's OK to post a quake map publicly without permission. If not quickly I'll tear it down.

Plenty of room for optimization and various doodads...

08-29-2008, 09:57 AM
do you feel empowered as a developer?
having to implement your own line drawing code again after all these years, I mean.

08-29-2008, 10:15 AM
Thanks modus, that looks really good! I'll enjoy playing around with it as soon as I've upgraded my hardware.

But now the question to the ARB is: is this what you had in mind?! I mean, drawing a line is something like "Hello world" for newbies. Do you really need to write your own geometry shader to do this?


Seth Hoffert
08-29-2008, 12:24 PM
Thanks, modus! I will check this out.

08-29-2008, 01:25 PM
Much of the "Graphics Library" part of OpenGL is deprecated in 3.0.
Everybody gets to implement their own lines and matrix stacks now.

08-29-2008, 10:29 PM
And points too... for the discerning minimalist in all of us.

08-30-2008, 02:18 AM
For points, the point sprite extension is now core. Chapter E1: Point rasterization is always performed as though POINT SPRITE were enabled.

That's a good solution. But if I got it right, there is no such thing for wide lines. You have to construct them by yourself. Chapter E1: LineWidth is not deprecated, but values greater than 1.0 will generate an INVALID VALUE error;

This looks a little bit half-baked.


08-30-2008, 06:45 AM
I always hated point-sprites, IMO they are useless, because of their various limitations. It should have simply been something that constructs billboards on the GPU, but instead it has this weird behaviour, that is mostly useless.

Yeah, keeping glLineWidth but forbidding values > 1 is a strange solution. It only shows once more, what we are supposed to expect from the ARB.


08-30-2008, 08:20 PM
(I'm with you on the point-sprites, Jan.)

Half-baked is the perfect way to describe this situation... skinny lines and fat points... the Laurel and Hardy of graphics primitive assemblages...

... However, since GL3 requires GL3 (formerly DX10) hardware, it does seem natural to abandon hardwired functionality like this in favor of more flexible and generic methods going forward (as has been the trend). No doubt we'll see a (community driven) utility library emerge alongside GL, besides, something fairly standard I would hope... or if nothing else maybe some template-like, drop-in snippets in the interim, to bridge some of the FFP gaps introduced with new shader stages and outgoing functionality.

08-30-2008, 08:54 PM
Point sprites are not sufficient to implement AA points (if you consider the subpixel alignment case.)

So everybody gets to roll their own points, too.

08-30-2008, 10:05 PM
I'll go out on a limb and wager that the point-sprite business will be deprecated in the next version, leaving us with basic line and point rendering (size=1), roll your own for everything else. That'd be at least a bootstrap out of the box to get things going...

08-31-2008, 03:08 AM
You're right. Dropping point sprites (which I found useful despite their limitations) would be much more consistent.

I wonder whether the ARB has thought of something standardized to fill those gaps.


08-31-2008, 07:54 AM
I'll go out on a limb and wager that the point-sprite business will be deprecated in the next version, leaving us with basic line and point rendering (size=1)
According to the spec, basic point rendering is deprecated and point rasterization is performed as though point sprites were enabled. Removing even point sprites would leave us with nothing but geometry shaders. Point sprites, though not perfect, are pretty fast on current and older hardware, so they are still useful IMO.

09-01-2008, 12:54 AM
Point sprites, though not perfect, are pretty fast on current and older hardware, so they are still useful IMO.

Good point. Besides, one can safely ignore them, with no long term side effects.

03-10-2009, 06:58 PM
For the record. Wide lines deprecation will be deprecated in 3.1 spec. Meaning they are not deprecated anymore. So they will stay.

Post by Rob Barris (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=254245#Post254245)

That's good news in my opinion.