Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

Problem using OpenGL version 3.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.



  • 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);@


Log in to reply