Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
einsteinathome
pulsatingscience
Commits
4081dce8
Commit
4081dce8
authored
Dec 01, 2008
by
Oliver Bock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dedicated material for "lighthouse" cones
parent
ba9e75c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
src/pulsaranimationwidget.cpp
src/pulsaranimationwidget.cpp
+10
-5
No files found.
src/pulsaranimationwidget.cpp
View file @
4081dce8
...
...
@@ -119,14 +119,10 @@ void PulsarAnimationWidget::paintGL()
// TODO: should be located elsewhere
static
GLfloat
no_mat
[]
=
{
0.0
,
0.0
,
0.0
,
1.0
};
static
GLfloat
mat_ambient
[]
=
{
0.7
,
0.7
,
0.7
,
1.0
};
static
GLfloat
mat_ambient_color
[]
=
{
0.8
,
0.8
,
0.2
,
1.0
};
static
GLfloat
mat_diffuse
[]
=
{
0.5
,
0.5
,
0.5
,
1.0
};
static
GLfloat
mat_specular
[]
=
{
1.0
,
1.0
,
1.0
,
1.0
};
static
GLfloat
no_shininess
[]
=
{
0.0
};
static
GLfloat
low_shininess
[]
=
{
5.0
};
static
GLfloat
high_shininess
[]
=
{
100.0
};
static
GLfloat
mat_emission
[]
=
{
0.3
,
0.2
,
0.2
,
0.0
};
glMaterialfv
(
GL_FRONT
,
GL_AMBIENT
,
no_mat
);
glMaterialfv
(
GL_FRONT
,
GL_DIFFUSE
,
mat_diffuse
);
glMaterialfv
(
GL_FRONT
,
GL_SPECULAR
,
mat_specular
);
...
...
@@ -150,6 +146,15 @@ void PulsarAnimationWidget::paintGL()
gluSphere
(
m_quadricPulsar
,
1.0
f
,
32
,
32
);
glPopMatrix
();
// TODO: should be located elsewhere
static
GLfloat
coneAmbient
[]
=
{
1.0
,
1.0
,
0.0
,
1.0
};
static
GLfloat
coneDiffuse
[]
=
{
1.0
,
1.0
,
0.0
,
1.0
};
static
GLfloat
coneSpecular
[]
=
{
1.0
,
1.0
,
0.5
,
1.0
};
glMaterialfv
(
GL_FRONT
,
GL_AMBIENT
,
coneAmbient
);
glMaterialfv
(
GL_FRONT
,
GL_DIFFUSE
,
coneDiffuse
);
glMaterialfv
(
GL_FRONT
,
GL_SPECULAR
,
coneSpecular
);
glPushMatrix
();
glRotatef
(
m_pulsarRotationAngle
-
90
,
0.0
f
,
1.0
f
,
0.0
f
);
glTranslatef
(
0.0
f
,
0.0
f
,
-
4.0
f
);
...
...
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