Re: blank screen by shader render
Posted by
slava_jazz on
Mar 22, 2012; 1:59pm
URL: https://forum.jogamp.org/blank-screen-by-shader-render-tp3848071p3848575.html
Thanks, Wade Walker,

after size fixing the "glDrawArray" works correct for both cases (data pre-loaded into gpu and on-fly loaded from heap). Additional I was found that "gl2.glEnableVertexAttribArray(a_vertex);" have to be called for both cases as well.
Big step forward, but "glDrawElements" still does not work, your nice diagnostic function checkGLError(gl2,"glDrawElements"); keep silence...
would you please look what there can be wrong:
int count = Triangle.INDICES.length;
gl2.glEnable(GL2.GL_VERTEX_ARRAY);
checkGLError(gl2,"glEnable");
gl2.glDrawElements(GL2.GL_TRIANGLES, count, GL2.GL_UNSIGNED_SHORT, 0);
checkGLError(gl2,"glDrawElements");