Files
android_development/tools/emulator/opengl/host
Yochai Shefi Simchon 97fa8de7a2 opengles emulator: Support current value for attribute 0
In GLES, a vertex shader attribute can be at location 0 and have
a current value. In OpenGL, the spec is not clear, resulting in
absurdities like the ATI driver binding an attribute to location
0, does not give an erro when you set it, but gives an error when
you try to get it back. And it doesn't actually set the value in
the shader.

So, in this patch we:

  1. Track attribute 0 value internally, setting and getting it
     as necessary.

  2. Upon glDrawArrays and glDrawElements, if attribute 0 is not
     "array enabled" (that is, it should use a current value) we
     create a dummy array, fill it with the intended current value,
     and attach and enable it. After the draw, we disable it.

Change-Id: I35f3e8a924e6fba236f4f4d85423b04ae448dad4
2011-08-10 11:00:10 +02:00
..