GLSL Struct 1.4.0
glslstruct
Loading...
Searching...
No Matches
Utilities

group with utilities (not for end user to use) More...

Collaboration diagram for Utilities:

Concepts

concept  glslstruct::utils::has_layout_traits_context
 Checks if a type T provides a nested 'context_type'.
concept  glslstruct::utils::layout_traits_get_alignment
 Validates that T provides mandatory alignment calculation methods.
concept  glslstruct::utils::layout_traits_before_add
 Validates optional "before_add" hooks.
concept  glslstruct::utils::layout_traits_after_add
 Validates optional "after_add" hooks.
concept  glslstruct::utils::has_ubo_pattern
 concept for check if layout can be used as ubo
concept  glslstruct::utils::has_ssbo_pattern
 concept for check if layout can be used as ssbo
concept  glslstruct::utils::glsl_layout
 check if type is glsl layout
concept  glslstruct::utils::glsl_simple_or_layout
 check if type is glsl layout or glsl simple
concept  glslstruct::utils::glsl_simple
 check if type is glsl simple (is of scalar or vec or mat type)
concept  glslstruct::utils::glsl_simples_array
 check if type is array of glsl simple (scalar or vec or mat type)
concept  glslstruct::utils::glsl_simples_static_size_array
 check if type is static size array of glsl simple (scalar or vec or mat type)
concept  glslstruct::utils::glsl_struct
 check if type is glsl struct
concept  glslstruct::utils::glsl_structs_array
 check if type is array of glsl structs
concept  glslstruct::utils::glsl_layout_struct
 check if type is glsl struct with required layout
concept  glslstruct::utils::glsl_layout_structs_array
 check if type is array of glsl structs with required layout
concept  glslstruct::utils::glsl_simple_or_layout_struct
 check if type is glsl struct with required layout or simple type
concept  glslstruct::utils::glsl_simple_or_struct
 check if type is glsl struct or simple type
concept  glslstruct::utils::glsl_type
 check if T is glsl type (not base_type container but derived from base_type container)
concept  glslstruct::utils::glsl_base_type
 check if T is base_type container
concept  glslstruct::utils::glsl_mat
 Concept defining which type can be converted to glsl mat type.
concept  glslstruct::utils::glsl_mats_array
 Concept which is true if type V is array of types that passes is_glsl_mat test.
concept  glslstruct::utils::glsl_mats_static_size_array
 Concept which is true if type V is static size array of types that passes is_glsl_mat test.
concept  glslstruct::utils::glsl_scalar
 Concept defining which type can be converted to glsl scalar type.
concept  glslstruct::utils::glsl_scalars_array
 Concept which is true if type V is array of types that passes is_glsl_scalar test.
concept  glslstruct::utils::glsl_scalars_static_size_array
 Concept which is true if type V is static size array of types that passes is_glsl_scalar test.
concept  glslstruct::utils::glsl_vec
 Concept defining which type can be converted to glsl vec type.
concept  glslstruct::utils::glsl_vecs_array
 Concept which is true if type V is array of types that passes is_glsl_vec test.
concept  glslstruct::utils::glsl_vecs_static_size_array
 Concept which is true if type V is static size array of types that passes is_glsl_vec test.
concept  glslstruct::utils::array
 Array concept.
concept  glslstruct::utils::static_size_array
 Static size array concept.

Classes

class  glslstruct::utils::glsl_var_type_getter
 type visitor which returns variable type More...
class  glslstruct::utils::glsl_array_count_getter
 type visitor which gets array and sub arrays counts in format [0][1]... More...
class  glslstruct::utils::glsl_writer
 general glsl writer More...
struct  glslstruct::utils::layout_with_context< Traits >
 Context container for layout. More...
struct  glslstruct::utils::layout_without_context
 empty container for layout More...
struct  glslstruct::utils::base_parser_patterns
 all parser patterns in one struct More...
struct  glslstruct::utils::ubo_parser_pattern< Layout >
 container for ubo parser pattern More...
struct  glslstruct::utils::ubo_parser_pattern< std140_layout >
 template overload of container for ubo parser pattern for std140 layout More...
struct  glslstruct::utils::ssbo_parser_pattern< Layout >
 container for ssbo parser pattern More...
struct  glslstruct::utils::ssbo_parser_pattern< std140_layout >
 template overload of container for ssbo parser pattern for std140 layout More...
struct  glslstruct::utils::ssbo_parser_pattern< std430_layout >
 template overload of container for ssbo parser pattern for std430 layout More...
struct  glslstruct::utils::ssbo_parser_pattern< scalar_layout >
 template overload of container for ssbo parser pattern for scalar layout More...
struct  glslstruct::utils::is_glsl_layout< T >
 helper struct to check if type is glsl layout More...
struct  glslstruct::utils::is_glsl_struct< S >
 helper struct to check if type is glsl struct More...
struct  glslstruct::utils::is_glsl_layout_struct< S, Layout >
 helper struct to check if type is glsl struct with required layout More...
struct  glslstruct::utils::array_traits< T >
 Array Traits. More...
struct  glslstruct::utils::array_traits< std::vector< T > >
 Array Traits overload for std::vector. More...
struct  glslstruct::utils::array_traits< std::array< T, N > >
 Array Traits overload for std::array. More...
struct  glslstruct::utils::array_traits< T[N]>
 Array Traits overload for c-style array. More...
struct  glslstruct::utils::array_traits< T(*)[N]>
 Array Traits overload for pointer to c-style array. More...
struct  glslstruct::utils::array_traits< std::span< T > >
 Array Traits overload for std::span. More...
struct  glslstruct::utils::is_static_size_array_of_impl< Test, T, IsArray, Args >
 helper struct for is_static_size_array_of_v check More...
struct  glslstruct::utils::is_static_size_array_of< Test, T, Args >
 checks if value type is array of type and if type passes given test template struct More...
struct  glslstruct::utils::single_value< T >
 container for single values More...
struct  glslstruct::utils::array_value< T, Num >
 container for array values More...
struct  glslstruct::utils::struct_array_value< T, Num >
 container for array of structs More...
struct  glslstruct::utils::standard_variable
 container for standard variables More...
struct  glslstruct::utils::layout_variable< Layout >
 container for layout variables More...
struct  glslstruct::utils::is_glsl_mat< T >
 struct with bool_constant which is true if type can be converted to glsl mat type More...
struct  glslstruct::utils::is_glsl_scalar< T >
 struct with bool_constant which is true if type can be converted to glsl scalar type More...
struct  glslstruct::utils::is_glsl_vec< T >
 struct with bool_constant which is true if type can be converted to glsl vec type More...

Macros

#define _GLSL_STRUCT_STRINGIFY_HELPER(x)
 stringify helper
#define _GLSL_STRUCT_VERSION_TO_STRING(major, minor, patch)
 converts version numbers to string
#define _GLSL_STRUCT_VERSION_TO_INT(major, minor, patch)
 converts version number to int
#define _GLSL_STRUCT_LAST_UPDATE_DATE_HELPER(day, month, year)
 converts last update date to string
#define _GLSL_STRUCT_HAS_CXX17   __cplusplus >= 201703l
 check if compiler has c++ version greater or equal to c++17
#define _GLSL_STRUCT_HAS_CXX20   0
 check if compiler has c++ version greater or equal to c++20 and if user enabled c++20 features using GLSL_STRUCT_ENABLE_CXX20
#define _GLSL_STRUCT_HAS_TYPES   _GLSL_STRUCT_HAS_CXX17
 check if user not disabled type containers using GLSL_STRUCT_DISABLE_TYPES
