Matthias Hopf wrote:
On Apr 21, 06 08:11:52 -0600, Brian Paul wrote:

First, the glVertexAttrib*ARB() functions will no longer alias the generic attributes with conventional attributes. For example, glVertexAttrib3fARB(3, ...) is currently equivalent to glColor(...) but after this change, glVertexAttrib3fARB(3, ...) will set the 3rd generic vertex attribute, leaving the current color alone. Note that glVertexAttrib*NV() must alias, however, according to GL_NV_vertex_program.


I'm asking myself right now, whether it is a wise idea to let
NV_vertex_program and ARB_vertex_program behave differently on this
subject, given that they are for a large part equivalent. I could
imagine there are applications out there that use ARB functions and ARB
syntax, but NV semantics.

I actually did that in one of the ARB_v_p test programs - but that was a mistake. I was calling glVertexAttrib3fARB(3, r, g, b) but in my vertex program was using vertex.color as an input. That would fail on some implementations of OpenGL. Using vertex.attrib[3] as the input is the proper thing to do there.

So if you're using the extension correctly, you shouldn't get bit by any aliasing/non-aliasing differences.


Of course, this is broken, but behavior should be the same if changing it
doesn't help improving code quality or speed (in that case: nuke it).


Aliasing is optional in the GL_ARB_vertex_program extension, but in OpenGL 2.0, aliasing is not optional so this is a direction we need to move in.


One more point.

I'd say the OpenGL 2.0 need is the strongest point.


The only side-effect is that calling glVertexAttrib*NV([6/7], ...) would set the current color index or current edge flag, and glIndex*(), glEdgeFlag() would set the 6th and 7th NV vertex attributes.


... which is not according to specs.

Right.  But I've seen other OpenGL libs bend the rules in worse ways.


I don't think this is a big deal since: 1) vertex programs aren't used in color-index mode, 2) probaby few/no apps use both GL_NV_vertex_program and edge flags, 3) GL_NV_vertex_program will probably be removed from Mesa in the future.


I could imagine that vertex programs and edge flags are used. In fact,
I've seen cell shading examples that used edge flags.
I think it would be better to use a high attribute number for that.
It could be one past the allowed maximum attribute number.

Actually, we could use the slot for generic attribute 0 since it's never really used. That's because when you call glVertexAttrib*ARB(0, ...) it has to act just like glVertex(...) so the generic attribute 0 really doesn't get used like other attributes.

-Brian


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to