8#ifndef GALAXY_GRAPHICS_GL_VERTEX_HPP_
9#define GALAXY_GRAPHICS_GL_VERTEX_HPP_
13#include <glm/vec2.hpp>
45 std::array<Vertex, 4>
gen_quad_vertices(
const float width,
const float height)
noexcept;
64 template<meta::is_arithmetic Type>
66 inline float map_x_texel(
const Type x,
const float width)
noexcept
68 return static_cast<float>(x) / width;
81 template<meta::is_arithmetic Type>
83 inline float map_y_texel(
const Type y,
const float height)
noexcept
85 return static_cast<float>(y) / height;
float map_y_texel(const Type y, const float height) noexcept
Takes in a y positon texture coord and maps it to a texel.
std::array< Vertex, 4 > gen_quad_vertices(const float width, const float height) noexcept
Generate some default verticies.
std::array< unsigned int, 6 > gen_default_indices() noexcept
Generate some default indicies.
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).