Euphoria
Classes | Namespaces | Typedefs | Enumerations | Functions
vertex_layout.h File Reference
#include <map>
#include <set>
#include <optional>

Go to the source code of this file.

Classes

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

Namespaces

namespace  eu
 
namespace  eu::render
 

Typedefs

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

Enumerations

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

Functions

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