Aeva / m.grl

Midnight Graphics & Recreation Library
http://mgrl.midnightsisters.org
GNU Lesser General Public License v3.0
44 stars 3 forks source link

ensure position attribute is always attribute 0 #260

Open Aeva opened 7 years ago

Aeva commented 7 years ago

If instanceable uniforms are used, it is possible for the generated attributes to appear before the explicitly defined ones. This can lead to situations where drawing happens when attribute 0 is disabled, which prints a warning that this will result in a horrible slow emulation path on some desktop opengl environments.

It isn't clear if layout qualifiers are available in ES2, and it seems like they probably aren't, so inbefore just adding support for that, the glsl->glsl compiler should be updated to ensure an ideal order.