Results 1 to 3 of 3

Thread: Using alternate openGL library/header files in QT Creator

  1. #1
    Join Date
    Oct 2010
    Posts
    12
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Using alternate openGL library/header files in QT Creator

    I currently have an openGL modelviewer, made using creator and the openGL widget, which works under windows.

    However, for the purposes of porting it to test it on a mobile platform I have been trying to get an openGL ES 2.0 emulator running using it, which would require me to run it using an alternate header reference and set of library files.

    Is there anyway of forcing QT creator to use an alternate openGL library/header reference when building the application? A forum search doesn't turn up anything, but it seems like it should be possible.

    Thanks in advance! Any help is appreciated!


    Added after 1 55 minutes:


    It took some slightly more abstract google searching, but it looks like the issue can be solved by changing the QMAKE_INCDIR_OPENGL and QMAKE_LIBDIR_OPENGL variables in the config.

    Hope this helps someone else!
    Last edited by Willybood; 22nd May 2011 at 19:31.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using alternate openGL library/header files in QT Creator

    Qt Code:
    1. #ifdef Q_OS_WINCE
    2. #include <gles.h>
    3. #else
    4. #include <gl.h>
    5. #endif
    To copy to clipboard, switch view to plain text mode 

    As for libs it should be enough to use Qt's OpenGL module and the appropriate library for the platform will be linked. If you'd like to override that, you'd have to rebuild Qt to use GLES instead of GL for your desktop platform.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2010
    Posts
    12
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Using alternate openGL library/header files in QT Creator

    I was hoping to not have to rebuild QT from scratch, but it looks like that might be necessary here.

    Thanks for your help, fingers crossed this will work!

Similar Threads

  1. Why don't Qt Creator projects recompile after header changes?
    By tksharpless in forum Qt Programming
    Replies: 5
    Last Post: 19th October 2011, 18:20
  2. Replies: 2
    Last Post: 19th February 2011, 12:26
  3. Header Files
    By Maluko_Da_Tola in forum Newbie
    Replies: 1
    Last Post: 2nd October 2010, 13:04
  4. Replies: 2
    Last Post: 30th September 2010, 13:26
  5. Replies: 4
    Last Post: 8th April 2010, 00:09

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.