4#include <cgv/render/context.h>
5#include <cgv/render/vertex_buffer.h>
6#include <cgv/render/shader_program.h>
7#include <cgv/render/attribute_array_binding.h>
8#include <cgv/render/textured_material.h>
38 VertexAttributeID vertex_attribute_id;
48 std::vector<vertex_attribute> vas;
53 size_t byte_offset,
size_t element_count, uint32_t stride,
54 VertexAttributeID vertex_attribute_id, std::string name =
"");
59 DrawCallType draw_call_type;
61 uint32_t material_index;
63 uint32_t vertex_offset;
67 uint32_t instance_count;
86 std::vector<vertex_buffer*>
vbos;
88 std::vector<attribute_array>
aas;
99 const std::vector<vertex_buffer*>&
get_vbos()
const;
101 const std::vector<attribute_array>&
get_aas()
const;
109 std::vector<vertex_buffer*>&
ref_vbos();
111 std::vector<attribute_array>&
ref_aas();
119 void draw_all(
context& ctx,
bool skip_opaque =
false,
bool skip_blended =
false,
bool use_materials =
true);
126#include <cgv/config/lib_end.h>
the attribute_array_binding allows to define vertex attributes (i.e.
base class for all drawables, which is independent of the used rendering API.
std::vector< texture * > textures
store textures
std::vector< vertex_buffer * > & ref_vbos()
give write access to vbos
std::vector< textured_material * > materials
store materials
std::vector< texture * > & ref_textures()
give write access to texture
const std::vector< vertex_buffer * > & get_vbos() const
give read access to vbos
virtual bool bind(context &ctx, shader_program &prog, bool force_success, int aa_index=-1)
bind all or specific aa to the passed shader program
std::vector< textured_material * > & ref_materials()
give write access to materials
std::vector< draw_call > & ref_draw_calls()
give write access to draw calls
std::vector< attribute_array > & ref_aas()
give write access to aabs
std::vector< vertex_buffer * > vbos
store buffers
std::vector< attribute_array > aas
store attribute bindings
const std::vector< textured_material * > & get_materials() const
give read access to materials
const std::vector< draw_call > & get_draw_calls() const
give read access to draw calls
render_info()
set vbo and vbe types
void destruct(cgv::render::context &ctx)
destruct render mesh info and free vertex buffer objects
std::vector< draw_call > draw_calls
store vector of render calls
const std::vector< attribute_array > & get_aas() const
give read access to aabs
void draw_all(context &ctx, bool skip_opaque=false, bool skip_blended=false, bool use_materials=true)
execute all draw calls
cgv::type::uint32_type idx_type
define index type
void draw(context &ctx, const draw_call &dc, const draw_call *prev_dc=0, const draw_call *next_dc=0, bool use_materials=true)
perform a single render call
const std::vector< texture * > & get_textures() const
give read access to texture
a shader program combines several shader code fragments to a complete definition of the shading pipel...
namespace for api independent GPU programming
PrimitiveType
different primitive types
TypeId
ids for the different types and type constructs
unsigned int uint32_type
this type provides an 32 bit unsigned integer type
this header is dependency free
compact type description of data that can be sent to the context; convertible to int