std140 implementation
This commit is contained in:
30
include/opengl/types.hpp
Normal file
30
include/opengl/types.hpp
Normal 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...>;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user