std140 implementation

This commit is contained in:
ZY4N
2025-03-27 19:47:32 +01:00
parent 70893c083b
commit 6f60cc11c8
45 changed files with 789 additions and 234 deletions

30
include/opengl/types.hpp Normal file
View File

@@ -0,0 +1,30 @@
#pragma once
#include <tuple>
#include <array>
#include "glm/gtc/type_aligned.hpp"
namespace zgl
{
template <typename T>
concept scalar = (
std::is_same_v<T, float> or
std::is_same_v<T, int> or
std::is_same_v<T, unsigned int> or
std::is_same_v<T, bool>
);
template<glm::length_t L, typename T>
using vec = glm::vec<L, T, glm::packed_highp>;
template<glm::length_t C, glm::length_t R, typename T>
using mat = glm::mat<C, R, T, glm::packed_highp>;
template<typename T, std::size_t Count>
using array = std::array<T, Count>;
template<typename... Ts>
using structure = std::tuple<Ts...>;
}