gl::push and gl::pop not necessary anymore because we cleanup the GL-state

pull/3471/head
kallaballa 2 years ago
parent 7d10402b46
commit f8a5c86b7a
  1. 6
      src/common/subsystems.hpp

@ -469,7 +469,6 @@ void clear(const float& r = 0.0f, const float& g = 0.0f, const float& b = 0.0f)
void begin() {
gl::begin();
// gl::push();
float w = WIDTH;
float h = HEIGHT;
@ -488,13 +487,10 @@ void begin() {
void end() {
nvgEndFrame(vg);
nvgRestore(vg);
// gl::pop();
gl::end();
}
void init(bool debug = false) {
gl::push();
GL_CHECK(glViewport(0, 0, WIDTH, HEIGHT));
GL_CHECK(glEnable(GL_STENCIL_TEST));
GL_CHECK(glStencilMask(~0));
@ -512,8 +508,6 @@ void init(bool debug = false) {
/*nvgCreateFont(vg, "sans-bold", "fonts/DejaVuSans-Bold.ttf");
nvgCreateFont(vg, "sans", "fonts/DejaVuSans.ttf");
*/
gl::pop();
}
} //namespace nvg

Loading…
Cancel
Save