Skip to content

Commit

Permalink
Fix WebGL glClear issue. (facebookresearch#147)
Browse files Browse the repository at this point in the history
* Fix WebGL glClear issue.

Fixes the following GL_ERROR on WebGL:

glClear: can't be called on integer buffers
  • Loading branch information
msbaines committed Aug 13, 2019
1 parent 80d704b commit e5addf7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/esp/gfx/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ struct Renderer::Impl {
}

inline void renderEnter() {
framebuffer_.clear(GL::FramebufferClear::Color |
GL::FramebufferClear::Depth);
framebuffer_.clearColor(1, Vector4{});
framebuffer_.clearDepth(1.0);
framebuffer_.clearColor(0, Color4{});
framebuffer_.clearColor(1, Color4{});
framebuffer_.clearColor(2, Vector4ui{});
framebuffer_.bind();
}
Expand Down

0 comments on commit e5addf7

Please sign in to comment.