From 6863d80ea954c31ee63007996b47e1b031dcabcb Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 20 Dec 2023 15:50:46 +0100 Subject: [PATCH] Fixed warnings. --- sfw/render_core/mesh.cpp | 6 +++--- sfw/render_core/window.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sfw/render_core/mesh.cpp b/sfw/render_core/mesh.cpp index e73dde4..c17d530 100644 --- a/sfw/render_core/mesh.cpp +++ b/sfw/render_core/mesh.cpp @@ -117,17 +117,17 @@ void Mesh::render() { glEnableVertexAttribArray(Shader::ATTRIBUTE_POSITION); if (normals_vbo_size > 0) { - glVertexAttribPointer(Shader::ATTRIBUTE_NORMAL, 3, GL_FLOAT, GL_FALSE, 0, (void*)(vertices_vbo_size)); + glVertexAttribPointer(Shader::ATTRIBUTE_NORMAL, 3, GL_FLOAT, GL_FALSE, 0, (void*)(uintptr_t)(vertices_vbo_size)); glEnableVertexAttribArray(Shader::ATTRIBUTE_NORMAL); } if (colors_vbo_size > 0) { - glVertexAttribPointer(Shader::ATTRIBUTE_COLOR, 4, GL_FLOAT, GL_FALSE, 0, (void*)(vertices_vbo_size + normals_vbo_size)); + glVertexAttribPointer(Shader::ATTRIBUTE_COLOR, 4, GL_FLOAT, GL_FALSE, 0, (void*)(uintptr_t)(vertices_vbo_size + normals_vbo_size)); glEnableVertexAttribArray(Shader::ATTRIBUTE_COLOR); } if (uvs_vbo_size > 0) { - glVertexAttribPointer(Shader::ATTRIBUTE_UV, 2, GL_FLOAT, GL_FALSE, 0, (void*)(vertices_vbo_size + normals_vbo_size + colors_vbo_size)); + glVertexAttribPointer(Shader::ATTRIBUTE_UV, 2, GL_FLOAT, GL_FALSE, 0, (void*)(uintptr_t)(vertices_vbo_size + normals_vbo_size + colors_vbo_size)); glEnableVertexAttribArray(Shader::ATTRIBUTE_UV); } diff --git a/sfw/render_core/window.cpp b/sfw/render_core/window.cpp index 1b27684..e6974da 100644 --- a/sfw/render_core/window.cpp +++ b/sfw/render_core/window.cpp @@ -396,7 +396,7 @@ bool AppWindow::create_from_handle(void *handle, float scale, unsigned int flags //int interval = has_adaptive_vsync && wants_adaptive_vsync ? -1 : (flags & WINDOW_VSYNC_DISABLED ? 0 : 1); //glfwSwapInterval(interval); - const GLFWvidmode *mode = glfwGetVideoMode(monitor ? monitor : glfwGetPrimaryMonitor()); + //const GLFWvidmode *mode = glfwGetVideoMode(monitor ? monitor : glfwGetPrimaryMonitor()); //PRINTF("Build version: %s\n", BUILD_VERSION); //PRINTF("Monitor: %s (%dHz, vsync=%d)\n", glfwGetMonitorName(monitor ? monitor : glfwGetPrimaryMonitor()), mode->refreshRate, interval);