Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
grapa_alisa
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Alisa Jung
grapa_alisa
Commits
1ad003b8
Commit
1ad003b8
authored
Nov 22, 2015
by
Alisa Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
might have fixed spheres for tesselation = 3
parent
38138692
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
myglwidget.cpp
helloqube/myglwidget.cpp
+1
-2
No files found.
helloqube/myglwidget.cpp
View file @
1ad003b8
...
@@ -333,6 +333,7 @@ void MyGLWidget::drawSphere(int tesselation){
...
@@ -333,6 +333,7 @@ void MyGLWidget::drawSphere(int tesselation){
glBegin
(
GL_LINE_LOOP
);
glBegin
(
GL_LINE_LOOP
);
GLUquadric
*
q
=
gluNewQuadric
();
GLUquadric
*
q
=
gluNewQuadric
();
gluQuadricOrientation
(
q
,
GLU_OUTSIDE
);
// gluQuadricDrawStyle(q, GLU_FILL);
// gluQuadricDrawStyle(q, GLU_FILL);
gluSphere
(
q
,
0.5
,
tesselation
,
tesselation
);
gluSphere
(
q
,
0.5
,
tesselation
,
tesselation
);
glEnd
();
glEnd
();
...
@@ -444,7 +445,6 @@ void MyGLWidget::drawBox(int tesselation){
...
@@ -444,7 +445,6 @@ void MyGLWidget::drawBox(int tesselation){
}
}
void
MyGLWidget
::
drawCylinder
(
int
tesselation
){
void
MyGLWidget
::
drawCylinder
(
int
tesselation
){
qDebug
(
"draw cylinder"
);
GLfloat
specularColor
[]
=
{
0.3
,
0.5
,
0.5
};
GLfloat
specularColor
[]
=
{
0.3
,
0.5
,
0.5
};
GLfloat
shininess
[]
=
{
120
};
//specular exponent
GLfloat
shininess
[]
=
{
120
};
//specular exponent
glMaterialfv
(
GL_FRONT
,
GL_SPECULAR
,
specularColor
);
glMaterialfv
(
GL_FRONT
,
GL_SPECULAR
,
specularColor
);
...
@@ -469,7 +469,6 @@ void MyGLWidget::drawCylinder(int tesselation){
...
@@ -469,7 +469,6 @@ void MyGLWidget::drawCylinder(int tesselation){
}
}
void
MyGLWidget
::
drawCone
(
int
tesselation
){
void
MyGLWidget
::
drawCone
(
int
tesselation
){
qDebug
(
"draw cone"
);
GLfloat
specularColor
[]
=
{
0.3
,
0.5
,
0.5
};
GLfloat
specularColor
[]
=
{
0.3
,
0.5
,
0.5
};
GLfloat
shininess
[]
=
{
120
};
//specular exponent
GLfloat
shininess
[]
=
{
120
};
//specular exponent
glMaterialfv
(
GL_FRONT
,
GL_SPECULAR
,
specularColor
);
glMaterialfv
(
GL_FRONT
,
GL_SPECULAR
,
specularColor
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment