Updated vulkan application to be containerised
This commit is contained in:
parent
56d153ab23
commit
eca506a521
3 changed files with 29 additions and 2 deletions
12
Dockerfile
Normal file
12
Dockerfile
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
FROM nvidia/vulkan:1.1.121
|
||||
|
||||
RUN apt update -y
|
||||
RUN apt install g++ -y
|
||||
|
||||
RUN mkdir /workspace
|
||||
WORKDIR /workspace
|
||||
|
||||
COPY . /workspace
|
||||
|
||||
RUN make build_linux
|
||||
|
||||
17
Makefile
17
Makefile
|
|
@ -23,9 +23,24 @@ build: build_shaders
|
|||
-lvulkan-1 \
|
||||
-o ./bin/main.exe
|
||||
|
||||
build_linux:
|
||||
g++ \
|
||||
-Wall \
|
||||
src/* \
|
||||
-std=c++11 \
|
||||
-I"./src" \
|
||||
-lvulkan \
|
||||
-o ./bin/main
|
||||
|
||||
build_shaders:
|
||||
$(SCMP) -V shaders/glsl/computeheadless.comp -o shaders/glsl/computeheadless.comp.spv
|
||||
|
||||
build_docker:
|
||||
docker build . -t axsauze/vulkan-sum:0.1
|
||||
|
||||
push_docker:
|
||||
docker push axsauze/vulkan-sum:0.1
|
||||
|
||||
format:
|
||||
$(CF) -i -style="{BasedOnStyle: mozilla, IndentWidth: 4}" src/*.cpp src/*.h src/*.hpp
|
||||
|
||||
|
|
@ -33,5 +48,5 @@ clean:
|
|||
rm ./bin/main.exe;
|
||||
|
||||
run:
|
||||
cd bin && ./main.exe;
|
||||
./bin/main.exe;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ getAssetPath()
|
|||
#if defined(VK_EXAMPLE_DATA_DIR)
|
||||
return VK_EXAMPLE_DATA_DIR;
|
||||
#else
|
||||
return "./../";
|
||||
return "./";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue