Commit 5f2ce34a authored by Oliver Bock's avatar Oliver Bock
Browse files

Enabled FSAA (for polygon anti-aliasing) in high quality mode

parent 123fcd36
......@@ -122,13 +122,17 @@ bool WindowManager::initialize(const int width, const int height, const int fram
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
// enable opt-in quality feature FSAA (4x)
if(m_BoincAdapter->graphicsQualitySetting() == BOINCClientAdapter::HighGraphicsQualitySetting) {
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
}
// unused requirements
//SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
//SDL_GL_SetAttribute(SDL_GL_BUFFER_SIZE, 32);
//SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
//SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
//SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
//SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
// we always start in windowed mode
// (starting in fullscreen fails with high CPU load!)
......
......@@ -863,11 +863,7 @@ void Starsphere::render(const double timeOfDay)
glPushMatrix();
glLoadIdentity();
if (isFeature(LOGO)) {
// call subclass implementation
renderLogo();
}
if (isFeature(LOGO)) renderLogo();
if (isFeature(SEARCHINFO)) renderSearchInformation();
// restore original state
......
......@@ -371,6 +371,11 @@ void StarsphereRadio::generateObservatories(float dimFactor)
m_areciboObservatory = glGenLists(1);
glNewList(m_areciboObservatory, GL_COMPILE);
// enable opt-in quality feature FSAA (GL_POLYGON_SMOOTH is discouraged)
if(m_QualitySetting == BOINCClientAdapter::HighGraphicsQualitySetting) {
glEnable(GL_MULTISAMPLE_ARB);
}
// we don't dim Arecibo, just IFOs
glColor3f(0.75, 0.75, 0.75);
......@@ -434,6 +439,11 @@ void StarsphereRadio::generateObservatories(float dimFactor)
sphVertex3D(RAdeg+0.7, DEdeg-0.7, radius);
glEnd();
// disable opt-in quality feature FSAA again
if(m_QualitySetting == BOINCClientAdapter::HighGraphicsQualitySetting) {
glDisable(GL_MULTISAMPLE_ARB);
}
glEndList();
}
......
Supports Markdown
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