0

I want to get benefits of instanced rendering. But I have no success when I use GLES 3.x PowerVR emulator from PowerVR SDK v. 4.0. I need to draw unit quad in random positions. Positions are passed to shader as attributes – 1 position per instance using glVertexAttribDivisor. As result I see only 5 rectangles of 100. I tested instancing with desktop OpenGL and I see all 100 instances of quads.

I've posted already on PowerVR forum, but maybe someone here has solution. Here is the link to the test application, that I used for my workaround.

Sergei Ivanov
  • 103
  • 1
  • 9
  • I had a quick look but can't find it; can you tell us where you call `glGetUniformLocation`? It looks like you've hardcoded the uniform locations (though I want heavily to emphasise my *quick look*; I very easily could be mistaken). – Tommy Mar 14 '16 at 15:34
  • Shader.cpp, line 208. There is only one uniform - texture sampler. I think there is wrong attributes reading inside emulator code, and I'm not sure it depends on uniforms. – Sergei Ivanov Mar 14 '16 at 16:15
  • Sorry, I'm obviously getting old. I meant `glBindAttribLocation`; it's a bit of a knee-jerk reaction to the observation that `initRectangles` assumes certain indices and I couldn't find where those are established. So not necessarily a helpful comment, just a query. – Tommy Mar 14 '16 at 17:09

0 Answers0