Commit 503545c5 by Alisa Jung

glut. fuck yeah. Also added glut files to C:\glut

parent 070fb195
...@@ -11,6 +11,9 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets ...@@ -11,6 +11,9 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = helloqube TARGET = helloqube
TEMPLATE = app TEMPLATE = app
#not helping
LIBS += -lglut64
LIBS += -LC:\glut
SOURCES += main.cpp\ SOURCES += main.cpp\
mainwindow.cpp \ mainwindow.cpp \
...@@ -25,7 +28,8 @@ HEADERS += mainwindow.h \ ...@@ -25,7 +28,8 @@ HEADERS += mainwindow.h \
scenegraph.h \ scenegraph.h \
primitive.h \ primitive.h \
rigidbodytransformation.h \ rigidbodytransformation.h \
controller.h controller.h \
glut.h
RESOURCES += \ RESOURCES += \
helloqube.qrc helloqube.qrc
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.5.1, 2015-11-20T23:02:46. --> <!-- Written by QtCreator 3.5.1, 2015-11-21T20:37:36. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
......
...@@ -492,7 +492,20 @@ void MyGLWidget::drawCone(int tesselation){ ...@@ -492,7 +492,20 @@ void MyGLWidget::drawCone(int tesselation){
} }
void MyGLWidget::drawTorus(int tesselation){ void MyGLWidget::drawTorus(int tesselation){
GLfloat specularColor[] = { 0.3, 0.5, 0.5 };
GLfloat shininess[] = { 120 };//specular exponent
glMaterialfv(GL_FRONT, GL_SPECULAR, specularColor);
glMaterialfv(GL_FRONT, GL_SHININESS, shininess);
GLfloat sphereColor[] = { 0, 0.8, 0.8 };
glMaterialfv(GL_FRONT, GL_DIFFUSE, sphereColor);
glNormal3f(0, 0, 1);
glBegin(GL_LINE_LOOP);
glutSolidTorus(0.5,1,10,10);
glEnd();
} }
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <QStyleOption> #include <QStyleOption>
#include <QStylePainter> #include <QStylePainter>
#include "glut.h"
#include <rigidbodytransformation.h>//vorläufig, bis szenengraph steht. #include <rigidbodytransformation.h>//vorläufig, bis szenengraph steht.
class Controller; class Controller;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment