mirror of https://github.com/CGAL/cgal
static_casts
This commit is contained in:
parent
46f7b7437c
commit
74913d5cd8
|
|
@ -12,7 +12,7 @@ find_package(CGAL COMPONENTS Qt5)
|
||||||
|
|
||||||
include(${CGAL_USE_FILE})
|
include(${CGAL_USE_FILE})
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Xml Script OpenGL)
|
find_package(Qt5 COMPONENTS Xml Script OpenGL Svg)
|
||||||
include_directories (BEFORE ../../include)
|
include_directories (BEFORE ../../include)
|
||||||
include_directories (BEFORE ./include)
|
include_directories (BEFORE ./include)
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ qt5_generate_moc( Alpha_shapes_2.cpp Alpha_shapes_2.moc )
|
||||||
# The executable itself.
|
# The executable itself.
|
||||||
add_executable ( Alpha_shapes_2 Alpha_shapes_2.cpp Alpha_shapes_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
|
add_executable ( Alpha_shapes_2 Alpha_shapes_2.cpp Alpha_shapes_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
|
||||||
|
|
||||||
qt5_use_modules(Alpha_shapes_2 Xml Script OpenGL)
|
qt5_use_modules(Alpha_shapes_2 Xml Script OpenGL Svg)
|
||||||
|
|
||||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shapes_2 )
|
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shapes_2 )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ find_package(CGAL REQUIRED COMPONENTS Qt5)
|
||||||
|
|
||||||
include(${CGAL_USE_FILE})
|
include(${CGAL_USE_FILE})
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Xml Script OpenGL )
|
find_package(Qt5 COMPONENTS Xml Script OpenGL Svg)
|
||||||
include_directories (BEFORE ../../include)
|
include_directories (BEFORE ../../include)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -32,7 +32,7 @@ qt5_generate_moc( Apollonius_graph_2.cpp Apollonius_graph_2.moc )
|
||||||
# The executable itself.
|
# The executable itself.
|
||||||
add_executable ( Apollonius_graph_2 Apollonius_graph_2.cpp Apollonius_graph_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
|
add_executable ( Apollonius_graph_2 Apollonius_graph_2.cpp Apollonius_graph_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
|
||||||
|
|
||||||
qt5_use_modules(Apollonius_graph_2 Xml Script OpenGL)
|
qt5_use_modules(Apollonius_graph_2 Xml Script OpenGL Svg)
|
||||||
|
|
||||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Apollonius_graph_2 )
|
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Apollonius_graph_2 )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public:
|
||||||
attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
|
attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
|
||||||
program->bind();
|
program->bind();
|
||||||
program->setAttributeValue("colors", this->color());
|
program->setAttributeValue("colors", this->color());
|
||||||
qFunc.glDrawArrays(GL_LINES, 0, positions_lines.size()/3);
|
qFunc.glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_lines.size()/3));
|
||||||
vaos[0]->release();
|
vaos[0]->release();
|
||||||
program->release();
|
program->release();
|
||||||
|
|
||||||
|
|
@ -83,7 +83,8 @@ private:
|
||||||
|
|
||||||
vaos[0]->bind();
|
vaos[0]->bind();
|
||||||
buffers[0].bind();
|
buffers[0].bind();
|
||||||
buffers[0].allocate(positions_lines.data(), positions_lines.size()*sizeof(float));
|
buffers[0].allocate(positions_lines.data(),
|
||||||
|
static_cast<GLsizei>(positions_lines.size()*sizeof(float)));
|
||||||
program->enableAttributeArray("vertex");
|
program->enableAttributeArray("vertex");
|
||||||
program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
|
program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
|
||||||
buffers[0].release();
|
buffers[0].release();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue