mirror of
https://github.com/Relintai/sfw.git
synced 2024-11-08 07:52:09 +01:00
Fixed warnings.
This commit is contained in:
parent
322bff4808
commit
6863d80ea9
@ -117,17 +117,17 @@ void Mesh::render() {
|
|||||||
glEnableVertexAttribArray(Shader::ATTRIBUTE_POSITION);
|
glEnableVertexAttribArray(Shader::ATTRIBUTE_POSITION);
|
||||||
|
|
||||||
if (normals_vbo_size > 0) {
|
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);
|
glEnableVertexAttribArray(Shader::ATTRIBUTE_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colors_vbo_size > 0) {
|
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);
|
glEnableVertexAttribArray(Shader::ATTRIBUTE_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uvs_vbo_size > 0) {
|
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);
|
glEnableVertexAttribArray(Shader::ATTRIBUTE_UV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
//int interval = has_adaptive_vsync && wants_adaptive_vsync ? -1 : (flags & WINDOW_VSYNC_DISABLED ? 0 : 1);
|
||||||
//glfwSwapInterval(interval);
|
//glfwSwapInterval(interval);
|
||||||
|
|
||||||
const GLFWvidmode *mode = glfwGetVideoMode(monitor ? monitor : glfwGetPrimaryMonitor());
|
//const GLFWvidmode *mode = glfwGetVideoMode(monitor ? monitor : glfwGetPrimaryMonitor());
|
||||||
|
|
||||||
//PRINTF("Build version: %s\n", BUILD_VERSION);
|
//PRINTF("Build version: %s\n", BUILD_VERSION);
|
||||||
//PRINTF("Monitor: %s (%dHz, vsync=%d)\n", glfwGetMonitorName(monitor ? monitor : glfwGetPrimaryMonitor()), mode->refreshRate, interval);
|
//PRINTF("Monitor: %s (%dHz, vsync=%d)\n", glfwGetMonitorName(monitor ? monitor : glfwGetPrimaryMonitor()), mode->refreshRate, interval);
|
||||||
|
Loading…
Reference in New Issue
Block a user