diff --git a/MshViewer/Source/import.cpp b/MshViewer/Source/import.cpp index fbb3d64..1839636 100644 --- a/MshViewer/Source/import.cpp +++ b/MshViewer/Source/import.cpp @@ -7,42 +7,42 @@ std::vector loadData() { return std::vector( { - -1.0f, -1.0f, -1.0f, - -1.0f, -1.0f, 1.0f, - -1.0f, 1.0f, 1.0f, - 1.0f, 1.0f, -1.0f, - -1.0f, -1.0f, -1.0f, - -1.0f, 1.0f, -1.0f, - 1.0f, -1.0f, 1.0f, - -1.0f, -1.0f, -1.0f, - 1.0f, -1.0f, -1.0f, - 1.0f, 1.0f, -1.0f, - 1.0f, -1.0f, -1.0f, - -1.0f, -1.0f, -1.0f, - -1.0f, -1.0f, -1.0f, - -1.0f, 1.0f, 1.0f, - -1.0f, 1.0f, -1.0f, - 1.0f, -1.0f, 1.0f, - -1.0f, -1.0f, 1.0f, - -1.0f, -1.0f, -1.0f, - -1.0f, 1.0f, 1.0f, - -1.0f, -1.0f, 1.0f, - 1.0f, -1.0f, 1.0f, - 1.0f, 1.0f, 1.0f, - 1.0f, -1.0f, -1.0f, - 1.0f, 1.0f, -1.0f, - 1.0f, -1.0f, -1.0f, - 1.0f, 1.0f, 1.0f, - 1.0f, -1.0f, 1.0f, - 1.0f, 1.0f, 1.0f, - 1.0f, 1.0f, -1.0f, - -1.0f, 1.0f, -1.0f, - 1.0f, 1.0f, 1.0f, - -1.0f, 1.0f, -1.0f, - -1.0f, 1.0f, 1.0f, - 1.0f, 1.0f, 1.0f, - -1.0f, 1.0f, 1.0f, - 1.0f, -1.0f, 1.0f + -1.0f, -1.0f, -1.0f, //H5 + -1.0f, -1.0f, 1.0f, //H8 + -1.0f, 1.0f, 1.0f, //H7 + 1.0f, 1.0f, -1.0f, //U2 + -1.0f, -1.0f, -1.0f, //U5 + -1.0f, 1.0f, -1.0f, //U6 + 1.0f, -1.0f, 1.0f, //L4 + -1.0f, -1.0f, -1.0f, //L5 + 1.0f, -1.0f, -1.0f, //L1 + 1.0f, 1.0f, -1.0f, //U2 + 1.0f, -1.0f, -1.0f, //U1 + -1.0f, -1.0f, -1.0f, //U5 + -1.0f, -1.0f, -1.0f, //H5 + -1.0f, 1.0f, 1.0f, //H7 + -1.0f, 1.0f, -1.0f, //H6 + 1.0f, -1.0f, 1.0f, //L4 + -1.0f, -1.0f, 1.0f, //L8 + -1.0f, -1.0f, -1.0f, //L5 + -1.0f, 1.0f, 1.0f, //O7 + -1.0f, -1.0f, 1.0f, //O8 + 1.0f, -1.0f, 1.0f, //O4 + 1.0f, 1.0f, 1.0f, //V3 + 1.0f, -1.0f, -1.0f, //V1 + 1.0f, 1.0f, -1.0f, //V2 + 1.0f, -1.0f, -1.0f, //V1 + 1.0f, 1.0f, 1.0f, //V3 + 1.0f, -1.0f, 1.0f, //V4 + 1.0f, 1.0f, 1.0f, //R3 + 1.0f, 1.0f, -1.0f, //R2 + -1.0f, 1.0f, -1.0f, //R6 + 1.0f, 1.0f, 1.0f, //R3 + -1.0f, 1.0f, -1.0f, //R6 + -1.0f, 1.0f, 1.0f, //R7 + 1.0f, 1.0f, 1.0f, //O3 + -1.0f, 1.0f, 1.0f, //O7 + 1.0f, -1.0f, 1.0f //O4 } ); } @@ -51,42 +51,42 @@ std::vector loadUV() { return std::vector( { - 0.000059f, 1.0f - 0.000004f, - 0.000103f, 1.0f - 0.336048f, - 0.335973f, 1.0f - 0.335903f, - 1.000023f, 1.0f - 0.000013f, - 0.667979f, 1.0f - 0.335851f, - 0.999958f, 1.0f - 0.336064f, - 0.667979f, 1.0f - 0.335851f, - 0.336024f, 1.0f - 0.671877f, - 0.667969f, 1.0f - 0.671889f, - 1.000023f, 1.0f - 0.000013f, - 0.668104f, 1.0f - 0.000013f, - 0.667979f, 1.0f - 0.335851f, - 0.000059f, 1.0f - 0.000004f, - 0.335973f, 1.0f - 0.335903f, - 0.336098f, 1.0f - 0.000071f, - 0.667979f, 1.0f - 0.335851f, - 0.335973f, 1.0f - 0.335903f, - 0.336024f, 1.0f - 0.671877f, - 1.000004f, 1.0f - 0.671847f, - 0.999958f, 1.0f - 0.336064f, - 0.667979f, 1.0f - 0.335851f, - 0.668104f, 1.0f - 0.000013f, - 0.335973f, 1.0f - 0.335903f, - 0.667979f, 1.0f - 0.335851f, - 0.335973f, 1.0f - 0.335903f, - 0.668104f, 1.0f - 0.000013f, - 0.336098f, 1.0f - 0.000071f, - 0.000103f, 1.0f - 0.336048f, - 0.000004f, 1.0f - 0.671870f, - 0.336024f, 1.0f - 0.671877f, - 0.000103f, 1.0f - 0.336048f, - 0.336024f, 1.0f - 0.671877f, - 0.335973f, 1.0f - 0.335903f, - 0.667969f, 1.0f - 0.671889f, - 1.000004f, 1.0f - 0.671847f, - 0.667979f, 1.0f - 0.335851f + 0.0f, 0.0f,//587 Links + 1.0f, 0.0f, + 1.0f, 1.0f, + 0.0f, 1.0f,//256 Hinten + 1.0f, 0.0f, + 1.0f, 1.0f, + 1.0f, 1.0f,//451 Unten + 0.0f, 0.0f, + 1.0f, 0.0f, + 0.0f, 1.0f,//215 Hinten + 0.0f, 0.0f, + 1.0f, 0.0f, + 0.0f, 0.0f,//576 Links + 1.0f, 1.0f, + 0.0f, 1.0f, + 1.0f, 1.0f,//485 Unten + 0.0f, 1.0f, + 0.0f, 0.0f, + 0.0f, 1.0f,//784 Front + 0.0f, 0.0f, + 1.0f, 0.0f, + 0.0f, 1.0f,//312 Rechts + 1.0f, 0.0f, + 1.0f, 1.0f, + 1.0f, 0.0f,//134 Rechts + 0.0f, 1.0f, + 0.0f, 0.0f, + 1.0f, 0.0f,//326 Oben + 1.0f, 1.0f, + 0.0f, 1.0f, + 1.0f, 0.0f,//367 Oben + 0.0f, 1.0f, + 0.0f, 0.0f, + 1.0f, 1.0f,//374 Front + 0.0f, 1.0f, + 1.0f, 0.0f } ); } diff --git a/Release/MshViewer.exe b/Release/MshViewer.exe new file mode 100644 index 0000000..88a65c0 Binary files /dev/null and b/Release/MshViewer.exe differ diff --git a/Release/Shader/FragmentTextureShader.mv2shdr b/Release/Shader/FragmentTextureShader.mv2shdr new file mode 100644 index 0000000..2ed0112 --- /dev/null +++ b/Release/Shader/FragmentTextureShader.mv2shdr @@ -0,0 +1,14 @@ +#version 450 core + +// Input +in vec2 UV; + +// Ouput data +out vec3 color; + +uniform sampler2D textureSampler; + +void main() +{ + color = texture(textureSampler, UV).rgb; +} \ No newline at end of file diff --git a/Release/Shader/VertexTextureShader.mv2shdr b/Release/Shader/VertexTextureShader.mv2shdr new file mode 100644 index 0000000..5776ae8 --- /dev/null +++ b/Release/Shader/VertexTextureShader.mv2shdr @@ -0,0 +1,20 @@ +#version 450 core + +// Input vertex data, different for all executions of this shader. +layout(location = 0) in vec3 vertexPosition_modelspace; +layout(location = 1) in vec2 vertexUV; + +// Output +out vec2 UV; + +// Values that stay constant for the whole mesh. +uniform mat4 MVP; + +void main(){ + + // Output position of the vertex, in clip space : MVP * position + gl_Position = MVP * vec4(vertexPosition_modelspace,1); + + UV = vertexUV; + +} diff --git a/Release/Textures/texture32R.tga b/Release/Textures/texture32R.tga new file mode 100644 index 0000000..6b996ed Binary files /dev/null and b/Release/Textures/texture32R.tga differ diff --git a/Release/glew32.dll b/Release/glew32.dll new file mode 100644 index 0000000..8a49a3b Binary files /dev/null and b/Release/glew32.dll differ diff --git a/Release/glfw3.dll b/Release/glfw3.dll new file mode 100644 index 0000000..ebf2933 Binary files /dev/null and b/Release/glfw3.dll differ