Cannot use GLU with OpenGL and Qt5.1
-
wrote on 3 Sept 2013, 10:02 last edited by
I've to draw a cylinder in a 3D scene that I've created using opengl.
The simplest way is using the GLU functions, like in this case "gluCylinder " that do all for me, but campiling I've this error "error: 'gluCylinder' was not declared in this scope".
May I include a particular header file?
this is my project file conf:
@QT += core gui openglgreaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = opengltest
TEMPLATE = appSOURCES += main.cpp
myglwidget.cppHEADERS +=
myglwidget.h
@all opengl directives are recognised well, but any glu function call fails... what is the problem?
-
Hi,
IIRC you need to include GL/glut.h and link against libglut
-
wrote on 4 Sept 2013, 07:00 last edited by
Thanks, I've resolved with you suggestion, but how can I create a full face paint cylinder? because gluCilynder only draws lateral surfaces.
I have another question for you:
if I have some static object on my 3d rendering space, and other are dinamics (that change their position), is there a way to not redraw also the statics one?[quote author="SGaist" date="1378243066"]Hi,
IIRC you need to include GL/glut.h and link against libglut[/quote]
-
Sorry, I can't help you there, I am not as fluent in OpenGL as I would like.
You should rather ask these questions on an OpenGL dedicated forum
1/4