cgv
Loading...
Searching...
No Matches
cgv::render::render_info Class Reference

the mesh_render_info structure manages vertex buffer objects for attribute and element buffers as well as an attribute array binding object. More...

#include <render_info.h>

Inheritance diagram for cgv::render::render_info:
cgv::render::mesh_render_info

Public Types

typedef cgv::type::uint32_type idx_type
 define index type

Public Member Functions

 render_info ()
 set vbo and vbe types
const std::vector< textured_material * > & get_materials () const
 give read access to materials
const std::vector< vertex_buffer * > & get_vbos () const
 give read access to vbos
const std::vector< attribute_array > & get_aas () const
 give read access to aabs
const std::vector< texture * > & get_textures () const
 give read access to texture
const std::vector< draw_call > & get_draw_calls () const
 give read access to draw calls
std::vector< textured_material * > & ref_materials ()
 give write access to materials
std::vector< vertex_buffer * > & ref_vbos ()
 give write access to vbos
std::vector< attribute_array > & ref_aas ()
 give write access to aabs
std::vector< texture * > & ref_textures ()
 give write access to texture
std::vector< draw_call > & ref_draw_calls ()
 give write access to draw calls
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
void draw_all (context &ctx, bool skip_opaque=false, bool skip_blended=false, bool use_materials=true)
 execute all draw calls
void destruct (cgv::render::context &ctx)
 destruct render mesh info and free vertex buffer objects

Protected Member Functions

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

Protected Attributes

std::vector< textured_material * > materials
 store materials
std::vector< texture * > textures
 store textures
std::vector< vertex_buffer * > vbos
 store buffers
std::vector< attribute_array > aas
 store attribute bindings
std::vector< draw_call > draw_calls
 store vector of render calls

Detailed Description

the mesh_render_info structure manages vertex buffer objects for attribute and element buffers as well as an attribute array binding object.

The vertex buffer can be constructed from a simple mesh and the attribute array binding is bound to a specific shader program which defines the attribute locations.

Definition at line 75 of file render_info.h.

Member Typedef Documentation

◆ idx_type

define index type

Definition at line 79 of file render_info.h.

Constructor & Destructor Documentation

◆ render_info()

cgv::render::render_info::render_info ( )

set vbo and vbe types

Definition at line 111 of file render_info.cxx.

Member Function Documentation

◆ bind()

bool cgv::render::render_info::bind ( context & ctx,
shader_program & prog,
bool force_success,
int aa_index = -1 )
virtual

◆ destruct()

void cgv::render::render_info::destruct ( cgv::render::context & ctx)

destruct render mesh info and free vertex buffer objects

Definition at line 257 of file render_info.cxx.

References aas, draw_calls, materials, textures, and vbos.

Referenced by cgv::render::build_render_info(), and cgv::render::mesh_render_info::destruct().

◆ draw()

◆ draw_all()

void cgv::render::render_info::draw_all ( context & ctx,
bool skip_opaque = false,
bool skip_blended = false,
bool use_materials = true )

execute all draw calls

Definition at line 230 of file render_info.cxx.

References draw(), and draw_calls.

Referenced by vr_view_interactor::draw_vr_kits().

◆ get_aas()

const std::vector< attribute_array > & cgv::render::render_info::get_aas ( ) const

give read access to aabs

Definition at line 129 of file render_info.cxx.

References aas.

Referenced by cgv::render::mesh_render_info::is_bound().

◆ get_draw_calls()

const std::vector< draw_call > & cgv::render::render_info::get_draw_calls ( ) const

give read access to draw calls

Definition at line 140 of file render_info.cxx.

References draw_calls.

◆ get_materials()

const std::vector< textured_material * > & cgv::render::render_info::get_materials ( ) const

give read access to materials

Definition at line 117 of file render_info.cxx.

References materials.

◆ get_textures()

const std::vector< texture * > & cgv::render::render_info::get_textures ( ) const

give read access to texture

Definition at line 134 of file render_info.cxx.

References textures.

◆ get_vbos()

const std::vector< vertex_buffer * > & cgv::render::render_info::get_vbos ( ) const

give read access to vbos

Definition at line 123 of file render_info.cxx.

References vbos.

Referenced by cgv::render::mesh_render_info::is_constructed().

◆ ref_aas()

std::vector< attribute_array > & cgv::render::render_info::ref_aas ( )

give write access to aabs

Definition at line 158 of file render_info.cxx.

References aas.

Referenced by bind(), cgv::render::build_render_info(), and cgv::render::mesh_render_info::construct_draw_calls().

◆ ref_draw_calls()

std::vector< draw_call > & cgv::render::render_info::ref_draw_calls ( )

◆ ref_materials()

std::vector< textured_material * > & cgv::render::render_info::ref_materials ( )

◆ ref_textures()

std::vector< texture * > & cgv::render::render_info::ref_textures ( )

give write access to texture

Definition at line 163 of file render_info.cxx.

References textures.

Referenced by cgv::render::build_render_info().

◆ ref_vbos()

Member Data Documentation

◆ aas

std::vector<attribute_array> cgv::render::render_info::aas
protected

store attribute bindings

Definition at line 88 of file render_info.h.

Referenced by destruct(), draw(), get_aas(), and ref_aas().

◆ draw_calls

std::vector<draw_call> cgv::render::render_info::draw_calls
protected

store vector of render calls

Definition at line 90 of file render_info.h.

Referenced by destruct(), draw_all(), cgv::render::mesh_render_info::draw_primitive(), get_draw_calls(), and ref_draw_calls().

◆ materials

std::vector<textured_material*> cgv::render::render_info::materials
protected

store materials

Definition at line 82 of file render_info.h.

Referenced by destruct(), draw(), get_materials(), and ref_materials().

◆ textures

std::vector<texture*> cgv::render::render_info::textures
protected

store textures

Definition at line 84 of file render_info.h.

Referenced by destruct(), get_textures(), and ref_textures().

◆ vbos

std::vector<vertex_buffer*> cgv::render::render_info::vbos
protected

store buffers

Definition at line 86 of file render_info.h.

Referenced by destruct(), get_vbos(), and ref_vbos().


The documentation for this class was generated from the following files: