Skip to content
Permalink
Browse files

android: fix crash on startup

  • Loading branch information
JaCzekanski committed Nov 22, 2019
1 parent bb08f6d commit c7d1d21d49e571b8aaeaf559c5b93d3b31038733
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/imgui/imgui_impl_opengl3.cpp
@@ -125,9 +125,9 @@ static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, int fb_wid
glDisable(GL_CULL_FACE);
glDisable(GL_DEPTH_TEST);
glEnable(GL_SCISSOR_TEST);
#ifdef GL_POLYGON_MODE
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
#endif
if (glPolygonMode) {
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}

// Setup viewport, orthographic projection matrix
// Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right).
@@ -316,9 +316,9 @@ void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data) {
glEnable(GL_SCISSOR_TEST);
else
glDisable(GL_SCISSOR_TEST);
#ifdef GL_POLYGON_MODE
glPolygonMode(GL_FRONT_AND_BACK, (GLenum)last_polygon_mode[0]);
#endif
if (glPolygonMode) {
glPolygonMode(GL_FRONT_AND_BACK, (GLenum)last_polygon_mode[0]);
}
glViewport(last_viewport[0], last_viewport[1], (GLsizei)last_viewport[2], (GLsizei)last_viewport[3]);
glScissor(last_scissor_box[0], last_scissor_box[1], (GLsizei)last_scissor_box[2], (GLsizei)last_scissor_box[3]);
}

0 comments on commit c7d1d21

Please sign in to comment.
You can’t perform that action at this time.