From df76f756d435aca7c86755a890008be7d26cda7f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 10 Jul 2015 12:41:36 +0200 Subject: [PATCH] static_casts; gl ->> gl.gl --- .../demo/Mesh_3/Scene_implicit_function_item.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Mesh_3/demo/Mesh_3/Scene_implicit_function_item.cpp b/Mesh_3/demo/Mesh_3/Scene_implicit_function_item.cpp index a59c57496ad..a92467f4ffd 100644 --- a/Mesh_3/demo/Mesh_3/Scene_implicit_function_item.cpp +++ b/Mesh_3/demo/Mesh_3/Scene_implicit_function_item.cpp @@ -345,7 +345,7 @@ void Scene_implicit_function_item::initialize_buffers() const vao[0].bind(); buffers[0].bind(); - buffers[0].allocate(v_cube.data(), v_cube.size()*sizeof(float)); + buffers[0].allocate(v_cube.data(), static_cast(v_cube.size()*sizeof(float))); vertexLocation[0] = rendering_program.attributeLocation("vertex"); rendering_program.enableAttributeArray(vertexLocation[0]); rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3); @@ -356,7 +356,7 @@ void Scene_implicit_function_item::initialize_buffers() const //cutting plane vao[1].bind(); buffers[1].bind(); - buffers[1].allocate(v_plan.data(), v_plan.size()*sizeof(float)); + buffers[1].allocate(v_plan.data(), static_cast(v_plan.size()*sizeof(float))); vertexLocation[1] = tex_rendering_program.attributeLocation("vertex"); tex_rendering_program.bind(); tex_rendering_program.setAttributeBuffer(vertexLocation[1],GL_FLOAT,0,3); @@ -365,7 +365,7 @@ void Scene_implicit_function_item::initialize_buffers() const tex_rendering_program.release(); buffers[2].bind(); - buffers[2].allocate(texture_map.data(), texture_map.size()*sizeof(float)); + buffers[2].allocate(texture_map.data(), static_cast(texture_map.size()*sizeof(float))); tex_Location = tex_rendering_program.attributeLocation("tex_coord"); tex_rendering_program.bind(); tex_rendering_program.setAttributeBuffer(tex_Location,GL_FLOAT,0,2); @@ -435,16 +435,16 @@ Scene_implicit_function_item::draw(QGLViewer* viewer) const rendering_program.bind(); color.setRgbF(0.0,0.0,0.0); rendering_program.setUniformValue(colorLocation[0], color); - glDrawArrays(GL_LINES, 0, v_cube.size()/3); + glDrawArrays(GL_LINES, 0, static_cast(v_cube.size()/3)); rendering_program.release(); vao[0].release(); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, textureId); + gl.glActiveTexture(GL_TEXTURE0); + gl.glBindTexture(GL_TEXTURE_2D, textureId); vao[1].bind(); tex_rendering_program.bind(); - glDrawArrays(GL_TRIANGLES, 0, v_plan.size()/3); + glDrawArrays(GL_TRIANGLES, 0, static_cast(v_plan.size()/3)); tex_rendering_program.release(); vao[1].release();