Results 1 to 2 of 2

Thread: OpenGL

  1. #1
    Join Date
    Nov 2014
    Posts
    12
    Qt products
    Qt5

    Default OpenGL

    Hi everybody) Sorry for my English. I began studying OpenGl and there were difficulties with the connection Opengl, glut etc. I have began with new project (mainWindow). In examplies was header file ("glut"), in main.cpp - #include<gl\glut.h>. My attempts:

    *pro:

    Qt Code:
    1. QT += core gui opengl
    2.  
    3. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    4.  
    5. TARGET = untitled
    6. TEMPLATE = app
    7.  
    8. CONFIG += opengl
    9.  
    10. SOURCES += main.cpp
    11. HEADERS +=
    12.  
    13. QMAKE_LIBS_OPENGL = -lGL -lglut
    To copy to clipboard, switch view to plain text mode 

    *glut.h
    Qt Code:
    1. #define GLUT_GAME_MODE_WIDTH ((GLenum) 2)
    2. #define GLUT_GAME_MODE_HEIGHT ((GLenum) 3)
    3. #define GLUT_GAME_MODE_PIXEL_DEPTH ((GLenum) 4)
    4. #define GLUT_GAME_MODE_REFRESH_RATE ((GLenum) 5)
    5. #define GLUT_GAME_MODE_DISPLAY_CHANGED ((GLenum) 6)
    6.  
    7. GLUTAPI void APIENTRY glutGameModeString(const char *string);
    8. GLUTAPI int APIENTRY glutEnterGameMode(void);
    9. GLUTAPI void APIENTRY glutLeaveGameMode(void);
    10. GLUTAPI int APIENTRY glutGameModeGet(GLenum mode);
    11. over 700 strings
    To copy to clipboard, switch view to plain text mode 

    *main.cpp
    Qt Code:
    1. #include <gl\glut.h>
    2.  
    3. void Initialize();
    4. void MouseHandler(int button, int state, int x, int y);
    5. void KeyboardHandler(unsigned char key, int x, int y);
    6. void MainMenuHandler(int option);
    7. void Animate();
    8. void Reshape(int width, int height);
    9. void Display();
    10. etc.
    To copy to clipboard, switch view to plain text mode 
    Thanks!

  2. #2
    Join Date
    Nov 2014
    Posts
    12
    Qt products
    Qt5

    Default Re: OpenGL

    I realized the folly of a massage already realized

Similar Threads

  1. Replies: 2
    Last Post: 5th July 2017, 13:28
  2. Conversion from opengl to opengl es2 (Shapefile rendering)?
    By swapan_gh in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 5th December 2013, 06:59
  3. converting GLUT/OpenGL to Qt/OpenGL - displaying issue
    By yoti13 in forum Qt Programming
    Replies: 1
    Last Post: 25th November 2012, 00:45
  4. Replies: 0
    Last Post: 6th December 2009, 00:41
  5. Qt with OpenGL ES for ARM9 - All OpenGL ES tests have failed!
    By vinpa in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd December 2009, 10:10

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.