#define _GLSL_STRUCT_HAS_TYPE_CHECKS   0
 check if user enabled type checks for struct getters using GLSL_STRUCT_ENABLE_TYPE_CHECKS (remember it only works if GLSL_STRUCT_DISABLE_TYPES was not set)
#define _GLSL_STRUCT_HAS_PARSER   _GLSL_STRUCT_HAS_CXX17
 check if user want to include parser functionality
#define _GLSL_STRUCT_CONSTEXPR17   constexpr
 constexpr for c++17 and higher
#define _GLSL_STRUCT_CONSTEXPR20   constexpr
 constexpr keyword for c++20 and higher
#define _GLSL_STRUCT_REQUIRES(condition)
 requires keyword for c++20 and higher
#define _GLSL_STRUCT_MESSAGE(MESSAGE)
 compiler message
#define _GLSL_STRUCT_WARNING(MESSAGE)
 compiler warning
#define _GLSL_STRUCT_ERROR(MESSAGE)
 compiler error
#define glsl_struct_assert(expression, ...)
 glslstruct assert

Typedefs

template<array T>
using glslstruct::utils::array_value_type_t = _GLSL_STRUCT_TYPENAME17 array_traits<T>::value_type
 get value_type of array

Functions

std::string glslstruct::utils::get_glsl_var_type_string (const base_type_handle &varType, const mstd::ordered_map< struct_type, std::string > &structsNames)
 returns variable type
std::string glslstruct::utils::get_glsl_array_count_string (const base_type_handle &varType, bool canBeVariableSize)
 returns array counts string
std::string glslstruct::utils::get_glsl_variable_string (std::string_view name, const base_type_handle &varType, bool canBeVariableSize, const mstd::ordered_map< struct_type, std::string > &structsNames)
 returns variable line type name[0][1]...
template<array T>
static _GLSL_STRUCT_CONSTEXPR17 const array_value_type_t< T > * glslstruct::utils::get_array_data (const T &value)
 get pointer to data of array
template<array T>
static _GLSL_STRUCT_CONSTEXPR17 size_t glslstruct::utils::get_array_size (const T &value)
 get size of array

Variables

template<class Layout>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::has_ubo_pattern_v = has_ubo_pattern<Layout>
 returns true if layout can be used as ubo
template<class Layout>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::has_ssbo_pattern_v = has_ssbo_pattern<Layout>
 returns true if layout can be used as ssbo
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_layout_v = is_glsl_layout<T>::value
 check if type is glsl layout
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simple_or_layout_v = is_glsl_simple_v<T> || is_glsl_layout_v<T>
 check if type is glsl layout or glsl simple
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simple_v = is_glsl_scalar_v<T> || is_glsl_vec_v<T> || is_glsl_mat_v<T>
 check if type is glsl simple (is of scalar or vec or mat type)
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simples_array_v
 check if type is array of glsl simple (scalar or vec or mat type)
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simples_static_size_array_v
 check if type is static size array of glsl simple (scalar or vec or mat type)
template<class S>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_struct_v = is_glsl_struct<S>::value
 check if type is glsl struct
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_structs_array_v = is_array_of_v<is_glsl_struct, T>
 check if type is array of glsl structs
template<class S, class Layout>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_layout_struct_v = is_glsl_layout_struct<S, Layout>::value
 check if type is glsl struct with required layout
template<class VS, class Layout>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_layout_structs_array_v = is_array_of_v<is_glsl_layout_struct, VS, Layout>
 check if type is array of glsl structs with required layout
template<class T, class Layout>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simple_or_layout_struct_v
 check if type is glsl struct with required layout or simple type
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simple_or_struct_v = is_glsl_simple_v<T> || is_glsl_struct_v<T>
 check if type is glsl struct or simple type
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_type_v = std::is_base_of_v<base_type, T> && !std::is_same_v<base_type, T>
 check if T is glsl type (not base_type container but derived from base_type container)
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_base_type_v = std::is_same_v<base_type, T>
 check if T is base_type container
template<class V>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_mats_array_v = is_array_of_v<is_glsl_mat, V>
 Bool value which is true if type V is array of types that passes is_glsl_mat test.
template<class V>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_mats_static_size_array_v = is_static_size_array_of_v<is_glsl_mat, V>
 Bool value which is true if type V is static size array of types that passes is_glsl_mat test.
template<class V>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_scalars_array_v = is_array_of_v<is_glsl_scalar, V>
 Bool value which is true if type V is array of types that passes is_glsl_scalar test.
template<class V>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_scalars_static_size_array_v = is_static_size_array_of_v<is_glsl_scalar, V>
 Bool value which is true if type V is static size array of types that passes is_glsl_scalar test.
template<class V>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_vecs_array_v = is_array_of_v<is_glsl_vec, V>
 Bool value which is true if type V is array of types that passes is_glsl_vec test.
template<class V>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_vecs_static_size_array_v = is_static_size_array_of_v<is_glsl_vec, V>
 Bool value which is true if type V is static size array of types that passes is_glsl_vec test.
template<static_size_array T>
static _GLSL_STRUCT_CONSTEXPR17 size_t glslstruct::utils::array_static_size_v = array_traits<T>::static_size
 get static_size of static size array
template<template< class, class... > class Test, class T, class... Args>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_array_of_v = is_array_of<Test, T, is_array_v<T>, Args...>::value
 checks if value type is array of type and if type passes given test template struct
template<template< class, class... > class Test, class T, class... Args>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_static_size_array_of_v = is_static_size_array_of<Test, T, Args...>::value
 checks if value type is array of type
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_mat_v = glsl_mat<T>
 Bool value which is true if type can be converted to glsl mat type.
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_scalar_v = glsl_scalar<T>
 Bool value which is true if type can be converted to glsl scalar type.
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_vec_v = glsl_vec<T>
 Bool value which is true if type can be converted to glsl vec type.
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_array_v = array<T>
 checks if T has array traits defined
template<class T>
static _GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_static_size_array_v = static_size_array<T>
 checks if T has array traits defined and additional static_size member of type size_t

Detailed Description

group with utilities (not for end user to use)

Macro Definition Documentation

◆ _GLSL_STRUCT_CONSTEXPR17

#define _GLSL_STRUCT_CONSTEXPR17   constexpr

constexpr for c++17 and higher

◆ _GLSL_STRUCT_CONSTEXPR20

#define _GLSL_STRUCT_CONSTEXPR20   constexpr

constexpr keyword for c++20 and higher

◆ _GLSL_STRUCT_ERROR

#define _GLSL_STRUCT_ERROR ( MESSAGE)
Value:
_MSTD_ERROR(MESSAGE)

compiler error

◆ _GLSL_STRUCT_HAS_CXX17

#define _GLSL_STRUCT_HAS_CXX17   __cplusplus >= 201703l

check if compiler has c++ version greater or equal to c++17

◆ _GLSL_STRUCT_HAS_CXX20

#define _GLSL_STRUCT_HAS_CXX20   0

check if compiler has c++ version greater or equal to c++20 and if user enabled c++20 features using GLSL_STRUCT_ENABLE_CXX20

◆ _GLSL_STRUCT_HAS_PARSER

#define _GLSL_STRUCT_HAS_PARSER   _GLSL_STRUCT_HAS_CXX17

check if user want to include parser functionality

◆ _GLSL_STRUCT_HAS_TYPE_CHECKS

#define _GLSL_STRUCT_HAS_TYPE_CHECKS   0

check if user enabled type checks for struct getters using GLSL_STRUCT_ENABLE_TYPE_CHECKS (remember it only works if GLSL_STRUCT_DISABLE_TYPES was not set)

◆ _GLSL_STRUCT_HAS_TYPES

#define _GLSL_STRUCT_HAS_TYPES   _GLSL_STRUCT_HAS_CXX17

