Results 1 to 2 of 2

Thread: Line Width

  1. #1
    Email address no longer exists
    Join Date
    Sep 2010

    Line Width


    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?

  2. #2
    Senior Member
    Join Date
    May 2010

    Re: Line Width

    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 the end, you've pretty much gotta draw them as polygons - which is a pain in the ass to get right...and slow as all hell in JavaScript.

    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!

Similar Threads

  1. I want glLineWidth with width > 1
    By gsmolarz in forum OpenGL ES
    Replies: 0
    Last Post: 10-17-2006, 08:31 AM
  2. line width
    By Raj in forum OpenGL ES
    Replies: 2
    Last Post: 07-04-2005, 12:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean