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. Qopengl materials
QtWS25 Last Chance

Qopengl materials

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.1k Views
  • 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.
  • Q Offline
    Q Offline
    Q139
    wrote on last edited by
    #1

    Where to find materials about Qopengl?
    Does Qopengl perform as well as glew?
    Cant manage to find way to draw lines, google has not much to offer.

    tryed:
    @
    glLineWidth(5);
    glColor3f( 1.0f, 1.0f, 1.0f);

    // Draw a triangle:
    glBegin(GL_TRIANGLES); // Lower left vertex
    glVertex3f(-1.0f, -0.5f, -4.0f); // Lower right vertex
    glVertex3f( 10000.0f, -0.5f, -4.0f); // Upper vertex
    glVertex3f( 0.0f, 0.5f, -4.0f); glEnd();

    glBegin(GL_LINE_STRIP);
    glVertex2f(0.1f,2.0f);// eelmine
    glVertex2f(-0.5f, -1.0f);
    glEnd();
    @

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Are you looking for something like "this":http://doc.qt.io/qt-5/qtgui-openglwindow-example.html ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        Q139
        wrote on last edited by
        #3

        [quote author="SGaist" date="1424469193"]Hi and welcome to devnet,

        Are you looking for something like "this":http://doc.qt.io/qt-5/qtgui-openglwindow-example.html ?[/quote]

        Tested code into that example replacing part that draws traingle with code above but it wont work this way

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          It wasn't meant to be just copy/replace. The example shows how to do it (the triangle part) using a recent version of OpenGL. You are using the old fixed pipeline with your functions calls.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            Q139
            wrote on last edited by
            #5

            Thanks for your knowledge, will look into newer opengl documentation.

            1 Reply Last reply
            0

            • Login

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