check if user not disabled type containers using GLSL_STRUCT_DISABLE_TYPES

◆ _GLSL_STRUCT_LAST_UPDATE_DATE_HELPER

#define _GLSL_STRUCT_LAST_UPDATE_DATE_HELPER ( day,
month,
year )
Value:
#define _GLSL_STRUCT_STRINGIFY_HELPER(x)
stringify helper
Definition config.hpp:56

converts last update date to string

◆ _GLSL_STRUCT_MESSAGE

#define _GLSL_STRUCT_MESSAGE ( MESSAGE)
Value:
_MSTD_MESSAGE(MESSAGE)

compiler message

◆ _GLSL_STRUCT_REQUIRES

#define _GLSL_STRUCT_REQUIRES ( condition)
Value:
requires (condition)

requires keyword for c++20 and higher

◆ _GLSL_STRUCT_STRINGIFY_HELPER

#define _GLSL_STRUCT_STRINGIFY_HELPER ( x)
Value:
#x

stringify helper

◆ _GLSL_STRUCT_VERSION_TO_INT

#define _GLSL_STRUCT_VERSION_TO_INT ( major,
minor,
patch )
Value:
(major * 100 + minor * 10 + patch)

converts version number to int

◆ _GLSL_STRUCT_VERSION_TO_STRING

#define _GLSL_STRUCT_VERSION_TO_STRING ( major,
minor,
patch )
Value:

converts version numbers to string

◆ _GLSL_STRUCT_WARNING

#define _GLSL_STRUCT_WARNING ( MESSAGE)
Value:
_MSTD_WARNING(MESSAGE)

compiler warning

◆ glsl_struct_assert

#define glsl_struct_assert ( expression,
... )
Value:
MSTD_LOG_ASSERT_BASE(expression, [](const std::string_view) -> void {} __VA_OPT__(, ) __VA_ARGS__)

glslstruct assert

Typedef Documentation

◆ array_value_type_t

template<array T>
using glslstruct::utils::array_value_type_t = _GLSL_STRUCT_TYPENAME17 array_traits<T>::value_type

get value_type of array

Function Documentation

◆ get_array_data()

template<array T>
_GLSL_STRUCT_CONSTEXPR17 const array_value_type_t< T > * glslstruct::utils::get_array_data ( const T & value)
staticnodiscard

get pointer to data of array

◆ get_array_size()

template<array T>
_GLSL_STRUCT_CONSTEXPR17 size_t glslstruct::utils::get_array_size ( const T & value)
staticnodiscard

get size of array

◆ get_glsl_array_count_string()

std::string glslstruct::utils::get_glsl_array_count_string ( const base_type_handle & varType,
bool canBeVariableSize )
nodiscard

returns array counts string

Parameters
varTypevariable for which we get array counts
canBeVariableSizecheck if array size can be variable size

◆ get_glsl_var_type_string()

std::string glslstruct::utils::get_glsl_var_type_string ( const base_type_handle & varType,
const mstd::ordered_map< struct_type, std::string > & structsNames )
nodiscard

returns variable type

Parameters
varTypevariable of which type is returned
structsNamesdefined structs names

◆ get_glsl_variable_string()

std::string glslstruct::utils::get_glsl_variable_string ( std::string_view name,
const base_type_handle & varType,
bool canBeVariableSize,
const mstd::ordered_map< struct_type, std::string > & structsNames )
nodiscard

returns variable line type name[0][1]...

Parameters
namename of variable
varTypetype of variable
canBeVariableSizecheck if array size can be variable size
structsNamesdefined structs names

Variable Documentation

◆ array_static_size_v

template<static_size_array T>
_GLSL_STRUCT_CONSTEXPR17 size_t glslstruct::utils::array_static_size_v = array_traits<T>::static_size
static

get static_size of static size array

◆ has_ssbo_pattern_v

