Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ bin
bin-int
compile_commands
FluidSim.make
Triton.make
compile_commands.json
Makefile
.cache
*.vcxproj.*
*.vcxproj
*.sln
.vs
Models
Models
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,29 @@ This project implements a real-time fluid simulation using Vulkan compute shader

3. **Compile shaders:**
```bash
# from project root
cd Triton
./compile.sh
premake5 gmake
make
cd ..
```

4. **Build the project:**
```bash
mkdir build
cd build
cmake ..
# from project root
./compile.sh
premake5 gmake
make
run.sh
```

## Usage

Run the compiled binary from the `build` directory:
Run the compiled binary using the run script

```bash
./FluidSim
./run.sh
```

## Code Structure
Expand Down
Empty file modified Triton/compile.sh
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion Triton/src/uniformBuffers/uniformBuffers.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <Triton/Triton.hpp>
#include <chrono>
#include <cstring>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#define GLM_FORCE_LEFT_HANDED
Expand Down Expand Up @@ -187,4 +188,4 @@ namespace Triton {
}

}
}
}
Empty file modified compile.sh
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions include/core/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace Core {
void createComputeDescriptorSets();
void createComputeUniformBuffers();

std::vector<char> FluidSim::readFile(const std::string& filename);
std::vector<char> readFile(const std::string& filename);
void createAllComputePipelines();
void destroyAllComputePipelines();
void createComputePipeline();
Expand Down Expand Up @@ -85,7 +85,7 @@ namespace Core {

glm::vec2 mousePos = { 0,0 };

std::chrono::steady_clock::time_point prevTime = std::chrono::high_resolution_clock::now();
std::chrono::high_resolution_clock::time_point prevTime = std::chrono::high_resolution_clock::now();

FluidSim() = default;

Expand All @@ -95,4 +95,4 @@ namespace Core {
};
}

#endif
#endif
5 changes: 5 additions & 0 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@ workspace "FluidSimulation"
includedirs {
"include", -- Project headers (core/, renderer/)
"vendor",
"Triton/include"
}

-- Link system-installed libraries (e.g., GLFW, OpenGL, GLEW)
filter "system:linux"
links {
"vulkan",
"glfw", -- GLFW
"Triton"
}
libdirs {
"Triton/bin/" .. outputdir .. "/Triton"
}
defines { "PLATFORM_LINUX" }

Expand Down
Empty file modified run.sh
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion src/core/ComputeTexture.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <core/ComputeTexture.hpp>
#include <glm/glm.hpp>
#include <cstring>
#include <algorithm>

namespace Core {
Expand Down Expand Up @@ -105,4 +106,4 @@ namespace Core {
vkDestroyImage(*m_device, m_image, nullptr);
vkFreeMemory(*m_device, m_memoryRequirements, nullptr);
}
}
}
3 changes: 2 additions & 1 deletion src/core/core.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <core/core.hpp>
#include <core/UniformBufferObjects.hpp>
#include <cstring>
#include <iostream>
#include <fstream>
#include <array>
Expand Down Expand Up @@ -575,4 +576,4 @@ namespace Core {


}
}
}