Commit 4081dce8 authored by Oliver Bock's avatar Oliver Bock

Dedicated material for "lighthouse" cones

parent ba9e75c1
......@@ -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.0f, 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.0f, 1.0f, 0.0f);
glTranslatef(0.0f, 0.0f, -4.0f);
......
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