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. Problem using OpenGL version 3.1
Forum Updated to NodeBB v4.3 + New Features

Problem using OpenGL version 3.1

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 747 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.
  • G Offline
    G Offline
    gsxruk
    wrote on last edited by
    #1

    Hi,

    I'm currently working on an application and have been testing different ways of increasing performance. One of the methods I'd like to test is using instance draw as I have many duplicate shapes. However, to do this I need at least version 3.1.

    I was unable to get my application to work with version 3.1 at all (it's currently running with 3.0). Having found the page "here":http://qt-project.org/wiki/How_to_use_OpenGL_Core_Profile_with_Qt I thought I'd give that a go to just make sure I could draw with version 3.1. I have adapted it slightly to suit the version but it does not work in version 3.1. Like my application, it works fine with 3.0, the triangle is drawn as shown on the page. However, if I request version 3.1, I just see 2 lines. One line starts at the very centre and goes directly up and off the top, and the other also starts at the centre, and goes directly right and off the side.

    I'm running on Linux Mint 16 x64 and using Qt5.2.1.

    Does anyone have any ideas what could be causing this?

    Thanks.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gsxruk
      wrote on last edited by
      #2

      Hi,

      I seem to have fixed this.

      It was related to the part that states it is sometimes necessary to bind a VAO before setting up the attributes. Although it suggests that is the behaviour of 3.3 and not 3.1. However, adding this seem to have fixed it.

      @uint vao;
      glGenVertexArrays(1, &vao);
      glBindVertexArray(vao);@

      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