Better like this: glClear is in the framebuffer callback.
This commit is contained in:
parent
58af31be5e
commit
109ae75fb2
@ -108,7 +108,6 @@ void gui::Gui::render_gui(const Controller &controller) {
|
|||||||
|
|
||||||
void gui::Gui::render_gpu() const {
|
void gui::Gui::render_gpu() const {
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
|
||||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ static void glfwErrorCallback(int error, const char *message) {
|
|||||||
|
|
||||||
static void framebufferCallback([[maybe_unused]] GLFWwindow *glfWwindow, int width, int height) {
|
static void framebufferCallback([[maybe_unused]] GLFWwindow *glfWwindow, int width, int height) {
|
||||||
glViewport(0, 0, width, height);
|
glViewport(0, 0, width, height);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
gui::Window::Window() {
|
gui::Window::Window() {
|
||||||
|
Loading…
Reference in New Issue
Block a user