Commit be74ad45 authored by Oliver Bock's avatar Oliver Bock

Enabled texture rotation

* Pending: rotation not in sync with axes
* Pending: spin and magnetic axes not in sync (need decoupling)
parent 9154cfc0
......@@ -133,9 +133,9 @@ void PulsarAnimationWidget::initializeGL()
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
// enable 2D sphere mapping (s/t coordinates)
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
// enable 2D mapping (s/t coordinates, sphere map won't rotate texture!)
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
}
void PulsarAnimationWidget::resizeGL(int w, int h)
......@@ -203,7 +203,6 @@ void PulsarAnimationWidget::paintGL()
glPopMatrix();
}
// FIXME: how to rotate texture?
glRotatef(m_pulsarRotationAngle, 0.0f, 1.0f, 0.0f);
glRotatef(m_pulsarSpinAxisInclination, 1.0f, 0.0f, 0.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