diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp
index a279743cb87e0330aaf00f6bf66e49503be6ce86..7dc835890509bc5682984b171662facb1b777d8d 100644
--- a/src/pulsaranimationwidget.cpp
+++ b/src/pulsaranimationwidget.cpp
@@ -253,6 +253,19 @@ void PulsarAnimationWidget::paintGL()
 
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
+    // TODO: should be located elsewhere
+    static GLfloat no_mat[] = {0.0, 0.0, 0.0, 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 low_shininess[] = {2.5};
+    static GLfloat translucent[] = {1.0, 1.0, 1.0, 0.33};
+
+    glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
+    glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
+    glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
+    glMaterialfv(GL_FRONT, GL_SHININESS, low_shininess);
+    glMaterialfv(GL_FRONT, GL_EMISSION, no_mat);
+
     glMatrixMode(GL_MODELVIEW);
     glLoadIdentity();
 
@@ -284,19 +297,6 @@ void PulsarAnimationWidget::paintGL()
     }
     glPopMatrix();
 
-    // TODO: should be located elsewhere
-    static GLfloat no_mat[] = {0.0, 0.0, 0.0, 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 low_shininess[] = {2.5};
-    static GLfloat translucent[] = {1.0, 1.0, 1.0, 0.33};
-
-    glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
-    glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
-    glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
-    glMaterialfv(GL_FRONT, GL_SHININESS, low_shininess);
-    glMaterialfv(GL_FRONT, GL_EMISSION, no_mat);
-
     // draw companion
     glPushMatrix();
     {