Skip to content
Snippets Groups Projects
Commit 868d6f22 authored by Adam Nyberg's avatar Adam Nyberg
Browse files

Changed from freeGlut to MicroGlut in main

parent 6d9e21af
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,7 @@ target_include_directories(common_lib PUBLIC
${GLUT_INCLUDE_DIRS}
${GLEW_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../common # Common directory
${CMAKE_CURRENT_SOURCE_DIR}/../common/Linux/
)
# Link necessary libraries to the common library
......
......@@ -3,7 +3,8 @@
#define CAMERA_H
#include "VectorUtils4.h" // Assuming this defines vec3, mat4, etc.
#include <GL/glut.h>
#include "MicroGlut.h"
//#include <GL/glut.h>
// Camera class encapsulating all camera-related data and methods
class Camera {
......
......@@ -9,8 +9,9 @@
#include <chrono>
#include <cstdlib> // For exit()
#include <GL/glew.h>
#include <GL/freeglut.h>
//#include <GL/glew.h>
//#include <GL/freeglut.h>
#include "MicroGlut.h"
#include "GL_utilities.h"
#include "PCISPH_sim.h" // Header for CUDA function declarations
......@@ -92,12 +93,12 @@ void renderBorder()
(void*)0 // Offset to the position data
);
glBindBuffer(GL_ARRAY_BUFFER, 0);
// Draw boundary particles as points
glDrawArrays(GL_POINTS, 0, NUM_BOUNDARY_PARTICLES);
// Disable vertex attribute
glDisableVertexAttribArray(positionAttribLoc);
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
......@@ -119,12 +120,13 @@ void renderFluid()
(void*)0 // Offset to the position data
);
glBindBuffer(GL_ARRAY_BUFFER, 0);
// Draw fluid particles as points
glDrawArrays(GL_POINTS, 0, NUM_PARTICLES);
// Disable vertex attribute
glDisableVertexAttribArray(positionAttribLoc);
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment