Removing OpenMP support.
Just realized that there are only 8 vertices, and therefore 24 variables being updated every frame, which means that using OpenMP would (if anything) slow it down.
This commit is contained in:
parent
44a71b3227
commit
30c0bdb23b
@ -39,7 +39,6 @@ set(OpenGL_GL_PREFERENCE "GLVND")
|
|||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
find_package(GLUT REQUIRED)
|
find_package(GLUT REQUIRED)
|
||||||
find_package(GLEW REQUIRED)
|
find_package(GLEW REQUIRED)
|
||||||
find_package(OpenMP REQUIRED)
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_search_module(SDL2 REQUIRED sdl2)
|
pkg_search_module(SDL2 REQUIRED sdl2)
|
||||||
|
|
||||||
@ -55,7 +54,7 @@ set(SRCS
|
|||||||
"src/simulation.cpp")
|
"src/simulation.cpp")
|
||||||
|
|
||||||
# Define C++ compiler flags
|
# Define C++ compiler flags
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++11 ${OpenMP_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wfatal-errors -Werror -pedantic-errors -fno-elide-constructors")
|
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wpedantic -Wfatal-errors -Werror -pedantic-errors -fno-elide-constructors")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3")
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3")
|
||||||
|
@ -84,7 +84,6 @@ void cube::render() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cube::shift_colors() {
|
void cube::shift_colors() {
|
||||||
#pragma omp parallel for
|
|
||||||
for(size_t i = 0; i < colors.size(); ++i)
|
for(size_t i = 0; i < colors.size(); ++i)
|
||||||
{
|
{
|
||||||
colors[i] += color_ascending[i] ? color_shift :
|
colors[i] += color_ascending[i] ? color_shift :
|
||||||
|
Loading…
Reference in New Issue
Block a user