02-28-2012 01:42 PM
Hi,
I am experiencing strange behaviour when trying to render lines under OpenGL ES 2.0 and using glLineWidth().
It works fine with a line width of 1.0, but everything wider just results in a filled shape with occasional screen flickering. According to GL_ALIASED_LINE_WIDTH_RANGE a line width of 1 to 7 should be supported.
I don't have my PlayBook yet so I only tested it on the simulator.
As this would be an instant show-stopper for me, could anybody else please confirm that this issue exists in the simulator or on the real device (or help me what I am doing wrong)?
My test program is as simple as this:
GLfloat vVertices[] = { 0.0f, 0.5f, 0.0f, -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f };
glUseProgram(simpleShader);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices);
glEnableVertexAttribArray(position);
glLineWidth(2.0);
glDrawArrays(GL_LINE_LOOP, 0, 3);
Solved! Go to Solution.
03-01-2012 03:09 AM
I'm using glLineWidth(2.0f) without any flickering on the playbook. works fine
sample snippet:
glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, pointsX); glLineWidth(2.0f); glDrawArrays(GL_LINE_STRIP, 0, numberOfPoints); glDisableClientState(GL_VERTEX_ARRAY);
03-07-2012 08:06 AM