Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/MaterialXRenderGlsl/GLFramebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ GLFramebuffer::GLFramebuffer(unsigned int width, unsigned int height, unsigned i
_height(height),
_channelCount(channelCount),
_baseType(baseType),
_encodeSrgb(false),
_encodeSrgb(true),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it the default, since GlslRenderer was enforcing it for so long.

_framebuffer(0),
_colorTexture(0),
_depthTexture(0)
Expand Down
3 changes: 1 addition & 2 deletions source/MaterialXRenderGlsl/GlslRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,12 @@ void GlslRenderer::render()
throw ExceptionRenderError("Invalid OpenGL context in render");
}

// Set up target
// Set up target. Will manage GL_FRAMEBUFFER_SRGB.
_framebuffer->bind();

glClearColor(_screenColor[0], _screenColor[1], _screenColor[2], 1.0f);

glEnable(GL_DEPTH_TEST);
glEnable(GL_FRAMEBUFFER_SRGB);
glDepthFunc(GL_LESS);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

Expand Down