Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. OpenGL apps don't run when started from QtCreator >=2.3 but work fine in 2.1/2.2
QtWS25 Last Chance

OpenGL apps don't run when started from QtCreator >=2.3 but work fine in 2.1/2.2

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 2.5k 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.
  • W Offline
    W Offline
    wEmA
    wrote on last edited by
    #1

    Hello,

    I am using QtCreator on an openSuSE 11.4(64bit) system to develop an OpenGL application with Qt 4.7.4. Everything works fine with QtCreator 2.1 and 2.2, however, with versions 2.3 and 2.4rc I cannot run the application directly from QtCreator anymore.

    On my machine, the problem is reproducible with the OpenGL examples that come with Qt. When I load the "textures" example in QtCreator 2.2, it runs fine. When I run the same example in version 2.3.1 or 2.4rc (2.3.84), I get the following error and the application doesn't display anything:

    X Error: BadLength (poly request too large or internal Xlib length error) 16
    Extension: 136 (Uknown extension)
    Minor opcode: 1 (Unknown request)
    Resource id: 0x8a0001b

    I've added the following line to GLWidget::initializeGL() in the application:
    @std::cout << "OpenGL version supported by this platform (glGetString): " << glGetString(GL_VERSION) << std::endl;@
    and get the following output:

    QtCreator 2.1 and 2.2:
    OpenGL version supported by this platform (glGetString): 4.1.0 NVIDIA 260.19.44

    QtCreator 2.3.1 and 2.4rc:
    OpenGL version supported by this platform (glGetString): 1.4 (2.1.2 NVIDIA 260.19.44)

    Hence, the problem is that the app doesn't get the right OpenGL version. When I run the app from the console, I always get OpenGL 4.1. Has anyone made similar experiences, that is, is this a bug or am I missing something in the new creator version?

    Thanks!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Are you using the same Qt version in both Qt Creator 2.1/2.2 and 2.3?

      Are there differences in the environment used to run your application? Check Project->build/run settings.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wEmA
        wrote on last edited by
        #3

        Thanks a lot for your reply, it helped me find the problem! I used the same Qt version and the same run environment settings ("build environment"). However, upon a closer look I noticed that QtCreator 2.3 appends a "/usr/lib64" to the beginning of LD_LIBRARY_PATH for the "build environment" (2.2 doesn't). Switching to "system environment" that goes away and everything runs fine. So maybe there are some conflicting libraries on my system.

        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