View Full Version : Line Width
01-10-2011, 02:47 AM
I find a function called "lineWidth". However, I cannot set the line width using this function. Since I think the drawn line is thin, I want to make it thick. Is there any method to make the line thick?
01-10-2011, 11:44 AM
You should check the gl.get for getting the max line width (I forget what the token is for that request) - I bet it's returning a max width of one pixel - which it's allowed to do according to the spec. The reason being that under Windows, browsers often use the "ANGLE" code which runs WebGL on top of the native Direct3D library rather than the OpenGL implementation. Direct3D doesn't support any kind of line width control - hence, to be compliant, it almost certainly reports back a max line width of 1.0.
All of which is very wonderful in theory - but in practice, you still don't have fatter lines.
In an ideal world, the ANGLE driver would convert lines to polygons for you...but even that is vastly more difficult than you might think because your vertex shader code might do something to screw up the line width.
Basically, you're screwed!
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.