template<class Layout>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::has_ssbo_pattern_v = has_ssbo_pattern<Layout>
static

returns true if layout can be used as ssbo

◆ has_ubo_pattern_v

template<class Layout>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::has_ubo_pattern_v = has_ubo_pattern<Layout>
static

returns true if layout can be used as ubo

◆ is_array_of_v

template<template< class, class... > class Test, class T, class... Args>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_array_of_v = is_array_of<Test, T, is_array_v<T>, Args...>::value
static

checks if value type is array of type and if type passes given test template struct

◆ is_array_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_array_v = array<T>
static

checks if T has array traits defined

◆ is_glsl_base_type_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_base_type_v = std::is_same_v<base_type, T>
static

check if T is base_type container

Template Parameters
Ttype which should be a base_type

◆ is_glsl_layout_struct_v

template<class S, class Layout>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_layout_struct_v = is_glsl_layout_struct<S, Layout>::value
static

check if type is glsl struct with required layout

Template Parameters
Stype which is glsl struct with required
Layoutrequired glsl layout type

◆ is_glsl_layout_structs_array_v

template<class VS, class Layout>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_layout_structs_array_v = is_array_of_v<is_glsl_layout_struct, VS, Layout>
static

check if type is array of glsl structs with required layout

Template Parameters
VStype which is array of glsl structs with required layout
Layoutrequired glsl layout type

◆ is_glsl_layout_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_layout_v = is_glsl_layout<T>::value
static

check if type is glsl layout

Template Parameters
Ttype which is glsl layout type

◆ is_glsl_mat_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_mat_v = glsl_mat<T>
static

Bool value which is true if type can be converted to glsl mat type.

Template Parameters
Ttype for which converter to glsl mat type should be defined

◆ is_glsl_mats_array_v

template<class V>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_mats_array_v = is_array_of_v<is_glsl_mat, V>
static

Bool value which is true if type V is array of types that passes is_glsl_mat test.

Template Parameters
Vtype that is checked

◆ is_glsl_mats_static_size_array_v

template<class V>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_mats_static_size_array_v = is_static_size_array_of_v<is_glsl_mat, V>
static

Bool value which is true if type V is static size array of types that passes is_glsl_mat test.

Template Parameters
Vtype that is checked

◆ is_glsl_scalar_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_scalar_v = glsl_scalar<T>
static

Bool value which is true if type can be converted to glsl scalar type.

Template Parameters
Ttype for which converter to glsl scalar type should be defined

◆ is_glsl_scalars_array_v

template<class V>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_scalars_array_v = is_array_of_v<is_glsl_scalar, V>
static

Bool value which is true if type V is array of types that passes is_glsl_scalar test.

Template Parameters
Vtype that is checked

◆ is_glsl_scalars_static_size_array_v

template<class V>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_scalars_static_size_array_v = is_static_size_array_of_v<is_glsl_scalar, V>
static

Bool value which is true if type V is static size array of types that passes is_glsl_scalar test.

Template Parameters
Vtype that is checked

◆ is_glsl_simple_or_layout_struct_v

template<class T, class Layout>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simple_or_layout_struct_v
static
Initial value:
=
static _GLSL_STRUCT_CONSTEXPR17 bool is_glsl_layout_struct_v
check if type is glsl struct with required layout
Definition struct_checks.hpp:116
static _GLSL_STRUCT_CONSTEXPR17 bool is_glsl_simple_v
check if type is glsl simple (is of scalar or vec or mat type)
Definition simple_checks.hpp:32

check if type is glsl struct with required layout or simple type

Template Parameters
Ttype which is glsl struct with required layout or simple type
Layoutrequired glsl layout type

◆ is_glsl_simple_or_layout_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simple_or_layout_v = is_glsl_simple_v<T> || is_glsl_layout_v<T>
static

check if type is glsl layout or glsl simple

Template Parameters
Ttype which is glsl layout or simple type

