mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-11 13:59:50 -05:00
Fixing blend functions for Framebuffer-based rendering
This commit is contained in:
@@ -459,11 +459,11 @@ namespace openspace {
|
||||
glDisable(GL_BLEND);
|
||||
#else
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_BLEND);
|
||||
// glEnable(GL_BLEND);
|
||||
// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
// glDisable(GL_CULL_FACE);
|
||||
glEnable(GL_CULL_FACE);
|
||||
// glDisable(GL_BLEND);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
#endif
|
||||
// setup the camera for the current frame
|
||||
|
||||
|
||||
@@ -174,6 +174,8 @@ bool RenderableStars::deinitialize() {
|
||||
}
|
||||
|
||||
void RenderableStars::render(const RenderData& data) {
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
|
||||
_program->activate();
|
||||
|
||||
// @Check overwriting the scaling from the camera; error as parsec->meter conversion
|
||||
@@ -217,6 +219,8 @@ void RenderableStars::render(const RenderData& data) {
|
||||
glBindVertexArray(0);
|
||||
_program->setIgnoreUniformLocationError(false);
|
||||
_program->deactivate();
|
||||
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
void RenderableStars::update(const UpdateData& data) {
|
||||
|
||||
Reference in New Issue
Block a user