From 00855b2efc85120f2ca2afa6a415d77cfe864279 Mon Sep 17 00:00:00 2001 From: Krzysztof Rudnicki Date: Sun, 5 Mar 2023 18:11:48 +0100 Subject: [PATCH] feat: add texture coordinates --- Engine/engine/constants.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Engine/engine/constants.hpp b/Engine/engine/constants.hpp index c1b298f..10662c8 100644 --- a/Engine/engine/constants.hpp +++ b/Engine/engine/constants.hpp @@ -137,8 +137,6 @@ namespace constants "./Shaders/fragmentShaderSource.fs" }; - - inline const char *FRAGMENT_SHADER_SOURCE_YELLOW { "#version 330 core\n" "out vec4 FragColor;\n" @@ -203,7 +201,6 @@ namespace constants inline constexpr size_t TRIANGLE_COLORS_SIZE = { sizeof(TRIANGLE_COLORS) }; - // compare with square done with only vertices: /* float vertices[] = { @@ -236,6 +233,13 @@ namespace constants inline constexpr int MAX_DRAW_CALL = { 10 }; + // https://learnopengl.com/img/getting-started/tex_coords.png + inline constexpr float TEXTURE_COORDINATES[] { + 0.0f, 0.0f, // lower-left corner + 1.0f, 0.0f, // lower-right corner + 0.5f, 1.0f // top-center corner + }; + } #endif \ No newline at end of file