Bug 6083 - ComputeVertexAttribs computed incorrectly
Status: NEW
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Video
Version: unspecified
Hardware: All All
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2014-01-09 02:26 EST by inolen
Modified: 2014-01-09 02:26:23 EST
0 users

See Also:



Description inolen 2014-01-09 02:26:23 EST
While working on a "vid_restart fast" feature similar to Quake Live's tonight, I tracked down an issue where there seems to be a mismatch between the vertex attributes calculated for the quake shader, and the vertex attributes needed by the bound GLSL program.

In my particular case, ATTR_COLOR is conditionally added to quake shaders inside of ComputeVertexAttribs, however, it's required by both the generic and lightall GLSL programs unconditionally.

This manifests itself in tr_shade.c:~1525, where the attributes for the quake shader are used to enable / disable vertex attribute arrays and then ultimately call glVertexAttribPointer if a vertex attribute was part of the quake shader's vertex attributes. However, due to the above mismatch it's possible that the color vertex attribute array is not setup before the GLSL program is ran.