Commit 8b336f34 authored by Oliver Bock's avatar Oliver Bock

Deleted obsolete stuff (i.e. pulsar texture)

parent a8b4d0a2
...@@ -66,7 +66,6 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : ...@@ -66,7 +66,6 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
m_quadricLineOfSightTop2 = NULL; m_quadricLineOfSightTop2 = NULL;
// initialize texture pointers // initialize texture pointers
m_pulsarTexture = 0;
m_backgroundTexture = 0; m_backgroundTexture = 0;
// initial render timing settings // initial render timing settings
...@@ -116,7 +115,6 @@ PulsarAnimationWidget::~PulsarAnimationWidget() ...@@ -116,7 +115,6 @@ PulsarAnimationWidget::~PulsarAnimationWidget()
if(m_quadricPulsarSpinAxis) gluDeleteQuadric(m_quadricLineOfSight); if(m_quadricPulsarSpinAxis) gluDeleteQuadric(m_quadricLineOfSight);
if(m_quadricPulsarSpinAxisTop1) gluDeleteQuadric(m_quadricLineOfSightTop1); if(m_quadricPulsarSpinAxisTop1) gluDeleteQuadric(m_quadricLineOfSightTop1);
if(m_quadricPulsarSpinAxisTop2) gluDeleteQuadric(m_quadricLineOfSightTop2); if(m_quadricPulsarSpinAxisTop2) gluDeleteQuadric(m_quadricLineOfSightTop2);
if(m_pulsarTexture) deleteTexture(m_pulsarTexture);
if(m_backgroundTexture) deleteTexture(m_backgroundTexture); if(m_backgroundTexture) deleteTexture(m_backgroundTexture);
} }
...@@ -183,24 +181,6 @@ void PulsarAnimationWidget::initializeGL() ...@@ -183,24 +181,6 @@ void PulsarAnimationWidget::initializeGL()
QString msgPower = tr("%1 texture dimensions not a power of 2!"); QString msgPower = tr("%1 texture dimensions not a power of 2!");
QString msgSize = tr("Maximum texture size exceeded! Scaling down %1 texture to %2x%3..."); QString msgSize = tr("Maximum texture size exceeded! Scaling down %1 texture to %2x%3...");
// prepare and check pulsar texture
QImage pulsarTexture(":/textures/resources/texture_pulsar.png");
if(pulsarTexture.width() != pulsarTexture.height()) {
qWarning() << msgShape.arg(tr("Pulsar"));
}
else {
double integer = 0.0;
double fraction = 0.0;
fraction = modf(log(pulsarTexture.width()) / log(2.0), &integer);
if(fraction > 0.0) {
qWarning() << msgPower.arg(tr("Pulsar"));
}
}
if(pulsarTexture.width() > maxTextureSize) {
qWarning() << msgSize.arg(tr("pulsar").arg(maxTextureSize).arg(maxTextureSize));
pulsarTexture = pulsarTexture.scaled(maxTextureSize, maxTextureSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
// prepare and check background texture // prepare and check background texture
QImage backgroundTexture(":/textures/resources/texture_background_carina.png"); QImage backgroundTexture(":/textures/resources/texture_background_carina.png");
if(backgroundTexture.width() != backgroundTexture.height()) { if(backgroundTexture.width() != backgroundTexture.height()) {
...@@ -220,7 +200,6 @@ void PulsarAnimationWidget::initializeGL() ...@@ -220,7 +200,6 @@ void PulsarAnimationWidget::initializeGL()
} }
// bind textures // bind textures
m_pulsarTexture = bindTexture(pulsarTexture, GL_TEXTURE_2D, GL_RGBA);
m_backgroundTexture = bindTexture(backgroundTexture, GL_TEXTURE_2D, GL_RGBA); m_backgroundTexture = bindTexture(backgroundTexture, GL_TEXTURE_2D, GL_RGBA);
// use mipmapped textures // use mipmapped textures
...@@ -263,7 +242,6 @@ void PulsarAnimationWidget::paintGL() ...@@ -263,7 +242,6 @@ void PulsarAnimationWidget::paintGL()
static GLfloat mat_diffuse[] = {0.5, 0.5, 0.5, 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 mat_specular[] = {1.0, 1.0, 1.0, 1.0};
static GLfloat low_shininess[] = {2.5}; 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_AMBIENT, no_mat);
glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
......
...@@ -85,7 +85,6 @@ private: ...@@ -85,7 +85,6 @@ private:
GLUquadricObj *m_quadricLineOfSightTop1; GLUquadricObj *m_quadricLineOfSightTop1;
GLUquadricObj *m_quadricLineOfSightTop2; GLUquadricObj *m_quadricLineOfSightTop2;
GLuint m_pulsarTexture;
GLuint m_backgroundTexture; GLuint m_backgroundTexture;
int m_framesPerSecond; int m_framesPerSecond;
......
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