QtOpenGL and GL Libraries conflict
-
I am trying to do an opengl example from a video on youtube. I am doing the same thing but in glEnable(GL_LIGHT0); line my qt gives error. It gives error also for GL_LIGHTING, GL_COLOR_MATERIAL. Error is; GL_LIGHT0 was not declared in this scope. Later I added #include <GL/glu.h> and program recognized this enable methods but at this time gave another error which is: conflicting decleration 'typedef double GLdouble' and other conflicting errors. How to declare these methods. In the video he does not have such an error. Thank you inadvance.
-
-
Hi,
Which version of Qt are you using ?
If Qt 5, then you should consider using QOpenGLWidget. In the documentation of the class here, you have the explanation on how to call standard OpenGL functions.
-
@wrosecrans Thank you for your reply. What do you prefer ? I want to view stl file, I found different examples like e8johan stlviewer from github. It works on ubuntu in my computer but when I downloded it on my raspberry pi it gives conflict error. Stlviewer both uses opengl and GL libraries at the same time.