Method called in the end of the main cycle. It renders ImGui and swaps GLFW buffers to show an updated frame.
()
| 184 | * It renders ImGui and swaps GLFW buffers to show an updated frame. |
| 185 | */ |
| 186 | protected void endFrame() { |
| 187 | ImGui.render(); |
| 188 | imGuiGl3.renderDrawData(ImGui.getDrawData()); |
| 189 | |
| 190 | // Update and Render additional Platform Windows |
| 191 | // (Platform functions may change the current OpenGL context, so we save/restore it to make it easier to paste this code elsewhere. |
| 192 | // For this specific demo app we could also call glfwMakeContextCurrent(window) directly) |
| 193 | if (ImGui.getIO().hasConfigFlags(ImGuiConfigFlags.ViewportsEnable)) { |
| 194 | final long backupCurrentContext = glfwGetCurrentContext(); |
| 195 | ImGui.updatePlatformWindows(); |
| 196 | ImGui.renderPlatformWindowsDefault(); |
| 197 | glfwMakeContextCurrent(backupCurrentContext); |
| 198 | } |
| 199 | |
| 200 | renderBuffer(); |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Method to render the OpenGL buffer and poll window events. |
no test coverage detected