Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Set LineWith using Qt5 on Windows with OpenGL
Forum Updated to NodeBB v4.3 + New Features

Set LineWith using Qt5 on Windows with OpenGL

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    c.buss
    wrote on 3 Jan 2013, 17:13 last edited by
    #1

    Hi,

    today I was successful drawing lines with OpenGL using Qt5 on Windows. However I was not able to change the OpenGL line width.

    Minimum example:
    Started with the project gui/openglwindow. In the file main.cpp I changed the command to draw the triangle from
    glDrawArrays(GL_TRIANGLES, 0, 3);
    to
    glDrawArrays(GL_LINE_STRIP, 0, 3);
    which results in two lines being drawn that change colors between the vertex points.

    Question: How do I change the width of the lines being drawn? Is there a simple solution using Qt or OpenGL methods (glLineWidth does not seem to work but gives no error either)? Can shaders be employed? If so, how? Does the behaviour differ if desktop OpenGL is used instead of OpenGL ES with the ANGLE library?

    Thanks in advance for your help.

    Best regards,
    Christian

    1 Reply Last reply
    0

    1/1

    3 Jan 2013, 17:13

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved