8#ifndef GALAXY_GRAPHICS_GL_VERTEX_HPP_
9#define GALAXY_GRAPHICS_GL_VERTEX_HPP_
13#include <glm/vec2.hpp>
14#include <glm/vec3.hpp>
52 std::vector<Vertex>
gen_quad_vertices(
const float width,
const float height,
float depth)
noexcept;
71 template<meta::is_arithmetic Type>
73 inline float map_x_texel(
const Type x,
const float width)
noexcept
75 return static_cast<float>(x) / width;
88 template<meta::is_arithmetic Type>
90 inline float map_y_texel(
const Type y,
const float height)
noexcept
92 return static_cast<float>(y) / height;
std::vector< Vertex > gen_quad_vertices(const float width, const float height, float depth) noexcept
Generate some default verticies.
std::vector< unsigned int > gen_default_indices() noexcept
Generate some default indices.
float map_y_texel(const Type y, const float height) noexcept
Takes in a y positon texture coord and maps it to a texel.
float map_x_texel(const Type x, const float width) noexcept
Takes in a x positon texture coord and maps it to a texel.
Represents a single vertex point.
glm::vec2 m_texels
Texture coords (uv).
unsigned int m_index
Uniform data index.