Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TSBK03 project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adam Nyberg
TSBK03 project
Commits
868d6f22
Commit
868d6f22
authored
5 months ago
by
Adam Nyberg
Browse files
Options
Downloads
Patches
Plain Diff
Changed from freeGlut to MicroGlut in main
parent
6d9e21af
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/CMakeLists.txt
+1
-0
1 addition, 0 deletions
src/CMakeLists.txt
src/Camera.h
+2
-1
2 additions, 1 deletion
src/Camera.h
src/main.cpp
+6
-4
6 additions, 4 deletions
src/main.cpp
with
9 additions
and
5 deletions
src/CMakeLists.txt
+
1
−
0
View file @
868d6f22
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/Camera.h
+
2
−
1
View file @
868d6f22
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
src/main.cpp
+
6
−
4
View file @
868d6f22
...
...
@@ -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
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment