Commit 2f73ea25 authored by Philip Trettner's avatar Philip Trettner

switched to tg

parent af92e00d
#pragma once
// including only vec4.hpp or only glm.hpp and so on does not work for alignment!
// for whatever reason :(
#include <glm/ext.hpp>
#include <glm/fwd.hpp>
#include <glm/glm.hpp>
#ifdef GLOW_HAS_TG
#include <typed-geometry/tg-lean.hh>
#endif
#include <cstdint>
......@@ -130,57 +128,110 @@ GLOW_STD140_AUTO_TYPE(bool, bool, 1);
GLOW_STD140_AUTO_TYPE(float, float, 1);
GLOW_STD140_AUTO_TYPE(double, double, 2);
// vectors
GLOW_STD140_AUTO_TYPE(vec2, glm::vec2, 2);
GLOW_STD140_AUTO_TYPE(vec3, glm::vec3, 4);
GLOW_STD140_AUTO_TYPE(vec4, glm::vec4, 4);
// comp-like
GLOW_STD140_AUTO_TYPE(vec2, tg::vec2, 2);
GLOW_STD140_AUTO_TYPE(vec3, tg::vec3, 4);
GLOW_STD140_AUTO_TYPE(vec4, tg::vec4, 4);
GLOW_STD140_EXPLICIT_TYPE(bvec2, glm::bvec2, glm::ivec2, 2);
GLOW_STD140_EXPLICIT_TYPE(bvec3, glm::bvec3, glm::ivec3, 4);
GLOW_STD140_EXPLICIT_TYPE(bvec4, glm::bvec4, glm::ivec4, 4);
GLOW_STD140_AUTO_TYPE(ivec2, tg::ivec2, 2);
GLOW_STD140_AUTO_TYPE(ivec3, tg::ivec3, 4);
GLOW_STD140_AUTO_TYPE(ivec4, tg::ivec4, 4);
GLOW_STD140_AUTO_TYPE(ivec2, glm::ivec2, 2);
GLOW_STD140_AUTO_TYPE(ivec3, glm::ivec3, 4);
GLOW_STD140_AUTO_TYPE(ivec4, glm::ivec4, 4);
GLOW_STD140_AUTO_TYPE(uvec2, tg::uvec2, 2);
GLOW_STD140_AUTO_TYPE(uvec3, tg::uvec3, 4);
GLOW_STD140_AUTO_TYPE(uvec4, tg::uvec4, 4);
GLOW_STD140_AUTO_TYPE(uvec2, glm::uvec2, 2);
GLOW_STD140_AUTO_TYPE(uvec3, glm::uvec3, 4);
GLOW_STD140_AUTO_TYPE(uvec4, glm::uvec4, 4);
GLOW_STD140_AUTO_TYPE(dvec2, tg::dvec2, 2 * 2);
GLOW_STD140_AUTO_TYPE(dvec3, tg::dvec3, 4 * 2);
GLOW_STD140_AUTO_TYPE(dvec4, tg::dvec4, 4 * 2);
GLOW_STD140_AUTO_TYPE(dir2, tg::dir2, 2);
GLOW_STD140_AUTO_TYPE(dir3, tg::dir3, 4);
GLOW_STD140_AUTO_TYPE(dir4, tg::dir4, 4);
GLOW_STD140_AUTO_TYPE(idir2, tg::idir2, 2);
GLOW_STD140_AUTO_TYPE(idir3, tg::idir3, 4);
GLOW_STD140_AUTO_TYPE(idir4, tg::idir4, 4);
GLOW_STD140_AUTO_TYPE(ddir2, tg::ddir2, 2 * 2);
GLOW_STD140_AUTO_TYPE(ddir3, tg::ddir3, 4 * 2);
GLOW_STD140_AUTO_TYPE(ddir4, tg::ddir4, 4 * 2);
GLOW_STD140_AUTO_TYPE(pos2, tg::pos2, 2);
GLOW_STD140_AUTO_TYPE(pos3, tg::pos3, 4);
GLOW_STD140_AUTO_TYPE(pos4, tg::pos4, 4);
GLOW_STD140_AUTO_TYPE(ipos2, tg::ipos2, 2);
GLOW_STD140_AUTO_TYPE(ipos3, tg::ipos3, 4);
GLOW_STD140_AUTO_TYPE(ipos4, tg::ipos4, 4);
GLOW_STD140_AUTO_TYPE(upos2, tg::upos2, 2);
GLOW_STD140_AUTO_TYPE(upos3, tg::upos3, 4);
GLOW_STD140_AUTO_TYPE(upos4, tg::upos4, 4);
GLOW_STD140_AUTO_TYPE(dpos2, tg::dpos2, 2 * 2);
GLOW_STD140_AUTO_TYPE(dpos3, tg::dpos3, 4 * 2);
GLOW_STD140_AUTO_TYPE(dpos4, tg::dpos4, 4 * 2);
GLOW_STD140_AUTO_TYPE(comp2, tg::comp2, 2);
GLOW_STD140_AUTO_TYPE(comp3, tg::comp3, 4);
GLOW_STD140_AUTO_TYPE(comp4, tg::comp4, 4);
GLOW_STD140_AUTO_TYPE(icomp2, tg::icomp2, 2);
GLOW_STD140_AUTO_TYPE(icomp3, tg::icomp3, 4);
GLOW_STD140_AUTO_TYPE(icomp4, tg::icomp4, 4);
GLOW_STD140_AUTO_TYPE(ucomp2, tg::ucomp2, 2);
GLOW_STD140_AUTO_TYPE(ucomp3, tg::ucomp3, 4);
GLOW_STD140_AUTO_TYPE(ucomp4, tg::ucomp4, 4);
GLOW_STD140_AUTO_TYPE(dcomp2, tg::dcomp2, 2 * 2);
GLOW_STD140_AUTO_TYPE(dcomp3, tg::dcomp3, 4 * 2);
GLOW_STD140_AUTO_TYPE(dcomp4, tg::dcomp4, 4 * 2);
GLOW_STD140_AUTO_TYPE(size2, tg::size2, 2);
GLOW_STD140_AUTO_TYPE(size3, tg::size3, 4);
GLOW_STD140_AUTO_TYPE(size4, tg::size4, 4);
GLOW_STD140_AUTO_TYPE(isize2, tg::isize2, 2);
GLOW_STD140_AUTO_TYPE(isize3, tg::isize3, 4);
GLOW_STD140_AUTO_TYPE(isize4, tg::isize4, 4);
GLOW_STD140_AUTO_TYPE(usize2, tg::usize2, 2);
GLOW_STD140_AUTO_TYPE(usize3, tg::usize3, 4);
GLOW_STD140_AUTO_TYPE(usize4, tg::usize4, 4);
GLOW_STD140_AUTO_TYPE(dsize2, tg::dsize2, 2 * 2);
GLOW_STD140_AUTO_TYPE(dsize3, tg::dsize3, 4 * 2);
GLOW_STD140_AUTO_TYPE(dsize4, tg::dsize4, 4 * 2);
GLOW_STD140_AUTO_TYPE(color3, tg::color3, 4);
GLOW_STD140_AUTO_TYPE(color4, tg::color4, 4);
GLOW_STD140_AUTO_TYPE(dvec2, glm::dvec2, 2 * 2);
GLOW_STD140_AUTO_TYPE(dvec3, glm::dvec3, 4 * 2);
GLOW_STD140_AUTO_TYPE(dvec4, glm::dvec4, 4 * 2);
// matrices
GLOW_STD140_EXPLICIT_TYPE(mat2, glm::mat2, glm::mat2x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat3, glm::mat3, glm::mat3x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat4, glm::mat4, glm::mat4x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat4, tg::mat4, tg::mat4x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat2x2, glm::mat2x2, glm::mat2x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat2x3, glm::mat2x3, glm::mat2x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat2x4, glm::mat2x4, glm::mat2x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat2x4, tg::mat2x4, tg::mat2x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat3x2, glm::mat3x2, glm::mat3x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat3x3, glm::mat3x3, glm::mat3x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat3x4, glm::mat3x4, glm::mat3x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat3x4, tg::mat3x4, tg::mat3x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat4x2, glm::mat4x2, glm::mat4x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat4x3, glm::mat4x3, glm::mat4x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat4x4, glm::mat4x4, glm::mat4x4, 4);
GLOW_STD140_EXPLICIT_TYPE(mat4x4, tg::mat4x4, tg::mat4x4, 4);
GLOW_STD140_EXPLICIT_TYPE(dmat2, glm::dmat2, glm::dmat2x2, 2 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat3, glm::dmat3, glm::dmat3x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat4, glm::dmat4, glm::dmat4x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat2, tg::dmat2, tg::dmat2x2, 2 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat4, tg::dmat4, tg::dmat4x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat2x2, glm::dmat2x2, glm::dmat2x2, 2 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat2x3, glm::dmat2x3, glm::dmat2x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat2x4, glm::dmat2x4, glm::dmat2x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat2x2, tg::dmat2x2, tg::dmat2x2, 2 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat2x4, tg::dmat2x4, tg::dmat2x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat3x2, glm::dmat3x2, glm::dmat3x2, 2 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat3x3, glm::dmat3x3, glm::dmat3x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat3x4, glm::dmat3x4, glm::dmat3x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat3x2, tg::dmat3x2, tg::dmat3x2, 2 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat3x4, tg::dmat3x4, tg::dmat3x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat4x2, glm::dmat4x2, glm::dmat4x2, 2 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat4x3, glm::dmat4x3, glm::dmat4x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat4x4, glm::dmat4x4, glm::dmat4x4, 4 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat4x2, tg::dmat4x2, tg::dmat4x2, 2 * 2);
GLOW_STD140_EXPLICIT_TYPE(dmat4x4, tg::dmat4x4, tg::dmat4x4, 4 * 2);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment