fix: Hotfix

This commit is contained in:
Tibo De Peuter 2024-11-15 14:50:01 +01:00
parent cd5209c3f2
commit 1abc2611c7
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
3 changed files with 10 additions and 8 deletions

View file

@ -27,7 +27,7 @@ protected:
cl::Program program; cl::Program program;
public: public:
bool GPUApplication::InitCL() { bool InitCL() {
// Find a combination of a cl::Platform and cl::Device to run OpenCL // Find a combination of a cl::Platform and cl::Device to run OpenCL
// ----------------------------------------------------------------- // -----------------------------------------------------------------
{ {
@ -189,4 +189,4 @@ protected:
}; };
#endif #endif

View file

@ -10,7 +10,7 @@ bool GpuParticleSystem::InitGL() {
// Initialize GLFW, which is used to create a window // Initialize GLFW, which is used to create a window
if (!glfwInit()) { if (!glfwInit()) {
std::cerr << "Failed to initialize GLFW" << std::endl; 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) // 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) { if (!window) {
std::cerr << "Failed to create GLFW window" << std::endl; std::cerr << "Failed to create GLFW window" << std::endl;
glfwTerminate(); glfwTerminate();
return NULL; return false;
} }
// Make the OpenGL context current // Make the OpenGL context current
@ -34,7 +34,7 @@ bool GpuParticleSystem::InitGL() {
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) { if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) {
std::cerr << "Failed to initialized GLAD" << std::endl; std::cerr << "Failed to initialized GLAD" << std::endl;
glfwTerminate(); glfwTerminate();
return NULL; return false;
} }
// Enable depth testing in OpenGL // Enable depth testing in OpenGL
@ -67,6 +67,8 @@ bool GpuParticleSystem::InitGL() {
// we need to pass data (positions and velocities) to the vertex shader, // we need to pass data (positions and velocities) to the vertex shader,
// so we'll use VBOs for this. // so we'll use VBOs for this.
glGenBuffers(2, VBOs); glGenBuffers(2, VBOs);
return true;
} }
void GpuParticleSystem::InitPosVel() { void GpuParticleSystem::InitPosVel() {

View file

@ -13,7 +13,7 @@ bool GpuPerlinNoise::InitGL() {
// Initialize GLFW, which is used to create a window // Initialize GLFW, which is used to create a window
if (!glfwInit()) { if (!glfwInit()) {
std::cerr << "Failed to initialize GLFW" << std::endl; 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) // 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) { if (!window) {
std::cerr << "Failed to create GLFW window" << std::endl; std::cerr << "Failed to create GLFW window" << std::endl;
glfwTerminate(); glfwTerminate();
return NULL; return false;
} }
// Make the OpenGL context current // Make the OpenGL context current
@ -37,7 +37,7 @@ bool GpuPerlinNoise::InitGL() {
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) { if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) {
std::cerr << "Failed to initialized GLAD" << std::endl; std::cerr << "Failed to initialized GLAD" << std::endl;
glfwTerminate(); glfwTerminate();
return NULL; return false;
} }
// Enable depth testing in OpenGL // Enable depth testing in OpenGL