Commit 29f182c6 authored by Nor-s's avatar Nor-s
Browse files

Add vkcpp for rendering

parent 31133dbd
No related merge requests found
Showing with 9612 additions and 0 deletions
+9612 -0
cmake_minimum_required(VERSION 3.21)
message("Using CMake version ${CMAKE_VERSION}")
project(
hand-window
LANGUAGES CXX
VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)
message(STATUS "Compiler")
message(STATUS " - ID \t: ${CMAKE_CXX_COMPILER_ID}")
message(STATUS " - Version \t: ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS " - Path \t: ${CMAKE_CXX_COMPILER}")
add_subdirectory(src)
add_subdirectory(test)
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
pushd "%~dp0"
C:\VulkanSDK\1.2.189.2\Bin\glslc.exe fs_default.frag -o fs_default.spv
C:\VulkanSDK\1.2.189.2\Bin\glslc.exe vs_default.vert -o vs_default.spv
\ No newline at end of file
#version 450
layout(binding=1)uniform sampler2D texSampler;
layout(location=0)in vec3 fragColor;
layout(location=1)in vec2 fragTexCoord;
layout(location=2)in vec4 uboColor;
layout(location=0)out vec4 outColor;
void main(){
vec4 sampleColor=texture(texSampler,fragTexCoord);
outColor=sampleColor*uboColor;
}
\ No newline at end of file
File added
File added
#version 450
layout(binding=0)uniform UniformBufferObject{
mat4 model;
mat4 view;
mat4 proj;
vec4 color;
}ubo;
layout(location=0)in vec2 inPosition;
layout(location=1)in vec3 inColor;
layout(location=2)in vec2 inTexCoord;
layout(location=0)out vec3 fragColor;
layout(location=1)out vec2 fragTexCoord;
layout(location=2)out vec4 uboColor;
void main(){
gl_Position=ubo.proj*ubo.view*ubo.model*vec4(inPosition,0.,1.);
fragColor=inColor;
fragTexCoord=inTexCoord;//vec2(1-inTexCoord.x,1.-inTexCoord.y);
uboColor=ubo.color;
}
\ No newline at end of file
File added
resources/textures/brushes/1.png

104 KB

resources/textures/brushes/10.png

359 KB

resources/textures/brushes/2.png

310 KB

resources/textures/brushes/3.png

104 KB

resources/textures/brushes/4.png

66.7 KB

resources/textures/brushes/5.png

97.6 KB

resources/textures/brushes/6.png

94.1 KB

resources/textures/brushes/7.png

149 KB

resources/textures/brushes/8.png

212 KB

resources/textures/brushes/9.png

105 KB

resources/textures/img.jpg

73.8 KB

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment