hey i am compiling the file which i have attached to this post and i am getting the following error..i dont knw wats wrong with it...please help
main.cpp:308: error: 'glutSolidSphere' was not declared in this scope
Printable View
hey i am compiling the file which i have attached to this post and i am getting the following error..i dont knw wats wrong with it...please help
main.cpp:308: error: 'glutSolidSphere' was not declared in this scope
I am not so familiar with OpenGL, but I guess you need some glut library / header.
because glutSolidSphere doesnt seem to be Qt function...
yeah my problem is i dont knw to translate glutSolidSphere & glutSolidCube line to QT.....so can someone please guide me through how to do it...thank you
Code:
void AntiAliasWidget::drawBasketBaloon() { glPushMatrix(); //Save the current transformation state glTranslatef(_height*1.7f-7.0f, 5.0f, -2.0f); //Move to the center of the baloon glColor3f(0.5f, 0.5f, 1.0f); glutSolidSphere(0.4f, 200, 200); glPopMatrix(); //Undo the move to the center of the baloon glPushMatrix(); //Save the current transformation state glTranslatef(_height*1.7f-7.0f, 4.0f, -2.0f); //Move to the center of the light glColor3f(1.0f, 0.7f, 0.0f); glutSolidCube(0.2f); glBegin(GL_LINES); glColor3f(0.0f, 0.0f, 0.0f); //Set color of the bar to black glVertex3f(0.0f, 0.7f, 0.0f); glVertex3f(0.1f, 0.0f, 0.1f); glVertex3f(0.0f, 0.7f, 0.0f); glVertex3f(0.1f, 0.0f, -0.1f); glVertex3f(0.0f, 0.7f, 0.0f); glVertex3f(-0.1f, 0.0f, 0.1f); glVertex3f(0.0f, 0.7f, 0.0f); glVertex3f(-0.1f, 0.0f, -0.1f); glEnd(); glPopMatrix(); //Undo the move to the center of the baloon glFlush(); }