Fixes for Mac rendering of stars and milkyway

This commit is contained in:
Alexander Bock
2015-05-14 12:50:17 +02:00
parent 8f5ba101e4
commit 6a9fdef2e0
5 changed files with 38 additions and 11 deletions
-2
View File
@@ -186,9 +186,7 @@ void RenderableSphere::update(const UpdateData& data) {
}
void RenderableSphere::loadTexture() {
LDEBUG("loadTexture");
if (_texturePath.value() != "") {
LDEBUG("loadTexture2");
ghoul::opengl::Texture* texture = ghoul::io::TextureReader::ref().loadTexture(absPath(_texturePath));
if (texture) {
LDEBUG("Loaded texture from '" << absPath(_texturePath) << "'");
+5 -3
View File
@@ -174,8 +174,9 @@ bool RenderableStars::deinitialize() {
}
void RenderableStars::render(const RenderData& data) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
//glEnable(GL_BLEND);
//glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
glDisable(GL_DEPTH_TEST);
_program->activate();
@@ -221,7 +222,8 @@ void RenderableStars::render(const RenderData& data) {
_program->setIgnoreUniformLocationError(false);
_program->deactivate();
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_DEPTH_TEST);
}
void RenderableStars::update(const UpdateData& data) {