Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

New Contributor
Posts: 2
Registered: ‎02-28-2012
My Device: PlayBook
My Carrier: -
Accepted Solution

glLineWidth() not working?



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 };



glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices);




glDrawArrays(GL_LINE_LOOP, 0, 3);

Posts: 101
Registered: ‎02-25-2011
My Device: Playbook, q5, z10
My Carrier: TM

Re: glLineWidth() not working?

I'm using glLineWidth(2.0f) without any flickering on the playbook. works fine


sample snippet:

		glVertexPointer(2, GL_FLOAT, 0, pointsX);

		glDrawArrays(GL_LINE_STRIP, 0, numberOfPoints);



mappau Dev Team
twitter: mappau
New Contributor
Posts: 2
Registered: ‎02-28-2012
My Device: PlayBook
My Carrier: -

Re: glLineWidth() not working?

Thanks! It's (thankfully) really just a problem of the simulator.