Skip to content

Commit

Permalink
Disable OpenGL error checks
Browse files Browse the repository at this point in the history
On closing the app window there are some opengl errors reported, disable them until we find their cause.
  • Loading branch information
pwiecz committed Oct 10, 2021
1 parent f8b7365 commit fcf523c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
10 changes: 0 additions & 10 deletions gui/gl/imgui_renderer_gl2.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ func (renderer *OpenGL2s) Dispose() {
func (renderer *OpenGL2s) PreRender(clearColor [3]float32) {
gl.ClearColor(clearColor[0], clearColor[1], clearColor[2], 1.0)
gl.Clear(gl.COLOR_BUFFER_BIT)
if glerror := gl.GetError(); glerror != gl.NO_ERROR {
panic(glerror)
}
}

// Render translates the ImGui draw data to OpenGL3 commands.
Expand Down Expand Up @@ -222,10 +219,6 @@ func (renderer *OpenGL2s) Render(displaySize [2]float32, framebufferSize [2]floa
gl.PolygonMode(gl.FRONT_AND_BACK, uint32(lastPolygonMode[0]))
gl.Viewport(lastViewport[0], lastViewport[1], lastViewport[2], lastViewport[3])
gl.Scissor(lastScissorBox[0], lastScissorBox[1], lastScissorBox[2], lastScissorBox[3])

if glerror := gl.GetError(); glerror != gl.NO_ERROR {
panic(glerror)
}
}

func (renderer *OpenGL2s) createDeviceObjects() {
Expand Down Expand Up @@ -361,9 +354,6 @@ func (renderer *OpenGL2s) destroyFontsTexture() {
imgui.CurrentIO().Fonts().SetTextureID(0)
renderer.fontTexture = 0
}
if glerror := gl.GetError(); glerror != gl.NO_ERROR {
panic(glerror)
}
}

func (renderer *OpenGL2s) invalidateDeviceObjects() {
Expand Down
3 changes: 0 additions & 3 deletions gui/gl/imgui_renderer_gl3.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,6 @@ func (renderer *OpenGL3) destroyFontsTexture() {
imgui.CurrentIO().Fonts().SetTextureID(0)
renderer.fontTexture = 0
}
if glerror := gl.GetError(); glerror != gl.NO_ERROR {
panic(glerror)
}
}

func (renderer *OpenGL3) invalidateDeviceObjects() {
Expand Down

0 comments on commit fcf523c

Please sign in to comment.