◆ is_glsl_simple_or_struct_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simple_or_struct_v = is_glsl_simple_v<T> || is_glsl_struct_v<T>
static

check if type is glsl struct or simple type

Template Parameters
Ttype which is glsl struct or simple type

◆ is_glsl_simple_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simple_v = is_glsl_scalar_v<T> || is_glsl_vec_v<T> || is_glsl_mat_v<T>
static

check if type is glsl simple (is of scalar or vec or mat type)

Template Parameters
Ttype which is glsl simple type

◆ is_glsl_simples_array_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simples_array_v
static
Initial value:
=
static _GLSL_STRUCT_CONSTEXPR17 bool is_glsl_mats_array_v
Bool value which is true if type V is array of types that passes is_glsl_mat test.
Definition mat_traits_concept.hpp:107
static _GLSL_STRUCT_CONSTEXPR17 bool is_glsl_vecs_array_v
Bool value which is true if type V is array of types that passes is_glsl_vec test.
Definition vec_traits_concept.hpp:104
static _GLSL_STRUCT_CONSTEXPR17 bool is_glsl_scalars_array_v
Bool value which is true if type V is array of types that passes is_glsl_scalar test.
Definition scalar_traits_concept.hpp:100

check if type is array of glsl simple (scalar or vec or mat type)

◆ is_glsl_simples_static_size_array_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_simples_static_size_array_v
static
Initial value:
=
static _GLSL_STRUCT_CONSTEXPR17 bool is_glsl_mats_static_size_array_v
Bool value which is true if type V is static size array of types that passes is_glsl_mat test.
Definition mat_traits_concept.hpp:115
static _GLSL_STRUCT_CONSTEXPR17 bool is_glsl_vecs_static_size_array_v
Bool value which is true if type V is static size array of types that passes is_glsl_vec test.
Definition vec_traits_concept.hpp:112
static _GLSL_STRUCT_CONSTEXPR17 bool is_glsl_scalars_static_size_array_v
Bool value which is true if type V is static size array of types that passes is_glsl_scalar test.
Definition scalar_traits_concept.hpp:108

check if type is static size array of glsl simple (scalar or vec or mat type)

◆ is_glsl_struct_v

template<class S>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_struct_v = is_glsl_struct<S>::value
static

check if type is glsl struct

Template Parameters
Stype which is glsl struct type

◆ is_glsl_structs_array_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_structs_array_v = is_array_of_v<is_glsl_struct, T>
static

check if type is array of glsl structs

◆ is_glsl_type_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_type_v = std::is_base_of_v<base_type, T> && !std::is_same_v<base_type, T>
static

check if T is glsl type (not base_type container but derived from base_type container)

Template Parameters
Ttype which should be a derived from base_type but not base_type

◆ is_glsl_vec_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_vec_v = glsl_vec<T>
static

Bool value which is true if type can be converted to glsl vec type.

Template Parameters
Ttype for which converter to glsl vec type should be defined

◆ is_glsl_vecs_array_v

template<class V>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_vecs_array_v = is_array_of_v<is_glsl_vec, V>
static

Bool value which is true if type V is array of types that passes is_glsl_vec test.

Template Parameters
Vtype that is checked

◆ is_glsl_vecs_static_size_array_v

template<class V>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_glsl_vecs_static_size_array_v = is_static_size_array_of_v<is_glsl_vec, V>
static

Bool value which is true if type V is static size array of types that passes is_glsl_vec test.

Template Parameters
Vtype that is checked

◆ is_static_size_array_of_v

template<template< class, class... > class Test, class T, class... Args>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_static_size_array_of_v = is_static_size_array_of<Test, T, Args...>::value
static

checks if value type is array of type

◆ is_static_size_array_v

template<class T>
_GLSL_STRUCT_CONSTEXPR17 bool glslstruct::utils::is_static_size_array_v = static_size_array<T>
static

checks if T has array traits defined and additional static_size member of type size_t