diff --git a/include/GpuApplication.h b/include/GpuApplication.h index b95a8fb..aa81d6a 100644 --- a/include/GpuApplication.h +++ b/include/GpuApplication.h @@ -27,7 +27,7 @@ protected: cl::Program program; public: - bool GPUApplication::InitCL() { + bool InitCL() { // Find a combination of a cl::Platform and cl::Device to run OpenCL // ----------------------------------------------------------------- { @@ -189,4 +189,4 @@ protected: }; -#endif \ No newline at end of file +#endif diff --git a/src/GpuParticleSystem.cpp b/src/GpuParticleSystem.cpp index 5a6e866..0bd2fd7 100644 --- a/src/GpuParticleSystem.cpp +++ b/src/GpuParticleSystem.cpp @@ -10,7 +10,7 @@ bool GpuParticleSystem::InitGL() { // Initialize GLFW, which is used to create a window if (!glfwInit()) { std::cerr << "Failed to initialize GLFW" << std::endl; - return nullptr; + return false; } // Set GLFW to not create an OpenGL context (version 330 core) (also at the top of each shader file) @@ -24,7 +24,7 @@ bool GpuParticleSystem::InitGL() { if (!window) { std::cerr << "Failed to create GLFW window" << std::endl; glfwTerminate(); - return NULL; + return false; } // Make the OpenGL context current @@ -34,7 +34,7 @@ bool GpuParticleSystem::InitGL() { if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) { std::cerr << "Failed to initialized GLAD" << std::endl; glfwTerminate(); - return NULL; + return false; } // Enable depth testing in OpenGL @@ -67,6 +67,8 @@ bool GpuParticleSystem::InitGL() { // we need to pass data (positions and velocities) to the vertex shader, // so we'll use VBOs for this. glGenBuffers(2, VBOs); + + return true; } void GpuParticleSystem::InitPosVel() { diff --git a/src/GpuPerlinNoise.cpp b/src/GpuPerlinNoise.cpp index 16bcecf..692b813 100644 --- a/src/GpuPerlinNoise.cpp +++ b/src/GpuPerlinNoise.cpp @@ -13,7 +13,7 @@ bool GpuPerlinNoise::InitGL() { // Initialize GLFW, which is used to create a window if (!glfwInit()) { std::cerr << "Failed to initialize GLFW" << std::endl; - return nullptr; + return false; } // Set GLFW to not create an OpenGL context (version 330 core) (also at the top of each shader file) @@ -27,7 +27,7 @@ bool GpuPerlinNoise::InitGL() { if (!window) { std::cerr << "Failed to create GLFW window" << std::endl; glfwTerminate(); - return NULL; + return false; } // Make the OpenGL context current @@ -37,7 +37,7 @@ bool GpuPerlinNoise::InitGL() { if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) { std::cerr << "Failed to initialized GLAD" << std::endl; glfwTerminate(); - return NULL; + return false; } // Enable depth testing in OpenGL