8#ifndef GALAXY_GRAPHICS_GL_VERTEX_HPP_
9#define GALAXY_GRAPHICS_GL_VERTEX_HPP_
13#include <glm/vec2.hpp>
15#include "galaxy/meta/Memory.hpp"
64 template<meta::is_arithmetic Type>
68 return static_cast<float>(x) / width;
81 template<meta::is_arithmetic Type>
85 return static_cast<float>(y) / height;
std::array< Vertex, 4 > gen_quad_vertices(const float width, const float height)
Generate some default verticies.
float map_y_texel(const Type y, const float height)
Takes in a y positon texture coord and maps it to a texel.
float map_x_texel(const Type x, const float width)
Takes in a x positon texture coord and maps it to a texel.
std::array< unsigned int, 6 > gen_default_indices()
Generate some default indicies.
Represents a single vertex point.
glm::vec2 m_pos
Position..
glm::vec2 m_texels
Texture coords.