Euphoria
vertex_layout.h File Reference
#include <map>
#include <set>
#include <optional>

Go to the source code of this file.

Classes

struct  eu::core::VertexElementDescription
 A not-yet-realised binding to a shader variable like vec3 position. More...
struct  eu::core::CompiledVertexElement
 A realized VertexElementDescription like vec3 position at gl shader position 3. More...
struct  eu::core::CompiledVertexElementNoName
 A realized VertexElementDescription without name like vec3 at gl shader position 3. More...
struct  eu::core::CompiledShaderVertexAttributes
 A list of CompiledVertexElement (for shader). More...
struct  eu::core::CompiledGeomVertexAttributes
 A list of CompiledVertexLayoutNoNameList (for geom). More...
struct  eu::core::CompiledVertexTypeList
 A mapping of the vertex type (position...) to the actual shader id (for more than one shader). More...
struct  eu::core::InstanceProp
 A property for a shader used in instanced rendering. More...

Namespaces

namespace  eu
namespace  eu::core

Typedefs

using eu::core::ShaderVertexAttributes = std::vector<VertexElementDescription>
 Describes all vertex inputs a shader requires like [vec3 position, vec3 normal, vec2 uv].
using eu::core::VertexTypes = std::vector<VertexType>

Enumerations

enum class  eu::core::VertexType {
  eu::core::VertexType::position2xy , eu::core::VertexType::position2xz , eu::core::VertexType::position3 , eu::core::VertexType::normal3 ,
  eu::core::VertexType::color3 , eu::core::VertexType::color4 , eu::core::VertexType::texture2 , eu::core::VertexType::instance_transform
}
 Vertex source type, position, normal etc. More...

Functions

constexpr bool eu::core::is_instance_based (VertexType v)
std::vector< VertexTypeeu::core::find_duplicates (const ShaderVertexAttributes &items)
CompiledShaderVertexAttributes eu::core::compile_shader_layout (const CompiledVertexTypeList &l, const ShaderVertexAttributes &elements, std::optional< InstanceProp > instance_prop, std::optional< int > start_index)
CompiledGeomVertexAttributes eu::core::get_geom_layout (const CompiledVertexTypeList &l)
CompiledVertexTypeList eu::core::compile_attribute_layouts (const std::vector< VertexType > &base_layout, const std::vector< ShaderVertexAttributes > &descriptions)
CompiledVertexTypeList eu::core::compile_attribute_layouts (const std::vector< ShaderVertexAttributes > &descriptions)