cgv
|
base class for all drawables, which is independent of the used rendering API. More...
#include <context.h>
Classes | |
struct | BlendState |
Represents a blend state used to configure fragment blending. More... | |
struct | BufferMask |
Represents a buffer mask used to mask depth and color buffer outputs. More... | |
struct | DepthTestState |
Represents a depth test state used to configure depth testing. More... | |
struct | light_source_status |
status information of light sources More... | |
struct | render_info |
information necessary for a rendering pass More... | |
Public Member Functions | |
shader_program_base * | get_current_program () const |
check for current program, prepare it for rendering and return pointer to it | |
void | enable_shader_file_cache () |
enable the usage of the shader file caches | |
void | disable_shader_file_cache () |
disable the usage of the shader file caches | |
bool | is_shader_file_cache_enabled () const |
whether the shader file caches are enabled | |
context () | |
init the cursor position to (0,0) | |
virtual | ~context () |
virtual destructor | |
virtual void | error (const std::string &message, const render_component *rc=0) const |
error handling | |
virtual GPUVendorID | get_gpu_vendor_id () const |
device information | |
interface for implementation of specific contexts | |
virtual void | init_render_pass () |
virtual void | draw_textual_info () |
virtual void | perform_screen_shot () |
virtual void | finish_render_pass () |
render process | |
virtual void | configure_new_child (cgv::base::base_ptr child) |
helper method to integrate a new child | |
virtual RenderAPI | get_render_api () const =0 |
return the used rendering API | |
unsigned | get_render_pass_recursion_depth () const |
return current render pass recursion depth | |
virtual RenderPass | get_render_pass () const |
return the current render pass | |
virtual RenderPassFlags | get_render_pass_flags () const |
return the current render pass flags | |
virtual void * | get_render_pass_user_data () const |
return the current render pass user data | |
virtual RenderPassFlags | get_default_render_pass_flags () const |
return the default render pass flags | |
virtual void | set_default_render_pass_flags (RenderPassFlags) |
return the default render pass flags | |
virtual void | render_pass (RenderPass render_pass=RP_MAIN, RenderPassFlags render_pass_flags=RPF_ALL, void *user_data=0) |
perform the given render task | |
void | set_debug_render_passes (bool _debug) |
set flag whether to debug render passes | |
bool | get_debug_render_passes () const |
check whether render passes are debugged | |
virtual bool | in_render_process () const =0 |
return whether the context is currently in process of rendering | |
virtual bool | is_created () const =0 |
return whether the context is created | |
virtual bool | is_current () const =0 |
return whether the context is current | |
virtual bool | recreate_context () |
recreate context based on current context config settings | |
virtual bool | make_current () const =0 |
make the current context current if possible | |
virtual void | clear_current () const =0 |
clear the current context, typically used in multi-threaded rendering to allow usage of context in several threads | |
virtual void | attach_alpha_buffer (bool attach=true)=0 |
attach or detach (attach=false ) an alpha buffer to the current frame buffer if not present | |
virtual void | attach_depth_buffer (bool attach=true)=0 |
attach or detach (attach=false ) depth buffer to the current frame buffer if not present | |
virtual void | attach_stencil_buffer (bool attach=true)=0 |
attach or detach (attach=false ) stencil buffer to the current frame buffer if not present | |
virtual bool | is_stereo_buffer_supported () const =0 |
return whether the graphics card supports stereo buffer mode | |
virtual void | attach_stereo_buffer (bool attach=true)=0 |
attach or detach (attach=false ) stereo buffer to the current frame buffer if not present | |
virtual void | attach_accumulation_buffer (bool attach=true)=0 |
attach or detach (attach=false ) accumulation buffer to the current frame buffer if not present | |
virtual void | attach_multi_sample_buffer (bool attach=true)=0 |
attach or detach (attach=false ) multi sample buffer to the current frame buffer if not present | |
virtual unsigned int | get_width () const =0 |
return the width of the window | |
virtual unsigned int | get_height () const =0 |
return the height of the window | |
virtual void | resize (unsigned int width, unsigned int height)=0 |
resize the context to the given dimensions | |
virtual bool | read_frame_buffer (data::data_view &dv, unsigned int x=0, unsigned int y=0, FrameBufferType buffer_type=FB_BACK, cgv::type::info::TypeId type=cgv::type::info::TI_UINT8, data::ComponentFormat cf=data::CF_RGB, int w=-1, int h=-1)=0 |
read the current frame buffer or a rectangular region of it into the given data view. | |
bool | write_frame_buffer_to_image (const std::string &file_name, data::ComponentFormat cf=data::CF_RGB, FrameBufferType buffer_type=FB_BACK, unsigned int x=0, unsigned int y=0, int w=-1, int h=-1, float depth_offset=0.9f, float depth_scale=10.0f) |
write the content of the frame buffer to an image file. | |
void | push_bg_color () |
push a copy of the current background color onto the stack | |
void | pop_bg_color () |
pop the top of the current background color from the stack | |
virtual void | set_bg_color (vec4 rgba) |
set a user defined background color | |
void | set_bg_color (float r, float g, float b, float a) |
set a user defined background color | |
vec4 | get_bg_color () const |
return the current color value for clearing the background | |
void | put_bg_color (float *rgba) const |
copy the current background rgba color into the given float array | |
void | set_bg_alpha (float a) |
set a user defined background alpha value | |
float | get_bg_alpha () const |
return the current alpha value for clearing the background | |
void | set_bg_clr_idx (unsigned int idx) |
set an indexed background color | |
unsigned int | get_bg_clr_idx () const |
return the current index of the background color | |
void | push_bg_depth () |
push a copy of the current background depth value onto the stack | |
void | pop_bg_depth () |
pop the top of the current background depth value from the stack | |
virtual void | set_bg_depth (float d) |
set a user defined background depth value | |
float | get_bg_depth () const |
return the current depth value for clearing the background | |
void | push_bg_stencil () |
push a copy of the current background stencil value onto the stack | |
void | pop_bg_stencil () |
pop the top of the current background stencil value from the stack | |
virtual void | set_bg_stencil (int s) |
set a user defined background stencil value | |
int | get_bg_stencil () const |
return the current stencil value for clearing the background | |
void | push_bg_accum_color () |
push a copy of the current background accumulation color onto the stack | |
void | pop_bg_accum_color () |
pop the top of the current background accumulation color from the stack | |
virtual void | set_bg_accum_color (vec4 rgba) |
set a user defined background color for the accumulation buffer | |
void | set_bg_accum_color (float r, float g, float b, float a) |
set a user defined background color for the accumulation buffer | |
vec4 | get_bg_accum_color () const |
return the current color value for clearing the accumulation buffer | |
void | put_bg_accum_color (float *rgba) const |
copy the current accumulation background rgba color into the given float array | |
void | set_bg_accum_alpha (float a) |
set a user defined background alpha value for the accumulation buffer | |
float | get_bg_accum_alpha () const |
return the current alpha value for clearing the accumulation buffer | |
virtual void | clear_background (bool color_flag, bool depth_flag, bool stencil_flag=false, bool accum_flag=false)=0 |
clear the buffer contents of the flagged buffers to the set background colors | |
virtual void | post_redraw ()=0 |
the context will be redrawn when the system is idle again | |
virtual void | force_redraw ()=0 |
the context will be redrawn right now. This method cannot be called inside the following methods of a drawable: init, init_frame, draw, finish_draw | |
virtual void | announce_external_frame_buffer_change (void *&cgv_fbo_storage)=0 |
announce an external frame buffer change performed with rendering API to the cgv framework providing space to temporarily store frame buffer of cgv framework | |
virtual void | recover_from_external_frame_buffer_change (void *cgv_fbo_storage)=0 |
restore cgv frame buffer to the state before the external change | |
font selection and measure | |
virtual void | enable_font_face (media::font::font_face_ptr font_face, float font_size) |
enable the given font face with the given size in pixels | |
virtual float | get_current_font_size () const |
return the size in pixels of the currently enabled font face | |
virtual media::font::font_face_ptr | get_current_font_face () const |
return the currently enabled font face | |
surface rendering and material management | |
virtual void | enable_phong_shading () |
enable phong shading with the help of a shader (enabled by default) | |
virtual void | disable_phong_shading () |
virtual void | enable_material (const cgv::media::illum::phong_material &mat=cgv::media::illum::default_material(), MaterialSide ms=MS_FRONT_AND_BACK, float alpha=1) |
virtual void | disable_material (const cgv::media::illum::phong_material &mat=cgv::media::illum::default_material()) |
virtual void | enable_material (const textured_material &mat, MaterialSide ms=MS_FRONT_AND_BACK, float alpha=1) |
void | set_gamma (float _gamma) |
set the current per channel gamma values to single value | |
virtual void | set_gamma3 (const vec3 &_gamma3) |
set the current per channel gamma values to single value | |
float | get_gamma () const |
query current gamma computed as average over gamma3 per channel values | |
vec3 | get_gamma3 () const |
query current per color channel gamma | |
virtual void | enable_sRGB_framebuffer (bool do_enable=true) |
enable or disable sRGB framebuffer | |
bool | sRGB_framebuffer_enabled () |
check whether sRGB framebuffer is enabled | |
const rgba & | get_color () const |
return current color | |
virtual void | set_color (const rgba &clr) |
set the current color | |
virtual void | set_color (const rgb &clr, float opacity=1.0f) |
set the current color | |
virtual void | set_material (const cgv::media::illum::surface_material &mat) |
set the current material | |
const cgv::media::illum::surface_material * | get_current_material () const |
return pointer to current material or nullptr if no current material is available | |
virtual void | set_textured_material (const textured_material &mat) |
set the current material | |
virtual void | enable_material (textured_material &mat)=0 |
enable a material with textures | |
virtual void | disable_material (textured_material &mat)=0 |
disable a material with textures | |
void | set_current_gamma (shader_program &prog) const |
set the shader program gamma values | |
void | set_current_view (shader_program &prog, bool modelview_deps=true, bool projection_deps=true) const |
set the shader program view matrices to the currently enabled view matrices | |
void | set_current_material (shader_program &prog) const |
set the shader program material to the currently enabled material | |
void | set_current_lights (shader_program &prog) const |
set the shader program lights to the currently enabled lights | |
vec3 | get_light_eye_position (const cgv::media::illum::light_source &light, bool place_now) const |
helper function to place lights | |
vec3 | get_light_eye_spot_direction (const cgv::media::illum::light_source &light, bool place_now) const |
helper function to place spot lights | |
virtual shader_program & | ref_default_shader_program (bool texture_support=false)=0 |
return a reference to a shader program used to render without illumination | |
virtual shader_program & | ref_surface_shader_program (bool texture_support=false)=0 |
return a reference to the default shader program used to render surfaces | |
virtual void | enumerate_program_uniforms (shader_program &prog, std::vector< std::string > &names, std::vector< int > *locations_ptr=0, std::vector< int > *sizes_ptr=0, std::vector< int > *types_ptr=0, bool show=false) const =0 |
get list of program uniforms | |
virtual void | enumerate_program_attributes (shader_program &prog, std::vector< std::string > &names, std::vector< int > *locations_ptr=0, std::vector< int > *sizes_ptr=0, std::vector< int > *types_ptr=0, bool show=false) const =0 |
get list of program attributes | |
lights | |
void * | enable_light (const cgv::media::illum::light_source &light) |
void | disable_light (void *handle) |
unsigned | get_max_nr_lights () const |
size_t | get_nr_light_sources () const |
return the number of light sources | |
void * | add_light_source (const cgv::media::illum::light_source &light, bool enabled=true, bool place_now=false) |
add a new light source, enable it if enable is true and place it relative to current model view transformation if place_now is true; return handle to light source | |
bool | remove_light_source (void *handle) |
remove a light source by handle and whether it existed | |
const cgv::media::illum::light_source & | get_light_source (void *handle) const |
read access to light source | |
const light_source_status & | get_light_source_status (void *handle) const |
read access to light source status | |
void | set_light_source (void *handle, const cgv::media::illum::light_source &light, bool place_now=true) |
set light source newly | |
void | place_light_source (void *handle) |
place the given light source relative to current model viel transformation | |
virtual unsigned | get_max_nr_enabled_light_sources () const |
return maximum number of light sources, that can be enabled in parallel | |
size_t | get_nr_enabled_light_sources () const |
return the number of light sources | |
void * | get_enabled_light_source_handle (size_t i) const |
access to handle of i-th light source | |
bool | is_light_source_enabled (void *handle) |
check whether light source is enabled | |
bool | enable_light_source (void *handle) |
enable a given light source and return whether there existed a light source with given handle | |
bool | disable_light_source (void *handle) |
disable a given light source and return whether there existed a light source with given handle | |
size_t | get_nr_default_light_sources () const |
return number of default light sources | |
const cgv::media::illum::light_source & | get_default_light_source (size_t i) const |
return i-th default light source | |
void | set_default_light_source (size_t i, const cgv::media::illum::light_source &ls) |
set i-th default light source | |
text output | |
virtual std::ostream & | output_stream () |
returns an output stream whose output is printed at the current cursor location, which is managed by the context. | |
virtual void | set_cursor (int x, int y) |
flush the output_stream and set a new cursor position given in opengl coordinates with (0,0) in lower left corner | |
virtual void | get_cursor (int &x, int &y) const |
return current cursor location in opengl coordinates with (0,0) in lower left corner | |
virtual void | put_cursor_coords (const vecn &p, int &x, int &y) const |
transform point p in current world coordinates into opengl coordinates with (0,0) in lower left corner and put x and y coordinates into the passed variables | |
virtual void | set_cursor (const vecn &pos, const std::string &text="", TextAlignment ta=TA_BOTTOM_LEFT, int x_offset=0, int y_offset=0) |
flush output_stream and set the current text position from a 3D or 4D location in current world coordinates. | |
drawing | |
virtual void | draw_edges_of_faces (const float *vertices, const float *normals, const float *tex_coords, const int *vertex_indices, const int *normal_indices, const int *tex_coord_indices, int nr_faces, int face_degree, bool flip_normals=false) const =0 |
pass geometry of given faces to current shader program and generate draw calls to render lines for the edges | |
virtual void | draw_edges_of_strip_or_fan (const float *vertices, const float *normals, const float *tex_coords, const int *vertex_indices, const int *normal_indices, const int *tex_coord_indices, int nr_faces, int face_degree, bool is_fan, bool flip_normals=false) const =0 |
pass geometry of given strip or fan to current shader program and generate draw calls to render lines for the edges | |
virtual void | draw_faces (const float *vertices, const float *normals, const float *tex_coords, const int *vertex_indices, const int *normal_indices, const int *tex_coord_indices, int nr_faces, int face_degree, bool flip_normals=false) const =0 |
pass geometry of given faces to current shader program and generate draw calls to render triangles | |
virtual void | draw_strip_or_fan (const float *vertices, const float *normals, const float *tex_coords, const int *vertex_indices, const int *normal_indices, const int *tex_coord_indices, int nr_faces, int face_degree, bool is_fan, bool flip_normals=false) const =0 |
pass geometry of given strip or fan to current shader program and generate draw calls to render triangles | |
void | tesselate_unit_square (bool flip_normals=false, bool edges=false) |
tesselate a unit square in the xy-plane with texture coordinates | |
void | tesselate_unit_cube (bool flip_normals=false, bool edges=false) |
tesselate a unit cube with extent from [-1,-1,-1] to [1,1,1] with face normals that can be flipped | |
virtual void | tesselate_box (const cgv::media::axis_aligned_box< double, 3 > &B, bool flip_normals, bool edges=false) const |
tesselate an axis aligned box | |
void | tesselate_unit_prism (bool flip_normals=false, bool edges=false) |
tesselate a prism | |
void | tesselate_unit_disk (int resolution=25, bool flip_normals=false, bool edges=false) |
tesselate a circular disk of radius 1 | |
void | tesselate_unit_cone (int resolution=25, bool flip_normals=false, bool edges=false) |
tesselate a cone of radius 1 | |
void | tesselate_unit_cylinder (int resolution=25, bool flip_normals=false, bool edges=false) |
tesselate a cylinder of radius 1 | |
void | tesselate_unit_sphere (int resolution=25, bool flip_normals=false, bool edges=false) |
tesselate a sphere of radius 1 | |
void | tesselate_unit_tetrahedron (bool flip_normals=false, bool edges=false) |
tesselate a tetrahedron | |
void | tesselate_unit_octahedron (bool flip_normals=false, bool edges=false) |
tesselate a octahedron | |
void | tesselate_unit_dodecahedron (bool flip_normals=false, bool edges=false) |
tesselate a dodecahedron | |
void | tesselate_unit_icosahedron (bool flip_normals=false, bool edges=false) |
tesselate an icosahedron | |
void | tesselate_unit_torus (float minor_radius=0.2f, int resolution=25, bool flip_normals=false, bool edges=false) |
tesselate a torus with major radius of one and given minor radius | |
virtual void | tesselate_arrow (double length=1, double aspect=0.1, double rel_tip_radius=2.0, double tip_aspect=0.3, int res=25, bool edges=false) |
tesselate an arrow from the origin in z-direction | |
virtual void | tesselate_arrow (const dvec3 &start, const dvec3 &end, double aspect=0.1f, double rel_tip_radius=2.0f, double tip_aspect=0.3f, int res=25, bool edges=false) |
define length and direction from start and end point and draw an arrow | |
virtual void | draw_light_source (const cgv::media::illum::light_source &l, float intensity_scale, float light_scale) |
draw a light source with an emissive material | |
render state | |
void | push_depth_test_state () |
push a copy of the current depth test state onto the stack saved attributes: depth test enablement, depth test function | |
void | pop_depth_test_state () |
pop the top of the current depth test state from the stack | |
DepthTestState | get_depth_test_state () const |
return the current depth test state | |
virtual void | set_depth_test_state (DepthTestState state) |
set the depth test state | |
virtual void | set_depth_func (CompareFunction func) |
set the depth test function | |
virtual void | enable_depth_test () |
enable the depth test | |
virtual void | disable_depth_test () |
disable the depth test | |
void | push_cull_state () |
push a copy of the current culling state onto the stack saved attributes: cull face enablement, cull face | |
void | pop_cull_state () |
pop the top of the current culling state from the stack | |
CullingMode | get_cull_state () const |
return the current culling state | |
virtual void | set_cull_state (CullingMode culling_mode) |
set the culling state | |
void | push_blend_state () |
push a copy of the current blend state onto the stack saved attributes: blend enablement, color and alpha source and destinatin functions | |
void | pop_blend_state () |
pop the top of the current culling state from the stack | |
BlendState | get_blend_state () const |
return the current blend state | |
virtual void | set_blend_state (BlendState state) |
set the complete blend state | |
virtual void | set_blend_func (BlendFunction src_factor, BlendFunction dst_factor) |
set the blend function | |
virtual void | set_blend_func_separate (BlendFunction src_color_factor, BlendFunction dst_color_factor, BlendFunction src_alpha_factor, BlendFunction dst_alpha_factor) |
set the blend function separately for color and alpha | |
void | set_blend_func_front_to_back () |
set the default blend function for front to back blending | |
void | set_blend_func_back_to_front () |
set the default blend function for back to front blending | |
virtual void | enable_blending () |
enable blending | |
virtual void | disable_blending () |
disable blending | |
void | push_buffer_mask () |
push a copy of the current buffer mask onto the stack saved attributes: depth mask, color mask | |
void | pop_buffer_mask () |
pop the top of the current buffer mask from the stack | |
BufferMask | get_buffer_mask () const |
return the current buffer mask | |
virtual void | set_buffer_mask (BufferMask mask) |
set the buffer mask for depth and color buffers | |
bool | get_depth_mask () const |
get the depth buffer mask | |
virtual void | set_depth_mask (bool flag) |
set the depth buffer mask | |
bvec4 | get_color_mask () const |
get the color buffer mask | |
virtual void | set_color_mask (bvec4 flags) |
set the color buffer mask | |
![]() | |
context_config () | |
construct config with default parameters | |
bool | self_reflect (cgv::reflect::reflection_handler &srh) |
reflect the shader_path member | |
Protected Member Functions | |
virtual void | on_lights_changed () |
helper function to send light update events | |
virtual void | process_text (const std::string &text) |
callback method for processing of text from the output stream | |
virtual void | draw_text (const std::string &text) |
draw some text at cursor position and update cursor position | |
virtual int | query_integer_constant (ContextIntegerConstant cic) const =0 |
virtual void | destruct_render_objects () |
virtual void | put_id (void *handle, void *ptr) const =0 |
virtual cgv::data::component_format | texture_find_best_format (const cgv::data::component_format &cf, render_component &rc, const std::vector< cgv::data::data_view > *palettes=0) const =0 |
virtual bool | texture_create (texture_base &tb, cgv::data::data_format &df) const =0 |
virtual bool | texture_create (texture_base &tb, cgv::data::data_format &target_format, const cgv::data::const_data_view &data, int level, int cube_side=-1, int num_array_layers=0, const std::vector< cgv::data::data_view > *palettes=0) const =0 |
virtual bool | texture_create_from_buffer (texture_base &tb, cgv::data::data_format &df, int x, int y, int level) const =0 |
virtual bool | texture_replace (texture_base &tb, int x, int y, int z_or_cube_side, const cgv::data::const_data_view &data, int level, const std::vector< cgv::data::data_view > *palettes=0) const =0 |
virtual bool | texture_replace_from_buffer (texture_base &tb, int x, int y, int z_or_cube_side, int x_buffer, int y_buffer, unsigned int width, unsigned int height, int level) const =0 |
virtual bool | texture_create_mipmaps (texture_base &tb, cgv::data::data_format &df) const =0 |
virtual bool | texture_generate_mipmaps (texture_base &tb, unsigned int dim) const =0 |
virtual bool | texture_destruct (texture_base &tb) const =0 |
virtual bool | texture_set_state (const texture_base &tb) const =0 |
virtual bool | texture_enable (texture_base &tb, int tex_unit, unsigned int nr_dims) const =0 |
virtual bool | texture_disable (texture_base &tb, int tex_unit, unsigned int nr_dims) const =0 |
virtual bool | texture_bind_as_image (texture_base &tb, int tex_unit, int level, bool bind_array, int layer, AccessType access) const =0 |
virtual bool | render_buffer_create (render_buffer_base &rc, cgv::data::component_format &cf, int &_width, int &_height) const =0 |
virtual bool | render_buffer_destruct (render_buffer_base &rc) const =0 |
virtual bool | frame_buffer_create (frame_buffer_base &fbb) const |
virtual bool | frame_buffer_attach (frame_buffer_base &fbb, const render_buffer_base &rb, bool is_depth, int i) const |
virtual bool | frame_buffer_attach (frame_buffer_base &fbb, const texture_base &t, bool is_depth, int level, int i, int z) const |
virtual bool | frame_buffer_is_complete (const frame_buffer_base &fbb) const =0 |
virtual bool | frame_buffer_enable (frame_buffer_base &fbb) |
virtual bool | frame_buffer_disable (frame_buffer_base &fbb) |
virtual bool | frame_buffer_destruct (frame_buffer_base &fbb) const |
virtual void | frame_buffer_blit (const frame_buffer_base *src_fbb_ptr, const ivec4 &S, frame_buffer_base *dst_fbb_ptr, const ivec4 &_D, BufferTypeBits btbs, bool interpolate) const =0 |
virtual int | frame_buffer_get_max_nr_color_attachments () const =0 |
virtual int | frame_buffer_get_max_nr_draw_buffers () const =0 |
virtual bool | shader_code_create (render_component &sc, ShaderType st, const std::string &source) const =0 |
virtual bool | shader_code_compile (render_component &sc) const =0 |
virtual void | shader_code_destruct (render_component &sc) const =0 |
virtual bool | shader_program_create (shader_program_base &spb) const =0 |
virtual void | shader_program_attach (shader_program_base &spb, const render_component &sc) const =0 |
virtual void | shader_program_detach (shader_program_base &spb, const render_component &sc) const =0 |
virtual bool | shader_program_link (shader_program_base &spb) const |
virtual bool | shader_program_set_state (shader_program_base &spb) const =0 |
virtual bool | shader_program_enable (shader_program_base &spb) |
virtual bool | shader_program_disable (shader_program_base &spb) |
virtual bool | shader_program_destruct (shader_program_base &spb) const |
virtual int | get_uniform_location (const shader_program_base &spb, const std::string &name) const =0 |
virtual bool | set_uniform_void (shader_program_base &spb, int loc, type_descriptor value_type, const void *value_ptr) const =0 |
virtual bool | set_uniform_array_void (shader_program_base &spb, int loc, type_descriptor value_type, const void *value_ptr, size_t nr_elements) const =0 |
virtual int | get_attribute_location (const shader_program_base &spb, const std::string &name) const =0 |
virtual bool | set_attribute_void (shader_program_base &spb, int loc, type_descriptor value_type, const void *value_ptr) const =0 |
virtual bool | attribute_array_binding_create (attribute_array_binding_base &aab) const =0 |
virtual bool | attribute_array_binding_destruct (attribute_array_binding_base &aab) const |
virtual bool | attribute_array_binding_enable (attribute_array_binding_base &aab) |
virtual bool | attribute_array_binding_disable (attribute_array_binding_base &aab) |
virtual bool | set_attribute_array_void (attribute_array_binding_base *aab, int loc, type_descriptor value_type, const vertex_buffer_base *vbb, const void *ptr, size_t nr_elements=0, unsigned stride_in_bytes=0) const =0 |
virtual bool | set_element_array (attribute_array_binding_base *aab, const vertex_buffer_base *vbb) const =0 |
virtual bool | enable_attribute_array (attribute_array_binding_base *aab, int loc, bool do_enable) const =0 |
virtual bool | is_attribute_array_enabled (const attribute_array_binding_base *aab, int loc) const =0 |
virtual bool | vertex_buffer_bind (const vertex_buffer_base &vbb, VertexBufferType _type, unsigned _idx=-1) const =0 |
virtual bool | vertex_buffer_unbind (const vertex_buffer_base &vbb, VertexBufferType _type, unsigned _idx=-1) const =0 |
virtual bool | vertex_buffer_create (vertex_buffer_base &vbb, const void *array_ptr, size_t size_in_bytes) const =0 |
virtual bool | vertex_buffer_resize (vertex_buffer_base &vbb, const void *array_ptr, size_t size_in_bytes) const =0 |
virtual bool | vertex_buffer_replace (vertex_buffer_base &vbb, size_t offset, size_t size_in_bytes, const void *array_ptr) const =0 |
virtual bool | vertex_buffer_copy (const vertex_buffer_base &src, size_t src_offset, vertex_buffer_base &target, size_t target_offset, size_t size_in_bytes) const =0 |
virtual bool | vertex_buffer_copy_back (vertex_buffer_base &vbb, size_t offset, size_t size_in_bytes, void *array_ptr) const =0 |
virtual bool | vertex_buffer_destruct (vertex_buffer_base &vbb) const =0 |
Static Protected Member Functions | |
static void | get_buffer_list (frame_buffer_base &fbb, bool &depth_buffer, std::vector< int > &buffers, int offset=0) |
Protected Attributes | |
GPUVendorID | gpu_vendor |
bool | use_shader_file_cache |
whether to use the caching facilities of shader_program and shader_code to store loaded shader file contents as strings for faster loading | |
bool | auto_set_view_in_current_shader_program |
whether to automatically set viewing matrixes in current shader program, defaults to true | |
bool | auto_set_lights_in_current_shader_program |
whether to automatically set lights in current shader program, defaults to true | |
bool | auto_set_material_in_current_shader_program |
whether to automatically set material in current shader program, defaults to true | |
bool | auto_set_gamma_in_current_shader_program |
whether to automatically set gamma in current shader program, defaults to true | |
bool | support_compatibility_mode |
whether to support view and lighting management of compatibility mode, defaults to true | |
bool | draw_in_compatibility_mode |
whether to do all drawing in compatibility mode, only possible if support_compatibility_mode is true, , defaults to false | |
bool | debug_render_passes |
whether to debug render passes | |
bool | enable_vsync |
whether vsync should be enabled | |
rgba | current_color |
current color value | |
bool | sRGB_framebuffer |
whether to use opengl option to support sRGB framebuffer | |
vec3 | gamma3 |
per color channel gamma value passed to shader programs that have gamma uniform | |
std::stack< vec4 > | bg_color_stack |
stack of background colors | |
std::stack< float > | bg_depth_stack |
stack of background depth values | |
std::stack< int > | bg_stencil_stack |
stack of background stencil values | |
std::stack< vec4 > | bg_accum_color_stack |
stack of background accumulation colors | |
std::stack< DepthTestState > | depth_test_state_stack |
stack of depth test states | |
std::stack< CullingMode > | cull_state_stack |
stack of culling mode states | |
std::stack< BlendState > | blend_state_stack |
stack of blend states | |
std::stack< BufferMask > | buffer_mask_stack |
stack of buffer masks | |
std::stack< dmat4 > | modelview_matrix_stack |
keep two matrix stacks for model view and projection matrices | |
std::stack< dmat4 > | projection_matrix_stack |
std::stack< std::vector< window_transformation > > | window_transformation_stack |
keep stack of window transformations | |
std::stack< frame_buffer_base * > | frame_buffer_stack |
stack of currently enabled frame buffers | |
std::stack< shader_program_base * > | shader_program_stack |
stack of currently enabled shader programs | |
std::stack< attribute_array_binding_base * > | attribute_array_binding_stack |
stack of currently enabled attribute array binding | |
std::vector< void * > | enabled_light_source_handles |
keep track of enabled light source handles | |
size_t | light_source_handle |
counter to construct light source handles | |
std::map< void *, std::pair< cgv::media::illum::light_source, light_source_status > > | light_sources |
map handle to light source and light source status information | |
cgv::media::illum::light_source | default_light_source [nr_default_light_sources] |
default light sources | |
void * | default_light_source_handles [nr_default_light_sources] |
handles of default light sources | |
cgv::media::illum::surface_material | default_material |
store a default material | |
const cgv::media::illum::surface_material * | current_material_ptr |
store pointer to current material | |
bool | current_material_is_textured |
store flag to tell whether current material is textured | |
std::stack< render_info > | render_pass_stack |
store the current render pass | |
RenderPassFlags | default_render_flags |
default render flags with which the main render pass is initialized | |
bool | phong_shading |
whether to use phong shading | |
int | current_background |
current back ground color index | |
int | cursor_x |
current cursor location for textual output | |
int | cursor_y |
cgv::signal::callback_stream | out_stream |
use a callback stream to write text to the opengl context | |
float | current_font_size |
store current font size | |
cgv::media::font::font_face_ptr | current_font_face |
store current font | |
int | tab_size |
size a tabs | |
int | x_offset |
offset in x and y direction where text starts | |
int | y_offset |
int | nr_identations |
current number of indentations | |
bool | at_line_begin |
store whether we are at the beginning of the line | |
bool | do_screen_shot |
Static Protected Attributes | |
static const unsigned | nr_default_light_sources = 2 |
number of default light sources | |
Friends | |
class CGV_API | attribute_array_manager |
class CGV_API | render_component |
class CGV_API | texture |
class CGV_API | render_buffer |
class CGV_API | frame_buffer |
class CGV_API | shader_code |
class CGV_API | shader_program |
class CGV_API | attribute_array_binding |
class CGV_API | vertex_buffer |
class | shader_program_base |
transformations | |
dmatn | get_V () const |
void | set_V (const dmatn &V) const |
void | push_V () |
void | pop_V () |
dmatn | get_P () const |
void | set_P (const dmatn &P) const |
void | push_P () |
void | pop_P () |
dmatn | get_D () const |
dmatn | get_DPV () const |
virtual void | push_pixel_coords ()=0 |
use this to push new modelview and new projection matrices onto the transformation stacks such that x and y coordinates correspond to opengl coordinates with (0,0) in lower left corner. | |
virtual void | pop_pixel_coords ()=0 |
pop previously pushed transformation matrices from modelview and projection stacks | |
virtual dmat4 | get_modelview_matrix () const =0 |
return homogeneous 4x4 viewing matrix, which transforms from world to eye space | |
virtual void | set_modelview_matrix (const dmat4 &MV) |
set the current modelview matrix, which transforms from world to eye space | |
virtual void | mul_modelview_matrix (const dmat4 &MV) |
multiply given matrix from right to current modelview matrix | |
void | push_modelview_matrix () |
push the current viewing matrix onto a matrix stack for viewing matrices. | |
void | pop_modelview_matrix () |
see push_V for an explanation | |
virtual dmat4 | get_projection_matrix () const =0 |
return homogeneous 4x4 projection matrix, which transforms from eye to clip space | |
virtual void | set_projection_matrix (const dmat4 &P) |
set the current projection matrix, which transforms from eye to clip space | |
virtual void | mul_projection_matrix (const dmat4 &P) |
multiply given matrix from right to current projection matrix | |
void | push_projection_matrix () |
same as push_V but for the projection matrix - a different matrix stack is used. | |
void | pop_projection_matrix () |
see push_P for an explanation | |
void | push_window_transformation_array () |
push a copy of the current viewport and depth range arrays defining the window transformations | |
virtual void | pop_window_transformation_array () |
restore previous viewport and depth range arrays defining the window transformations | |
virtual void | announce_external_viewport_change (ivec4 &cgv_viewport_storage)=0 |
announce an external viewport change performed with rendering API to the cgv framework providing space to temporarily store viewport of cgv framework | |
virtual void | recover_from_external_viewport_change (const ivec4 &cgv_viewport_storage)=0 |
restore cgv viewport to the state before the external change | |
virtual unsigned | get_max_window_transformation_array_size () const =0 |
query the maximum number of supported window transformations, which is at least 1 | |
virtual void | set_viewport (const ivec4 &viewport, int array_index=-1) |
set the current viewport or one of the viewports in the window transformation array | |
virtual void | set_depth_range (const dvec2 &depth_range=dvec2(0, 1), int array_index=-1) |
set the current depth range or one of the depth ranges in the window transformation array | |
const std::vector< window_transformation > & | get_window_transformation_array () const |
return the current window transformation array | |
dmat4 | get_window_matrix (unsigned array_index=0) const |
return a homogeneous 4x4 matrix to transform clip to window coordinates | |
dmat4 | get_modelview_projection_window_matrix (unsigned array_index=0) const |
return a homogeneous 4x4 matrix to transfrom from model to window coordinates, i.e. the product of modelview, projection and device matrix in reversed order (window_matrix*projection_matrix*modelview_matrix) | |
virtual double | get_window_z (int x_window, int y_window) const =0 |
read the window z-coordinate from the depth buffer for the given opengl x- and y-coordinates | |
vec3 | get_model_point (int x_window, int y_window) const |
compute model space 3D point from the given opengl pixel location (window location) | |
vec3 | get_model_point (int x_window, int y_window, double z_window) const |
compute model space 3D point from the given opengl pixel location (window location) | |
vec3 | get_model_point (int x_window, int y_window, const dmat4 &modelview_projection_window_matrix) const |
compute model space 3D point from the given opengl pixel location (window location) and modelview_projection_window matrix | |
vec3 | get_model_point (const vec3 &p_window) const |
compute model space 3D point from the given window space point | |
dmat4 | get_device_matrix () const |
return homogeneous 4x4 projection matrix, which transforms from clip to device space | |
dmat4 | get_modelview_projection_device_matrix () const |
return matrix to transfrom from model to device coordinates, i.e. the product of modelview, projection and device matrix in reversed order (device_matrix*projection_matrix*modelview_matrix) | |
double | get_z_D (int x_D, int y_D) const |
read the window z-coordinate from the z-buffer for the given device x- and y-coordinates | |
vec3 | get_point_W (int x_D, int y_D) const |
compute the location in world space of a device x/y-location. For this the device point is extended with the device z-coordinate currently stored in the displayed depth buffer. | |
vec3 | get_point_W (int x_D, int y_D, const dmat4 &MPD) const |
compute the location in world space of a device x/y-location by inversion of the given transformation from world to device space. For this the device point is extended with the device z-coordinate currently stored in the displayed depth buffer. | |
vec3 | get_point_W (int x_D, int y_D, double z_D) const |
compute the location in world space of a device point. For this the current world to device transformation is inverted. | |
vec3 | get_point_W (int x_D, int y_D, double z_D, const dmat4 &MPD) const |
compute the location in world space of a device point by inversion of the given world to device transformation. | |
vec3 | get_point_W (const vec3 &p_D) const |
compute a the location in world space of a device point. | |
vec3 | get_point_W (const vec3 &p_D, const dmat4 &MPD) const |
compute a the location in world space of a device point. | |
bool | ensure_window_transformation_index (int &array_index) |
static vec3 | get_model_point (int x_window, int y_window, double z_window, const dmat4 &modelview_projection_window_matrix) |
compute model space 3D point from the given opengl pixel location (window location) with the given modelview_projection_window matrix | |
static vec3 | get_model_point (const dvec3 &p_window, const dmat4 &modelview_projection_window_matrix) |
compute model space 3D point from the given window space point and the given modelview_projection_window matrix | |
Additional Inherited Members | |
![]() | |
bool | depth_buffer |
default: true | |
bool | double_buffer |
default: true | |
bool | alpha_buffer |
default: false | |
bool | stereo_buffer |
default: false | |
bool | stencil_buffer |
default: false | |
bool | accumulation_buffer |
default: false | |
bool | multi_sample_buffer |
default: false | |
int | depth_bits |
default: -1 | |
int | stencil_bits |
default: -1 | |
int | accumulation_bits |
default: -1 | |
int | nr_multi_samples |
default: -1 | |
int | version_major |
default: -1 ... major version of maximum supported OpenGL version | |
int | version_minor |
default: -1 ... minor version of maximum supported OpenGL version | |
bool | forward_compatible |
default: false | |
bool | debug |
default: false in release and true in debug version | |
bool | core_profile |
default: true | |
std::vector< int > | context_creation_attrib_list |
provide integer vector to store context creation attribute list | |
base class for all drawables, which is independent of the used rendering API.
cgv::render::context::context | ( | ) |
init the cursor position to (0,0)
Definition at line 128 of file context.cxx.
References at_line_begin, auto_set_gamma_in_current_shader_program, auto_set_lights_in_current_shader_program, auto_set_material_in_current_shader_program, auto_set_view_in_current_shader_program, bg_accum_color_stack, bg_color_stack, bg_depth_stack, bg_stencil_stack, blend_state_stack, buffer_mask_stack, cull_state_stack, current_background, current_color, current_font_size, current_material_is_textured, current_material_ptr, cursor_x, debug_render_passes, default_light_source, default_light_source_handles, default_render_flags, depth_test_state_stack, draw_in_compatibility_mode, enable_vsync, frame_buffer_stack, gamma3, cgv::render::get_render_config(), light_source_handle, modelview_matrix_stack, nr_identations, phong_shading, cgv::render::RPF_DEFAULT, sRGB_framebuffer, support_compatibility_mode, tab_size, use_shader_file_cache, window_transformation_stack, and x_offset.
|
virtual |
virtual destructor
Definition at line 236 of file context.cxx.
void * cgv::render::context::add_light_source | ( | const cgv::media::illum::light_source & | light, |
bool | enabled = true , |
||
bool | place_now = false |
||
) |
add a new light source, enable it if enable
is true and place it relative to current model view transformation if place_now
is true; return handle to light source
Definition at line 504 of file context.cxx.
References enabled_light_source_handles, get_light_eye_position(), get_light_eye_spot_direction(), light_source_handle, light_sources, and on_lights_changed().
Referenced by render_pass().
|
pure virtual |
announce an external frame buffer change performed with rendering API to the cgv framework providing space to temporarily store frame buffer of cgv framework
Implemented in cgv::render::gl::gl_context.
|
pure virtual |
announce an external viewport change performed with rendering API to the cgv framework providing space to temporarily store viewport of cgv framework
Implemented in cgv::render::gl::gl_context.
|
protectedvirtual |
Definition at line 2233 of file context.cxx.
|
protectedvirtual |
Definition at line 2280 of file context.cxx.
|
protectedvirtual |
Definition at line 2261 of file context.cxx.
|
pure virtual |
clear the buffer contents of the flagged buffers to the set background colors
Implemented in cgv::render::gl::gl_context.
Referenced by cgv::app::navigator::finish_draw().
|
virtual |
helper method to integrate a new child
Definition at line 266 of file context.cxx.
References error(), cgv::render::drawable::init(), is_created(), make_current(), post_redraw(), cgv::render::drawable::set_context(), and cgv::base::traverser::traverse().
|
protectedvirtual |
Definition at line 254 of file context.cxx.
|
virtual |
disable blending
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1760 of file context.cxx.
References blend_state_stack.
Referenced by cgv::render::gl::gl_context::disable_blending().
|
virtual |
disable the depth test
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1695 of file context.cxx.
References depth_test_state_stack.
Referenced by cgv::render::gl::gl_context::disable_depth_test(), cgv::render::volume_renderer::enable(), cgv::app::navigator::finish_draw(), and cgv::app::gizmo::finish_frame().
|
inline |
disable a given light source and return whether there existed a light source with given handle
Definition at line 700 of file context.cxx.
References enabled_light_source_handles, cgv::base::action::end(), light_sources, and on_lights_changed().
|
virtual |
Definition at line 425 of file context.cxx.
|
pure virtual |
disable a material with textures
Implemented in cgv::render::gl::gl_context.
|
virtual |
Definition at line 414 of file context.cxx.
void cgv::render::context::disable_shader_file_cache | ( | ) |
disable the usage of the shader file caches
Definition at line 457 of file context.cxx.
References use_shader_file_cache.
|
pure virtual |
pass geometry of given faces to current shader program and generate draw calls to render lines for the edges
Implemented in cgv::render::gl::gl_context.
Referenced by tesselate_box(), tesselate_unit_cube(), tesselate_unit_disk(), cgv::render::tesselate_unit_dodecahedron_or_icosahedron(), tesselate_unit_octahedron(), tesselate_unit_prism(), tesselate_unit_square(), and tesselate_unit_tetrahedron().
|
pure virtual |
pass geometry of given strip or fan to current shader program and generate draw calls to render lines for the edges
Implemented in cgv::render::gl::gl_context.
Referenced by tesselate_unit_cone(), tesselate_unit_cylinder(), tesselate_unit_prism(), tesselate_unit_sphere(), and tesselate_unit_torus().
|
pure virtual |
pass geometry of given faces to current shader program and generate draw calls to render triangles
Implemented in cgv::render::gl::gl_context.
Referenced by cgv::render::gl::render_to_texture3D(), tesselate_box(), tesselate_unit_cube(), tesselate_unit_disk(), cgv::render::tesselate_unit_dodecahedron_or_icosahedron(), tesselate_unit_octahedron(), tesselate_unit_prism(), tesselate_unit_square(), and tesselate_unit_tetrahedron().
|
virtual |
draw a light source with an emissive material
[in] | l | to be rendered light source |
[in] | intensity_scale | used to multiply with the light source values |
Reimplemented in cgv::render::gl::gl_context.
Definition at line 2032 of file context.cxx.
|
pure virtual |
pass geometry of given strip or fan to current shader program and generate draw calls to render triangles
Implemented in cgv::render::gl::gl_context.
Referenced by tesselate_unit_cone(), tesselate_unit_cylinder(), tesselate_unit_prism(), tesselate_unit_sphere(), and tesselate_unit_torus().
draw some text at cursor position and update cursor position
Definition at line 888 of file context.cxx.
References current_font_face, cursor_x, and cgv::data::ref_ptr< T, is_ref_counted >::empty().
Referenced by process_text().
|
virtual |
Definition at line 245 of file context.cxx.
|
virtual |
enable blending
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1756 of file context.cxx.
References blend_state_stack.
Referenced by cgv::render::rectangle_renderer::enable(), cgv::render::volume_renderer::enable(), cgv::render::gl::gl_context::enable_blending(), cgv::app::navigator::finish_draw(), and cgv::app::gizmo::finish_frame().
|
virtual |
enable the depth test
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1691 of file context.cxx.
References depth_test_state_stack.
Referenced by cgv::render::gl::gl_context::enable_depth_test().
|
virtual |
enable the given font face with the given size in pixels
Definition at line 906 of file context.cxx.
References current_font_face, and current_font_size.
Referenced by vr_test::init_frame().
|
inline |
enable a given light source and return whether there existed a light source with given handle
Definition at line 685 of file context.cxx.
References enabled_light_source_handles, cgv::base::action::end(), light_sources, and on_lights_changed().
|
virtual |
Definition at line 420 of file context.cxx.
|
virtual |
Definition at line 429 of file context.cxx.
|
pure virtual |
enable a material with textures
Implemented in cgv::render::gl::gl_context.
|
virtual |
enable phong shading with the help of a shader (enabled by default)
Definition at line 408 of file context.cxx.
References error(), and phong_shading.
void cgv::render::context::enable_shader_file_cache | ( | ) |
enable the usage of the shader file caches
Definition at line 451 of file context.cxx.
References use_shader_file_cache.
enable or disable sRGB framebuffer
Definition at line 434 of file context.cxx.
References sRGB_framebuffer.
Definition at line 1880 of file context.cxx.
|
pure virtual |
get list of program attributes
Implemented in cgv::render::gl::gl_context.
|
pure virtual |
get list of program uniforms
Implemented in cgv::render::gl::gl_context.
|
virtual |
error handling
Definition at line 219 of file context.cxx.
References cgv::render::get_render_config().
Referenced by cgv::render::gl::gl_context::announce_external_frame_buffer_change(), cgv::render::gl::gl_context::announce_external_viewport_change(), cgv::render::gl::gl_context::configure_gl(), configure_new_child(), cgv::render::mesh_render_info::configure_vbos(), cgv::render::gl::cover_screen(), cgv::render::shader_program::disable(), cgv::render::attribute_array_binding::enable(), cgv::render::shader_program::enable(), enable_phong_shading(), cgv::render::gl::gl_context::frame_buffer_disable(), cgv::render::gl::gl_context::frame_buffer_is_complete(), get_window_matrix(), cgv::render::renderer::manage_singleton(), cgv::render::gl::gl_context::read_frame_buffer(), cgv::render::gl::gl_context::ref_default_shader_program(), cgv::render::gl::gl_context::ref_surface_shader_program(), cgv::render::shader_program::set_attribute(), cgv::render::shader_program::set_attribute(), cgv::render::shader_program::set_uniform(), cgv::render::shader_program::set_uniform_array(), cgv::render::shader_program::set_uniform_array(), cgv::render::gl::gl_context::tesselate_arrow(), cgv::render::arrow_renderer::validate_attributes(), cgv::render::group_renderer::validate_attributes(), cgv::render::normal_renderer::validate_attributes(), cgv::render::point_renderer::validate_attributes(), cgv::render::rectangle_renderer::validate_attributes(), cgv::render::renderer::validate_attributes(), cgv::render::slab_renderer::validate_attributes(), cgv::render::sphere_renderer::validate_attributes(), and cgv::render::surfel_renderer::validate_attributes().
|
virtual |
Definition at line 260 of file context.cxx.
|
protectedvirtual |
Definition at line 2340 of file context.cxx.
|
protectedvirtual |
Reimplemented in cgv::render::gl::gl_context.
Definition at line 2358 of file context.cxx.
|
protectedvirtual |
Definition at line 2331 of file context.cxx.
|
protectedvirtual |
Definition at line 2410 of file context.cxx.
|
protectedvirtual |
Reimplemented in cgv::render::gl::gl_context.
Definition at line 2395 of file context.cxx.
|
protectedvirtual |
Definition at line 2376 of file context.cxx.
|
protectedpure virtual |
Implemented in cgv::render::gl::gl_context.
float cgv::render::context::get_bg_accum_alpha | ( | ) | const |
return the current alpha value for clearing the accumulation buffer
Definition at line 403 of file context.cxx.
References bg_accum_color_stack.
vec4 cgv::render::context::get_bg_accum_color | ( | ) | const |
return the current color value for clearing the accumulation buffer
Definition at line 387 of file context.cxx.
References bg_accum_color_stack.
Referenced by cgv::render::gl::gl_context::gl_context(), pop_bg_accum_color(), and push_bg_accum_color().
float cgv::render::context::get_bg_alpha | ( | ) | const |
return the current alpha value for clearing the background
Definition at line 319 of file context.cxx.
References bg_color_stack.
return the current index of the background color
Definition at line 332 of file context.cxx.
References current_background.
vec4 cgv::render::context::get_bg_color | ( | ) | const |
return the current color value for clearing the background
Definition at line 302 of file context.cxx.
References bg_color_stack.
Referenced by cgv::render::gl::gl_context::gl_context(), pop_bg_color(), and push_bg_color().
float cgv::render::context::get_bg_depth | ( | ) | const |
return the current depth value for clearing the background
Definition at line 349 of file context.cxx.
References bg_depth_stack.
Referenced by cgv::render::gl::gl_context::gl_context(), pop_bg_depth(), and push_bg_depth().
int cgv::render::context::get_bg_stencil | ( | ) | const |
return the current stencil value for clearing the background
Definition at line 366 of file context.cxx.
References bg_stencil_stack.
Referenced by cgv::render::gl::gl_context::gl_context(), pop_bg_stencil(), and push_bg_stencil().
context::BlendState cgv::render::context::get_blend_state | ( | ) | const |
return the current blend state
Definition at line 1725 of file context.cxx.
References blend_state_stack.
Referenced by cgv::render::gl::gl_context::gl_context(), pop_blend_state(), and push_blend_state().
|
staticprotected |
Definition at line 2316 of file context.cxx.
context::BufferMask cgv::render::context::get_buffer_mask | ( | ) | const |
return the current buffer mask
Definition at line 1773 of file context.cxx.
References buffer_mask_stack.
Referenced by cgv::render::gl::gl_context::gl_context(), pop_buffer_mask(), and push_buffer_mask().
bvec4 cgv::render::context::get_color_mask | ( | ) | const |
get the color buffer mask
Definition at line 1789 of file context.cxx.
References buffer_mask_stack.
CullingMode cgv::render::context::get_cull_state | ( | ) | const |
return the current culling state
Definition at line 1708 of file context.cxx.
References cull_state_stack.
Referenced by cgv::render::gl::gl_context::gl_context(), pop_cull_state(), and push_cull_state().
|
virtual |
return the currently enabled font face
Reimplemented in cgv::render::gl::gl_context.
Definition at line 922 of file context.cxx.
References current_font_face.
Referenced by set_cursor().
|
virtual |
return the size in pixels of the currently enabled font face
Reimplemented in cgv::render::gl::gl_context.
Definition at line 916 of file context.cxx.
References current_font_size.
Referenced by set_cursor().
const cgv::media::illum::surface_material * cgv::render::context::get_current_material | ( | ) | const |
return pointer to current material or nullptr if no current material is available
Definition at line 1605 of file context.cxx.
References current_material_ptr.
Referenced by cgv::render::render_info::draw().
shader_program_base * cgv::render::context::get_current_program | ( | ) | const |
check for current program, prepare it for rendering and return pointer to it
Definition at line 440 of file context.cxx.
References shader_program_stack.
Referenced by cgv::render::render_info::draw(), cgv::render::gl::gl_context::prepare_attributes(), and cgv::render::gl::gl_context::release_attributes().
return current cursor location in opengl coordinates with (0,0) in lower left corner
store the current cursor location in the passed references to x and y coordinate
Definition at line 2010 of file context.cxx.
References cursor_x.
|
inline |
const cgv::media::illum::light_source & cgv::render::context::get_default_light_source | ( | size_t | i | ) | const |
return i-th default light source
Definition at line 717 of file context.cxx.
References default_light_source.
|
virtual |
return the default render pass flags
Definition at line 766 of file context.cxx.
References default_render_flags.
bool cgv::render::context::get_depth_mask | ( | ) | const |
get the depth buffer mask
Definition at line 1781 of file context.cxx.
References buffer_mask_stack.
context::DepthTestState cgv::render::context::get_depth_test_state | ( | ) | const |
return the current depth test state
Definition at line 1678 of file context.cxx.
References depth_test_state_stack.
Referenced by cgv::render::gl::gl_context::gl_context(), pop_depth_test_state(), and push_depth_test_state().
|
inline |
access to handle of i-th light source
Definition at line 671 of file context.cxx.
References enabled_light_source_handles.
Referenced by cgv::render::gl::gl_context::on_lights_changed(), and set_current_lights().
|
inline |
query current gamma computed as average over gamma3 per channel values
Definition at line 1080 of file context.h.
References cgv::math::fvec< T, N >::x(), cgv::math::fvec< T, N >::y(), and cgv::math::fvec< T, N >::z().
Referenced by set_current_gamma().
|
inline |
query current per color channel gamma
Definition at line 1082 of file context.h.
Referenced by set_current_gamma().
|
virtual |
device information
Definition at line 230 of file context.cxx.
Referenced by cgv::render::shader_code::read_code().
vec3 cgv::render::context::get_light_eye_position | ( | const cgv::media::illum::light_source & | light, |
bool | place_now | ||
) | const |
helper function to place lights
Definition at line 475 of file context.cxx.
References get_modelview_matrix().
Referenced by add_light_source(), and place_light_source().
vec3 cgv::render::context::get_light_eye_spot_direction | ( | const cgv::media::illum::light_source & | light, |
bool | place_now | ||
) | const |
helper function to place spot lights
helper function to place lights
Definition at line 489 of file context.cxx.
References get_modelview_matrix().
Referenced by add_light_source(), and place_light_source().
const cgv::media::illum::light_source & cgv::render::context::get_light_source | ( | void * | handle | ) | const |
read access to light source
Definition at line 548 of file context.cxx.
References light_sources.
Referenced by cgv::render::gl::gl_context::on_lights_changed().
const context::light_source_status & cgv::render::context::get_light_source_status | ( | void * | handle | ) | const |
read access to light source status
Definition at line 555 of file context.cxx.
References light_sources.
|
virtual |
return maximum number of light sources, that can be enabled in parallel
Definition at line 659 of file context.cxx.
Referenced by cgv::render::gl::set_lighting_parameters().
|
inline |
|
pure virtual |
query the maximum number of supported window transformations, which is at least 1
Implemented in cgv::render::gl::gl_context.
|
static |
compute model space 3D point from the given window space point and the given modelview_projection_window matrix
the function inversely transforms the window space point with the given modelview_projection_window matrix
Definition at line 1949 of file context.cxx.
|
inline |
compute model space 3D point from the given opengl pixel location (window location)
the function queries the window z coordinate from the depth buffer and inversely transforms the window space 3D point with the current modelview_projection_window matrix
Definition at line 1423 of file context.h.
Referenced by cgv::render::drawable::get_world_location().
|
inline |
compute model space 3D point from the given opengl pixel location (window location) and modelview_projection_window matrix
the function queries the window z coordinate from the depth buffer and inversely transforms the window space 3D point with the given modelview_projection_window matrix
|
inline |
|
pure virtual |
return homogeneous 4x4 viewing matrix, which transforms from world to eye space
Implemented in cgv::render::gl::gl_context.
Referenced by cgv::render::gl::gl_transparent_renderer::blend_texture_over_viewport(), cgv::plot::plot2d::draw(), cgv::render::clod_point_renderer::enable(), get_light_eye_position(), get_light_eye_spot_direction(), get_modelview_projection_device_matrix(), get_modelview_projection_window_matrix(), cgv::app::gizmo::handle(), mul_modelview_matrix(), and push_modelview_matrix().
dmat4 cgv::render::context::get_modelview_projection_device_matrix | ( | ) | const |
return matrix to transfrom from model to device coordinates, i.e. the product of modelview, projection and device matrix in reversed order (device_matrix*projection_matrix*modelview_matrix)
return homogeneous 4x4 matrix, which transforms from world to device space
Definition at line 2017 of file context.cxx.
References get_modelview_matrix(), get_projection_matrix(), and get_window_matrix().
dmat4 cgv::render::context::get_modelview_projection_window_matrix | ( | unsigned | array_index = 0 | ) | const |
return a homogeneous 4x4 matrix to transfrom from model to window coordinates, i.e. the product of modelview, projection and device matrix in reversed order (window_matrix*projection_matrix*modelview_matrix)
Definition at line 1943 of file context.cxx.
References get_modelview_matrix(), get_projection_matrix(), and get_window_matrix().
Referenced by put_cursor_coords().
|
inline |
size_t cgv::render::context::get_nr_enabled_light_sources | ( | ) | const |
return the number of light sources
Definition at line 665 of file context.cxx.
References enabled_light_source_handles.
Referenced by cgv::render::gl::gl_context::on_lights_changed(), and set_current_lights().
size_t cgv::render::context::get_nr_light_sources | ( | ) | const |
return the number of light sources
Definition at line 469 of file context.cxx.
References light_sources.
|
inline |
|
inline |
|
pure virtual |
return homogeneous 4x4 projection matrix, which transforms from eye to clip space
Implemented in cgv::render::gl::gl_context.
Referenced by cgv::render::gl::gl_transparent_renderer::blend_texture_over_viewport(), get_modelview_projection_device_matrix(), get_modelview_projection_window_matrix(), cgv::app::gizmo::handle(), mul_projection_matrix(), and push_projection_matrix().
|
pure virtual |
return the used rendering API
Implemented in cgv::render::gl::gl_context.
|
virtual |
return the current render pass
Definition at line 751 of file context.cxx.
References render_pass_stack, and cgv::render::RP_NONE.
Referenced by vr_view_interactor::after_finish(), and vr_view_interactor::init_frame().
|
virtual |
return the current render pass flags
Definition at line 758 of file context.cxx.
References render_pass_stack, and cgv::render::RPF_NONE.
Referenced by cgv::render::multi_pass_drawable::perform_render_pass(), and render_pass().
unsigned cgv::render::context::get_render_pass_recursion_depth | ( | ) | const |
return current render pass recursion depth
return the current render pass
Definition at line 745 of file context.cxx.
References render_pass_stack.
Referenced by cgv::render::multi_pass_drawable::initiate_render_pass_recursion(), cgv::render::multi_pass_drawable::multi_pass_ignore_finish(), and cgv::render::multi_pass_drawable::multi_pass_terminate().
|
virtual |
return the current render pass user data
Definition at line 779 of file context.cxx.
References render_pass_stack.
Referenced by cgv::render::multi_pass_drawable::multi_pass_ignore_finish().
return a homogeneous 4x4 matrix to transform clip to window coordinates
return a homogeneous 4x4 matrix to transform clip to window coordinates, optionally specify for the case of multiple viewports/depth ranges
In window coordinates x- and y-coordinates correspond to opengl pixel coordinates with (0,0) in lower left corner and z corresponds to depth value stored in the depth buffer. This is the same convention as in gl_FragCoord and gl_FragDepth of GLSL. Optionally one can specify a window transformation index with the parameter array_index
for the case when an array of window transformations is used.
Definition at line 1921 of file context.cxx.
References error(), cgv::utils::to_string(), and window_transformation_stack.
Referenced by get_modelview_projection_device_matrix(), and get_modelview_projection_window_matrix().
const std::vector< window_transformation > & cgv::render::context::get_window_transformation_array | ( | ) | const |
return the current window transformation array
Definition at line 1915 of file context.cxx.
References window_transformation_stack.
Referenced by cgv::app::gizmo::handle().
|
pure virtual |
read the window z-coordinate from the depth buffer for the given opengl x- and y-coordinates
Implemented in cgv::render::gl::gl_context.
Referenced by cgv::render::drawable::get_world_location().
|
inline |
|
virtual |
Definition at line 240 of file context.cxx.
check whether light source is enabled
Definition at line 676 of file context.cxx.
References cgv::base::action::end(), and light_sources.
bool cgv::render::context::is_shader_file_cache_enabled | ( | ) | const |
whether the shader file caches are enabled
Definition at line 463 of file context.cxx.
References use_shader_file_cache.
Referenced by cgv::render::shader_program::attach_files(), cgv::render::shader_program::attach_program(), and cgv::render::shader_code::read_code().
multiply given matrix from right to current modelview matrix
Definition at line 1808 of file context.cxx.
References get_modelview_matrix(), and set_modelview_matrix().
Referenced by cgv::plot::plot2d::draw(), cgv::plot::plot3d::draw(), vr_test::draw(), cgv::render::gl::image_drawable::draw(), cgv::render::volume_renderer::draw(), cgv::render::gl::gl_context::draw_light_source(), vr_view_interactor::draw_vr_kits(), vr_test::finish_draw(), cgv::app::gizmo::finish_frame(), cgv::render::gl::gl_context::rotate_vector_to_target(), cgv::render::gl::gl_context::tesselate_arrow(), and cgv::render::gl::gl_context::tesselate_arrow().
multiply given matrix from right to current projection matrix
Definition at line 1831 of file context.cxx.
References get_projection_matrix(), and set_projection_matrix().
|
protectedvirtual |
helper function to send light update events
Reimplemented in cgv::render::gl::gl_context.
Definition at line 632 of file context.cxx.
References auto_set_lights_in_current_shader_program, set_current_lights(), and shader_program_stack.
Referenced by add_light_source(), disable_light_source(), enable_light_source(), cgv::render::gl::gl_context::on_lights_changed(), place_light_source(), remove_light_source(), and set_light_source().
|
virtual |
returns an output stream whose output is printed at the current cursor location, which is managed by the context.
returns an output stream whose output is printed at the current cursor location
The coordinate system of the cursor location corresponds to opengl coordinates with (0,0) in lower left corner. The cursor position is updated during text drawing also by special characters like tab or new line and can be read back with the get_cursor method. Use the flush method of the output_stream to ensure that text has been drawn to the context.
Definition at line 901 of file context.cxx.
References out_stream.
Referenced by vr_test::init_frame(), and set_cursor().
|
virtual |
Definition at line 250 of file context.cxx.
place the given light source relative to current model viel transformation
Definition at line 648 of file context.cxx.
References get_light_eye_position(), get_light_eye_spot_direction(), light_sources, and on_lights_changed().
Referenced by render_pass(), and set_light_source().
void cgv::render::context::pop_bg_accum_color | ( | ) |
pop the top of the current background accumulation color from the stack
Definition at line 374 of file context.cxx.
References bg_accum_color_stack, get_bg_accum_color(), and set_bg_accum_color().
void cgv::render::context::pop_bg_color | ( | ) |
pop the top of the current background color from the stack
Definition at line 288 of file context.cxx.
References bg_color_stack, get_bg_color(), and set_bg_color().
Referenced by cgv::app::navigator::finish_draw().
void cgv::render::context::pop_bg_depth | ( | ) |
pop the top of the current background depth value from the stack
Definition at line 340 of file context.cxx.
References bg_depth_stack, get_bg_depth(), and set_bg_depth().
void cgv::render::context::pop_bg_stencil | ( | ) |
pop the top of the current background stencil value from the stack
Definition at line 357 of file context.cxx.
References bg_stencil_stack, get_bg_stencil(), and set_bg_stencil().
void cgv::render::context::pop_blend_state | ( | ) |
pop the top of the current culling state from the stack
Definition at line 1720 of file context.cxx.
References blend_state_stack, get_blend_state(), and set_blend_state().
Referenced by cgv::render::rectangle_renderer::disable(), cgv::render::volume_renderer::disable(), cgv::app::navigator::finish_draw(), and cgv::app::gizmo::finish_frame().
void cgv::render::context::pop_buffer_mask | ( | ) |
pop the top of the current buffer mask from the stack
Definition at line 1768 of file context.cxx.
References buffer_mask_stack, get_buffer_mask(), and set_buffer_mask().
void cgv::render::context::pop_cull_state | ( | ) |
pop the top of the current culling state from the stack
Definition at line 1703 of file context.cxx.
References cull_state_stack, get_cull_state(), and set_cull_state().
Referenced by cgv::render::volume_renderer::disable(), and cgv::render::gl::gl_context::draw_light_source().
void cgv::render::context::pop_depth_test_state | ( | ) |
pop the top of the current depth test state from the stack
Definition at line 1673 of file context.cxx.
References depth_test_state_stack, get_depth_test_state(), and set_depth_test_state().
Referenced by cgv::render::volume_renderer::disable(), cgv::app::navigator::finish_draw(), and cgv::app::gizmo::finish_frame().
void cgv::render::context::pop_modelview_matrix | ( | ) |
see push_V for an explanation
Definition at line 1814 of file context.cxx.
References modelview_matrix_stack, and set_modelview_matrix().
Referenced by cgv::render::gl::cover_screen(), cgv::plot::plot2d::draw(), cgv::plot::plot3d::draw(), vr_test::draw(), cgv::render::gl::image_drawable::draw(), cgv::render::volume_renderer::draw(), cgv::render::gl::gl_context::draw_light_source(), vr_view_interactor::draw_vr_kits(), cgv::app::navigator::finish_draw(), vr_test::finish_draw(), cgv::app::gizmo::finish_frame(), cgv::render::gl::gl_context::pop_pixel_coords(), cgv::render::gl::gl_context::tesselate_arrow(), and cgv::render::gl::gl_context::tesselate_arrow().
|
pure virtual |
pop previously pushed transformation matrices from modelview and projection stacks
Implemented in cgv::render::gl::gl_context.
Referenced by cgv::render::gl::gl_performance_monitor::draw(), vr_test::init_frame(), and process_text().
void cgv::render::context::pop_projection_matrix | ( | ) |
see push_P for an explanation
Definition at line 1825 of file context.cxx.
References set_projection_matrix().
Referenced by cgv::render::gl::cover_screen(), cgv::app::navigator::finish_draw(), and cgv::render::gl::gl_context::pop_pixel_coords().
|
virtual |
restore previous viewport and depth range arrays defining the window transformations
recover the previous viewport and depth range settings; an error is emitted if the window_transformation stack becomes empty
An error is emitted when the method fails because the stack of window transformations would become empty, which is not allowed.
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1875 of file context.cxx.
References window_transformation_stack.
Referenced by cgv::render::frame_buffer::pop_viewport(), cgv::render::gl::gl_context::pop_window_transformation_array(), and cgv::render::gl::render_to_texture3D().
callback method for processing of text from the output stream
Definition at line 843 of file context.cxx.
References at_line_begin, current_font_size, cursor_x, draw_text(), nr_identations, pop_pixel_coords(), push_pixel_coords(), tab_size, and x_offset.
void cgv::render::context::push_bg_accum_color | ( | ) |
push a copy of the current background accumulation color onto the stack
Definition at line 370 of file context.cxx.
References bg_accum_color_stack, and get_bg_accum_color().
void cgv::render::context::push_bg_color | ( | ) |
push a copy of the current background color onto the stack
Definition at line 284 of file context.cxx.
References bg_color_stack, and get_bg_color().
Referenced by cgv::app::navigator::finish_draw().
void cgv::render::context::push_bg_depth | ( | ) |
push a copy of the current background depth value onto the stack
Definition at line 336 of file context.cxx.
References bg_depth_stack, and get_bg_depth().
void cgv::render::context::push_bg_stencil | ( | ) |
push a copy of the current background stencil value onto the stack
Definition at line 353 of file context.cxx.
References bg_stencil_stack, and get_bg_stencil().
void cgv::render::context::push_blend_state | ( | ) |
push a copy of the current blend state onto the stack saved attributes: blend enablement, color and alpha source and destinatin functions
Definition at line 1716 of file context.cxx.
References blend_state_stack, and get_blend_state().
Referenced by cgv::render::rectangle_renderer::enable(), cgv::render::volume_renderer::enable(), cgv::app::navigator::finish_draw(), and cgv::app::gizmo::finish_frame().
void cgv::render::context::push_buffer_mask | ( | ) |
push a copy of the current buffer mask onto the stack saved attributes: depth mask, color mask
Definition at line 1764 of file context.cxx.
References buffer_mask_stack, and get_buffer_mask().
void cgv::render::context::push_cull_state | ( | ) |
push a copy of the current culling state onto the stack saved attributes: cull face enablement, cull face
Definition at line 1699 of file context.cxx.
References cull_state_stack, and get_cull_state().
Referenced by cgv::render::gl::gl_context::draw_light_source(), and cgv::render::volume_renderer::enable().
void cgv::render::context::push_depth_test_state | ( | ) |
push a copy of the current depth test state onto the stack saved attributes: depth test enablement, depth test function
Definition at line 1669 of file context.cxx.
References depth_test_state_stack, and get_depth_test_state().
Referenced by cgv::render::volume_renderer::enable(), cgv::app::navigator::finish_draw(), and cgv::app::gizmo::finish_frame().
void cgv::render::context::push_modelview_matrix | ( | ) |
push the current viewing matrix onto a matrix stack for viewing matrices.
A software implementation is used for the matrix stack as some hardware stacks - i.e. in opengl - have strong limitations on their maximum size. The push_V method does not change the current viewing matrix similarly to the glPushMatrix function. Use pop_V() to restore the pushed viewing matrix into the current viewing matrix. Don't intermix these methods with the correspondong opengl or directx functions.
Definition at line 1802 of file context.cxx.
References get_modelview_matrix(), and modelview_matrix_stack.
Referenced by cgv::render::gl::cover_screen(), cgv::plot::plot2d::draw(), cgv::plot::plot3d::draw(), vr_test::draw(), cgv::render::gl::image_drawable::draw(), cgv::render::volume_renderer::draw(), cgv::render::gl::gl_context::draw_light_source(), vr_view_interactor::draw_vr_kits(), cgv::app::navigator::finish_draw(), vr_test::finish_draw(), cgv::app::gizmo::finish_frame(), cgv::render::gl::gl_context::push_pixel_coords(), cgv::render::gl::gl_context::tesselate_arrow(), and cgv::render::gl::gl_context::tesselate_arrow().
|
pure virtual |
use this to push new modelview and new projection matrices onto the transformation stacks such that x and y coordinates correspond to opengl coordinates with (0,0) in lower left corner.
To transform mouse pointer coordinates to opengl coordinates use get_context()->get_height()-1-mouse_y.
Implemented in cgv::render::gl::gl_context.
Referenced by cgv::render::gl::gl_performance_monitor::draw(), vr_test::init_frame(), and process_text().
void cgv::render::context::push_projection_matrix | ( | ) |
same as push_V but for the projection matrix - a different matrix stack is used.
Definition at line 1820 of file context.cxx.
References get_projection_matrix().
Referenced by cgv::render::gl::cover_screen(), cgv::app::navigator::finish_draw(), and cgv::render::gl::gl_context::push_pixel_coords().
void cgv::render::context::push_window_transformation_array | ( | ) |
push a copy of the current viewport and depth range arrays defining the window transformations
Definition at line 1870 of file context.cxx.
References window_transformation_stack.
Referenced by cgv::render::frame_buffer::push_viewport(), and cgv::render::gl::render_to_texture3D().
copy the current accumulation background rgba color into the given float array
Definition at line 391 of file context.cxx.
References bg_accum_color_stack.
copy the current background rgba color into the given float array
Definition at line 306 of file context.cxx.
References bg_color_stack.
transform point p in current world coordinates into opengl coordinates with (0,0) in lower left corner and put x and y coordinates into the passed variables
transform point p into cursor coordinates and put x and y coordinates into the passed variables
Definition at line 1971 of file context.cxx.
References get_modelview_projection_window_matrix(), and cgv::math::vec< T >::size().
Referenced by set_cursor().
|
pure virtual |
read the current frame buffer or a rectangular region of it into the given data view.
If no format is associated with the data view, a new format is created and assigned to the data view.
If width and height are not specified in the format associated with the data view or in the parameters, they are determined from the current viewport size.
x and y specify the pixel offset of the region measured from the left upper corner.
The parameter buffer_type is only used in case of reading color or alpha components and specifies from which color buffer to read the data.
Implemented in cgv::render::gl::gl_context.
Referenced by write_frame_buffer_to_image(), and cgv::render::texture::write_to_file().
|
pure virtual |
restore cgv frame buffer to the state before the external change
Implemented in cgv::render::gl::gl_context.
Referenced by vr_view_interactor::after_finish().
|
pure virtual |
restore cgv viewport to the state before the external change
Implemented in cgv::render::gl::gl_context.
Referenced by vr_view_interactor::after_finish().
|
virtual |
recreate context based on current context config settings
Definition at line 59 of file context.cxx.
|
pure virtual |
return a reference to a shader program used to render without illumination
Implemented in cgv::render::gl::gl_context.
Referenced by cgv::render::gl::cover_screen(), cgv::render::gl::gl_performance_monitor::draw(), vr_test::draw(), cgv::render::gl::image_drawable::draw(), vr_view_interactor::draw_action_zone(), and vr_test::finish_draw().
|
pure virtual |
return a reference to the default shader program used to render surfaces
Implemented in cgv::render::gl::gl_context.
Referenced by cgv::render::gl::gl_implicit_surface_drawable_base::draw(), cgv::render::gl::gl_implicit_surface_drawable_base::draw_implicit_surface(), vr::get_vrmesh_render_info(), vr_test::init(), and cgv::render::gl::mesh_drawable::init_frame().
remove a light source by handle and whether it existed
Definition at line 528 of file context.cxx.
References enabled_light_source_handles, cgv::base::action::end(), light_sources, and on_lights_changed().
|
virtual |
perform the given render task
Definition at line 791 of file context.cxx.
References add_light_source(), cgv::render::drawable::after_finish(), debug_render_passes, default_light_source, default_light_source_handles, cgv::render::drawable::draw(), cgv::render::drawable::finish_draw(), cgv::render::drawable::finish_frame(), get_render_pass_flags(), cgv::render::get_render_pass_name(), nr_default_light_sources, place_light_source(), render_pass_stack, cgv::render::RPF_DRAW_TEXTUAL_INFO, cgv::render::RPF_DRAWABLES_AFTER_FINISH, cgv::render::RPF_DRAWABLES_DRAW, cgv::render::RPF_DRAWABLES_FINISH_FRAME, cgv::render::RPF_HANDLE_SCREEN_SHOT, cgv::render::RPF_SET_LIGHTS, and cgv::base::traverser::traverse().
Referenced by cgv::render::multi_pass_drawable::perform_render_pass().
set a user defined background alpha value for the accumulation buffer
Definition at line 399 of file context.cxx.
References bg_accum_color_stack.
set a user defined background color for the accumulation buffer
Definition at line 383 of file context.cxx.
References set_bg_accum_color().
set a user defined background color for the accumulation buffer
Reimplemented in cgv::render::gl::gl_context.
Definition at line 379 of file context.cxx.
References bg_accum_color_stack.
Referenced by pop_bg_accum_color(), set_bg_accum_color(), and cgv::render::gl::gl_context::set_bg_accum_color().
set a user defined background alpha value
Definition at line 314 of file context.cxx.
References bg_color_stack.
set an indexed background color
Definition at line 323 of file context.cxx.
References current_background, and set_bg_color().
set a user defined background color
Definition at line 297 of file context.cxx.
References set_bg_color().
set a user defined background color
Reimplemented in cgv::render::gl::gl_context.
Definition at line 293 of file context.cxx.
References bg_color_stack.
Referenced by cgv::app::navigator::finish_draw(), pop_bg_color(), set_bg_clr_idx(), set_bg_color(), and cgv::render::gl::gl_context::set_bg_color().
set a user defined background depth value
Reimplemented in cgv::render::gl::gl_context.
Definition at line 345 of file context.cxx.
References bg_depth_stack.
Referenced by pop_bg_depth(), and cgv::render::gl::gl_context::set_bg_depth().
set a user defined background stencil value
Reimplemented in cgv::render::gl::gl_context.
Definition at line 362 of file context.cxx.
References bg_stencil_stack.
Referenced by pop_bg_stencil(), and cgv::render::gl::gl_context::set_bg_stencil().
|
virtual |
set the blend function
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1733 of file context.cxx.
References blend_state_stack, cgv::render::context::BlendState::dst_alpha, cgv::render::context::BlendState::dst_color, cgv::render::context::BlendState::src_alpha, and cgv::render::context::BlendState::src_color.
Referenced by cgv::app::navigator::finish_draw(), cgv::render::gl::gl_context::set_blend_func(), set_blend_func_back_to_front(), and set_blend_func_front_to_back().
void cgv::render::context::set_blend_func_back_to_front | ( | ) |
set the default blend function for back to front blending
Definition at line 1752 of file context.cxx.
References set_blend_func().
Referenced by cgv::render::rectangle_renderer::enable(), cgv::render::volume_renderer::enable(), and cgv::app::gizmo::finish_frame().
void cgv::render::context::set_blend_func_front_to_back | ( | ) |
set the default blend function for front to back blending
Definition at line 1749 of file context.cxx.
References set_blend_func().
|
virtual |
set the blend function separately for color and alpha
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1741 of file context.cxx.
References blend_state_stack, cgv::render::context::BlendState::dst_alpha, cgv::render::context::BlendState::dst_color, cgv::render::context::BlendState::src_alpha, and cgv::render::context::BlendState::src_color.
Referenced by cgv::app::navigator::finish_draw(), and cgv::render::gl::gl_context::set_blend_func_separate().
|
virtual |
set the complete blend state
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1729 of file context.cxx.
References blend_state_stack.
Referenced by pop_blend_state(), and cgv::render::gl::gl_context::set_blend_state().
|
virtual |
set the buffer mask for depth and color buffers
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1777 of file context.cxx.
References buffer_mask_stack.
Referenced by pop_buffer_mask(), and cgv::render::gl::gl_context::set_buffer_mask().
|
inlinevirtual |
set the current color
Definition at line 1092 of file context.h.
References set_color().
Referenced by set_color().
set the current color
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1617 of file context.cxx.
References current_color, cgv::render::shader_program::set_attribute(), and shader_program_stack.
Referenced by cgv::render::gl::cover_screen(), vr_test::draw(), cgv::render::gl::image_drawable::draw(), cgv::render::gl::gl_implicit_surface_drawable_base::draw(), vr_view_interactor::draw_action_zone(), cgv::render::line_renderer::enable(), cgv::render::surface_renderer::enable(), vr_test::finish_draw(), and cgv::render::gl::gl_implicit_surface_drawable_base::finish_frame().
set the color buffer mask
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1794 of file context.cxx.
References buffer_mask_stack.
Referenced by cgv::render::gl::gl_context::set_color_mask().
|
virtual |
set the culling state
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1712 of file context.cxx.
References cull_state_stack.
Referenced by cgv::render::volume_renderer::enable(), pop_cull_state(), and cgv::render::gl::gl_context::set_cull_state().
void cgv::render::context::set_current_gamma | ( | shader_program & | prog | ) | const |
set the shader program gamma values
Definition at line 1580 of file context.cxx.
References get_gamma(), get_gamma3(), cgv::render::shader_program::get_uniform_location(), and cgv::render::shader_program::set_uniform().
Referenced by set_gamma3().
void cgv::render::context::set_current_lights | ( | shader_program & | prog | ) | const |
set the shader program lights to the currently enabled lights
Definition at line 617 of file context.cxx.
References get_enabled_light_source_handle(), get_nr_enabled_light_sources(), light_source_handle, light_sources, cgv::render::shader_program::set_light_uniform(), cgv::render::shader_program::set_uniform(), and cgv::utils::to_string().
Referenced by on_lights_changed().
void cgv::render::context::set_current_material | ( | shader_program & | prog | ) | const |
set the shader program material to the currently enabled material
Definition at line 605 of file context.cxx.
References current_material_is_textured, current_material_ptr, and cgv::render::shader_program::set_material_uniform().
void cgv::render::context::set_current_view | ( | shader_program & | prog, |
bool | modelview_deps = true , |
||
bool | projection_deps = true |
||
) | const |
set the shader program view matrices to the currently enabled view matrices
Definition at line 576 of file context.cxx.
References modelview_matrix_stack, and cgv::render::shader_program::set_uniform().
Referenced by set_modelview_matrix(), and set_projection_matrix().
|
virtual |
flush output_stream and set the current text position from a 3D or 4D location in current world coordinates.
sets the current text ouput position
These are transformed to opengl coordinates opengl coordinates with (0,0) in lower left corner using the put_cursor_coords method. If the optional parameters are given, update the cursor location such that the given text alignment is achieved. x_offset and y_offset are in pixel and y points upward.
Definition at line 1984 of file context.cxx.
References get_current_font_face(), get_current_font_size(), put_cursor_coords(), set_cursor(), and x_offset.
flush the output_stream and set a new cursor position given in opengl coordinates with (0,0) in lower left corner
set a new cursor position, which is only valid between calls of push_pixel_coords and pop_pixel_coords
Definition at line 1959 of file context.cxx.
References at_line_begin, cursor_x, nr_identations, output_stream(), and x_offset.
Referenced by vr_test::init_frame(), and set_cursor().
set flag whether to debug render passes
Definition at line 785 of file context.cxx.
References debug_render_passes.
void cgv::render::context::set_default_light_source | ( | size_t | i, |
const cgv::media::illum::light_source & | ls | ||
) |
set i-th default light source
Definition at line 723 of file context.cxx.
References default_light_source.
|
virtual |
return the default render pass flags
Definition at line 771 of file context.cxx.
References default_render_flags, in_render_process(), and post_redraw().
|
virtual |
set the depth test function
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1686 of file context.cxx.
References depth_test_state_stack.
Referenced by cgv::render::gl::gl_context::set_depth_func().
set the depth buffer mask
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1785 of file context.cxx.
References buffer_mask_stack.
Referenced by cgv::render::gl::gl_context::set_depth_mask().
|
virtual |
set the current depth range or one of the depth ranges in the window transformation array
The behaviour with respect to parameters array_index
is the same as in the set_viewport() method.
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1908 of file context.cxx.
References window_transformation_stack.
Referenced by cgv::render::frame_buffer::push_viewport(), and cgv::render::gl::gl_context::set_depth_range().
|
virtual |
set the depth test state
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1682 of file context.cxx.
References depth_test_state_stack.
Referenced by pop_depth_test_state(), and cgv::render::gl::gl_context::set_depth_test_state().
set the current per channel gamma values to single value
Definition at line 1575 of file context.cxx.
References set_gamma3().
Referenced by vr_test::init().
set the current per channel gamma values to single value
Definition at line 1590 of file context.cxx.
References auto_set_gamma_in_current_shader_program, gamma3, set_current_gamma(), and shader_program_stack.
Referenced by set_gamma().
void cgv::render::context::set_light_source | ( | void * | handle, |
const cgv::media::illum::light_source & | light, | ||
bool | place_now = true |
||
) |
set light source newly
Definition at line 563 of file context.cxx.
References light_sources, on_lights_changed(), and place_light_source().
|
virtual |
set the current material
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1632 of file context.cxx.
References auto_set_material_in_current_shader_program, current_material_is_textured, current_material_ptr, cgv::render::shader_program::set_material_uniform(), and shader_program_stack.
Referenced by cgv::render::render_info::draw(), cgv::render::gl::gl_implicit_surface_drawable_base::draw_implicit_surface(), cgv::render::surface_renderer::enable(), and cgv::render::gl::gl_context::set_material().
set the current modelview matrix, which transforms from world to eye space
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1836 of file context.cxx.
References auto_set_view_in_current_shader_program, modelview_matrix_stack, set_current_view(), and shader_program_stack.
Referenced by cgv::render::gl::cover_screen(), cgv::app::navigator::finish_draw(), vr_view_interactor::init_frame(), mul_modelview_matrix(), pop_modelview_matrix(), and cgv::render::gl::gl_context::set_modelview_matrix().
|
inline |
set the current projection matrix, which transforms from eye to clip space
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1853 of file context.cxx.
References auto_set_view_in_current_shader_program, set_current_view(), and shader_program_stack.
Referenced by cgv::render::gl::cover_screen(), cgv::app::navigator::finish_draw(), vr_view_interactor::init_frame(), mul_projection_matrix(), pop_projection_matrix(), and cgv::render::gl::gl_context::set_projection_matrix().
|
virtual |
set the current material
Definition at line 1651 of file context.cxx.
References auto_set_material_in_current_shader_program, current_material_is_textured, current_material_ptr, cgv::render::shader_program::set_textured_material_uniform(), and shader_program_stack.
Referenced by cgv::render::gl::gl_context::enable_material().
|
inline |
set the current viewport or one of the viewports in the window transformation array
If the parameter array_index
is -1 (for example by not specifying it), the current window transformation array is resized to a single viewport and the viewport is set to the integer vector of pixel values in the viewport
parameter: [x0,y0,width,height]. If an array_index
>= 0 is specified, the window transformation array is resized such that the specified array_index
is valid and the corresponding viewport is set. If resizing generates new viewports or depth ranges, the default values are set, which are [0,0,widthOfContext, heightOfContext] for viewports and [0.0,1.0] for depth ranges. If resizing increases the number of viewport transformations over the allowed number, an error is issued.
Reimplemented in cgv::render::gl::gl_context.
Definition at line 1901 of file context.cxx.
References window_transformation_stack.
Referenced by cgv::render::frame_buffer::push_viewport(), cgv::render::gl::render_to_texture3D(), and cgv::render::gl::gl_context::set_viewport().
|
protectedvirtual |
Definition at line 2200 of file context.cxx.
|
protectedvirtual |
Definition at line 2181 of file context.cxx.
|
protectedvirtual |
Definition at line 2166 of file context.cxx.
|
protectedvirtual |
Definition at line 2139 of file context.cxx.
|
inline |
|
virtual |
define length and direction from start and end point and draw an arrow
Reimplemented in cgv::render::gl::gl_context.
Definition at line 2027 of file context.cxx.
|
virtual |
tesselate an arrow from the origin in z-direction
An arrow of length L is composed of a cylinder of radius R and a cone of radius r. The parameters are
[in] | length | the total length of the radius |
[in] | aspect | is defined as R/L |
[in] | rel_tip_radius | is defined as r/R |
[in] | tip_aspect | is defined as r/l |
Reimplemented in cgv::render::gl::gl_context.
Definition at line 2022 of file context.cxx.
|
virtual |
tesselate an axis aligned box
tessellate an axis aligned box in single precision
Definition at line 1107 of file context.cxx.
References draw_edges_of_faces(), draw_faces(), cgv::media::axis_aligned_box< T, N >::get_max_pnt(), and cgv::media::axis_aligned_box< T, N >::get_min_pnt().
void cgv::render::context::tesselate_unit_cone | ( | int | resolution = 25 , |
bool | flip_normals = false , |
||
bool | edges = false |
||
) |
tesselate a cone of radius 1
tessellate a cone of radius 1
Definition at line 1208 of file context.cxx.
References draw_edges_of_strip_or_fan(), and draw_strip_or_fan().
Referenced by cgv::render::gl::gl_context::draw_light_source(), and cgv::render::gl::gl_context::tesselate_arrow().
tesselate a unit cube with extent from [-1,-1,-1] to [1,1,1] with face normals that can be flipped
tessellate a unit cube with extent from [-1,-1,-1] to [1,1,1] with face normals that can be flipped
Definition at line 1054 of file context.cxx.
References draw_edges_of_faces(), and draw_faces().
void cgv::render::context::tesselate_unit_cylinder | ( | int | resolution = 25 , |
bool | flip_normals = false , |
||
bool | edges = false |
||
) |
tesselate a cylinder of radius 1
tessellate a cylinder of radius 1
Definition at line 1252 of file context.cxx.
References draw_edges_of_strip_or_fan(), and draw_strip_or_fan().
Referenced by cgv::render::gl::gl_context::tesselate_arrow().
void cgv::render::context::tesselate_unit_disk | ( | int | resolution = 25 , |
bool | flip_normals = false , |
||
bool | edges = false |
||
) |
tesselate a circular disk of radius 1
tessellate a circular disk of radius 1
Definition at line 1176 of file context.cxx.
References draw_edges_of_faces(), and draw_faces().
Referenced by cgv::render::gl::gl_context::tesselate_arrow().
void cgv::render::context::tesselate_unit_dodecahedron | ( | bool | flip_normals = false , |
bool | edges = false |
||
) |
tesselate a dodecahedron
tessellate a dodecahedron
Definition at line 1565 of file context.cxx.
References cgv::render::tesselate_unit_dodecahedron_or_icosahedron().
void cgv::render::context::tesselate_unit_icosahedron | ( | bool | flip_normals = false , |
bool | edges = false |
||
) |
tesselate an icosahedron
tessellate an icosahedron
Definition at line 1570 of file context.cxx.
References cgv::render::tesselate_unit_dodecahedron_or_icosahedron().
void cgv::render::context::tesselate_unit_octahedron | ( | bool | flip_normals = false , |
bool | edges = false |
||
) |
tesselate a octahedron
tessellate a octahedron
Definition at line 1450 of file context.cxx.
References draw_edges_of_faces(), and draw_faces().
tesselate a prism
tessellate a prism
Definition at line 1141 of file context.cxx.
References draw_edges_of_faces(), draw_edges_of_strip_or_fan(), draw_faces(), and draw_strip_or_fan().
void cgv::render::context::tesselate_unit_sphere | ( | int | resolution = 25 , |
bool | flip_normals = false , |
||
bool | edges = false |
||
) |
tesselate a sphere of radius 1
tessellate a sphere of radius 1
Definition at line 1344 of file context.cxx.
References draw_edges_of_strip_or_fan(), and draw_strip_or_fan().
Referenced by cgv::render::gl::gl_context::draw_light_source().
tesselate a unit square in the xy-plane with texture coordinates
tessellate a unit square
Definition at line 1423 of file context.cxx.
References draw_edges_of_faces(), and draw_faces().
Referenced by cgv::render::gl::image_drawable::draw(), and vr_test::finish_draw().
void cgv::render::context::tesselate_unit_tetrahedron | ( | bool | flip_normals = false , |
bool | edges = false |
||
) |
tesselate a tetrahedron
tessellate a tetrahedron
Definition at line 1395 of file context.cxx.
References draw_edges_of_faces(), and draw_faces().
void cgv::render::context::tesselate_unit_torus | ( | float | minor_radius = 0.2f , |
int | resolution = 25 , |
||
bool | flip_normals = false , |
||
bool | edges = false |
||
) |
tesselate a torus with major radius of one and given minor radius
tessellate a torus with major radius of one and given minor radius
Definition at line 1294 of file context.cxx.
References draw_edges_of_strip_or_fan(), and draw_strip_or_fan().
bool cgv::render::context::write_frame_buffer_to_image | ( | const std::string & | file_name, |
data::ComponentFormat | cf = data::CF_RGB , |
||
FrameBufferType | buffer_type = FB_BACK , |
||
unsigned int | x = 0 , |
||
unsigned int | y = 0 , |
||
int | w = -1 , |
||
int | h = -1 , |
||
float | depth_offset = 0.9f , |
||
float | depth_scale = 10.0f |
||
) |
write the content of the frame buffer to an image file.
write the content of a buffer to an image file
In case of writing a depth buffer a the depth offset is subtracted from the value and scaled by the depth scale before conversion to an unsigned int of bit depth 8 is performed.
Definition at line 929 of file context.cxx.
References cgv::data::CF_D, cgv::data::CF_S, cgv::data::data_view_base::get_format(), cgv::data::data_format::get_height(), cgv::data::data_view_impl< D, P >::get_ptr(), cgv::data::data_format::get_width(), read_frame_buffer(), cgv::data::data_format::set_height(), cgv::data::data_format::set_width(), cgv::type::info::TI_FLT32, cgv::type::info::TI_UINT8, and cgv::media::image::image_writer::write_image().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
store whether we are at the beginning of the line
Definition at line 796 of file context.h.
Referenced by context(), process_text(), and set_cursor().
|
protected |
|
protected |
whether to automatically set gamma in current shader program, defaults to true
Definition at line 684 of file context.h.
Referenced by context(), and set_gamma3().
|
protected |
whether to automatically set lights in current shader program, defaults to true
Definition at line 680 of file context.h.
Referenced by context(), and on_lights_changed().
|
protected |
whether to automatically set material in current shader program, defaults to true
Definition at line 682 of file context.h.
Referenced by context(), set_material(), and set_textured_material().
|
protected |
whether to automatically set viewing matrixes in current shader program, defaults to true
Definition at line 678 of file context.h.
Referenced by context(), set_modelview_matrix(), and set_projection_matrix().
|
protected |
stack of background accumulation colors
Definition at line 707 of file context.h.
Referenced by context(), get_bg_accum_alpha(), get_bg_accum_color(), pop_bg_accum_color(), push_bg_accum_color(), put_bg_accum_color(), set_bg_accum_alpha(), and set_bg_accum_color().
|
protected |
stack of background colors
Definition at line 701 of file context.h.
Referenced by context(), get_bg_alpha(), get_bg_color(), pop_bg_color(), push_bg_color(), put_bg_color(), set_bg_alpha(), and set_bg_color().
|
protected |
stack of background depth values
Definition at line 703 of file context.h.
Referenced by context(), get_bg_depth(), pop_bg_depth(), push_bg_depth(), and set_bg_depth().
|
protected |
stack of background stencil values
Definition at line 705 of file context.h.
Referenced by context(), get_bg_stencil(), pop_bg_stencil(), push_bg_stencil(), and set_bg_stencil().
|
protected |
stack of blend states
Definition at line 714 of file context.h.
Referenced by context(), disable_blending(), enable_blending(), get_blend_state(), pop_blend_state(), push_blend_state(), set_blend_func(), set_blend_func_separate(), and set_blend_state().
|
protected |
stack of buffer masks
Definition at line 716 of file context.h.
Referenced by context(), get_buffer_mask(), get_color_mask(), get_depth_mask(), pop_buffer_mask(), push_buffer_mask(), set_buffer_mask(), set_color_mask(), and set_depth_mask().
|
protected |
stack of culling mode states
Definition at line 712 of file context.h.
Referenced by context(), get_cull_state(), pop_cull_state(), push_cull_state(), and set_cull_state().
|
protected |
current back ground color index
Definition at line 780 of file context.h.
Referenced by context(), get_bg_clr_idx(), and set_bg_clr_idx().
|
protected |
current color value
Definition at line 694 of file context.h.
Referenced by context(), get_color(), set_color(), and cgv::render::gl::gl_context::set_color().
|
protected |
store current font
Definition at line 788 of file context.h.
Referenced by draw_text(), enable_font_face(), get_current_font_face(), and cgv::render::gl::gl_context::get_current_font_face().
|
protected |
store current font size
Definition at line 786 of file context.h.
Referenced by context(), enable_font_face(), get_current_font_size(), cgv::render::gl::gl_context::get_current_font_size(), and process_text().
|
protected |
store flag to tell whether current material is textured
Definition at line 765 of file context.h.
Referenced by context(), cgv::render::gl::gl_context::disable_material(), set_current_material(), set_material(), and set_textured_material().
|
protected |
store pointer to current material
Definition at line 763 of file context.h.
Referenced by context(), cgv::render::gl::gl_context::disable_material(), get_current_material(), set_current_material(), set_material(), and set_textured_material().
|
protected |
current cursor location for textual output
Definition at line 782 of file context.h.
Referenced by context(), draw_text(), get_cursor(), process_text(), and set_cursor().
|
protected |
whether to debug render passes
Definition at line 690 of file context.h.
Referenced by context(), render_pass(), and set_debug_render_passes().
|
protected |
default light sources
Definition at line 757 of file context.h.
Referenced by context(), get_default_light_source(), render_pass(), and set_default_light_source().
|
protected |
handles of default light sources
Definition at line 759 of file context.h.
Referenced by context(), and render_pass().
|
protected |
|
protected |
default render flags with which the main render pass is initialized
Definition at line 776 of file context.h.
Referenced by context(), get_default_render_pass_flags(), and set_default_render_pass_flags().
|
protected |
stack of depth test states
Definition at line 710 of file context.h.
Referenced by context(), disable_depth_test(), enable_depth_test(), get_depth_test_state(), pop_depth_test_state(), push_depth_test_state(), set_depth_func(), and set_depth_test_state().
|
protected |
whether to do all drawing in compatibility mode, only possible if support_compatibility_mode is true, , defaults to false
Definition at line 688 of file context.h.
Referenced by context(), cgv::render::gl::gl_context::draw_edges_of_faces(), cgv::render::gl::gl_context::draw_edges_of_strip_or_fan(), cgv::render::gl::gl_context::draw_faces(), and cgv::render::gl::gl_context::draw_strip_or_fan().
|
protected |
|
protected |
keep track of enabled light source handles
Definition at line 747 of file context.h.
Referenced by add_light_source(), disable_light_source(), enable_light_source(), get_enabled_light_source_handle(), get_nr_enabled_light_sources(), and remove_light_source().
|
protected |
stack of currently enabled frame buffers
Definition at line 723 of file context.h.
Referenced by cgv::render::gl::gl_context::announce_external_frame_buffer_change(), context(), cgv::render::gl::gl_context::frame_buffer_disable(), cgv::render::gl::gl_context::gl_context(), and cgv::render::gl::gl_context::recover_from_external_frame_buffer_change().
|
protected |
per color channel gamma value passed to shader programs that have gamma uniform
Definition at line 698 of file context.h.
Referenced by context(), and set_gamma3().
|
protected |
|
protected |
counter to construct light source handles
Definition at line 749 of file context.h.
Referenced by add_light_source(), context(), and set_current_lights().
|
protected |
map handle to light source and light source status information
Definition at line 751 of file context.h.
Referenced by add_light_source(), disable_light_source(), enable_light_source(), get_light_source(), get_light_source_status(), get_nr_light_sources(), is_light_source_enabled(), place_light_source(), remove_light_source(), set_current_lights(), and set_light_source().
|
protected |
keep two matrix stacks for model view and projection matrices
Definition at line 719 of file context.h.
Referenced by context(), cgv::render::gl::gl_context::get_modelview_matrix(), pop_modelview_matrix(), push_modelview_matrix(), set_current_view(), and set_modelview_matrix().
|
staticprotected |
number of default light sources
Definition at line 755 of file context.h.
Referenced by render_pass().
|
protected |
current number of indentations
Definition at line 794 of file context.h.
Referenced by context(), process_text(), and set_cursor().
|
protected |
use a callback stream to write text to the opengl context
Definition at line 784 of file context.h.
Referenced by output_stream().
|
protected |
whether to use phong shading
Definition at line 778 of file context.h.
Referenced by context(), and enable_phong_shading().
|
protected |
|
protected |
store the current render pass
Definition at line 774 of file context.h.
Referenced by get_render_pass(), get_render_pass_flags(), get_render_pass_recursion_depth(), get_render_pass_user_data(), and render_pass().
|
protected |
stack of currently enabled shader programs
Definition at line 725 of file context.h.
Referenced by get_current_program(), on_lights_changed(), set_color(), cgv::render::gl::gl_context::set_color(), set_gamma3(), set_material(), set_modelview_matrix(), set_projection_matrix(), and set_textured_material().
|
protected |
whether to use opengl option to support sRGB framebuffer
Definition at line 696 of file context.h.
Referenced by context(), and enable_sRGB_framebuffer().
|
protected |
whether to support view and lighting management of compatibility mode, defaults to true
Definition at line 686 of file context.h.
Referenced by context(), cgv::render::gl::gl_context::get_modelview_matrix(), cgv::render::gl::gl_context::get_projection_matrix(), cgv::render::gl::gl_context::on_lights_changed(), cgv::render::gl::gl_context::push_pixel_coords(), cgv::render::gl::gl_context::set_color(), cgv::render::gl::gl_context::set_material(), cgv::render::gl::gl_context::set_modelview_matrix(), and cgv::render::gl::gl_context::set_projection_matrix().
|
protected |
|
protected |
whether to use the caching facilities of shader_program and shader_code to store loaded shader file contents as strings for faster loading
Definition at line 676 of file context.h.
Referenced by context(), disable_shader_file_cache(), enable_shader_file_cache(), and is_shader_file_cache_enabled().
|
protected |
keep stack of window transformations
Definition at line 721 of file context.h.
Referenced by cgv::render::gl::gl_context::announce_external_viewport_change(), context(), get_window_matrix(), get_window_transformation_array(), pop_window_transformation_array(), push_window_transformation_array(), cgv::render::gl::gl_context::recover_from_external_viewport_change(), set_depth_range(), cgv::render::gl::gl_context::set_depth_range(), set_viewport(), and cgv::render::gl::gl_context::set_viewport().
|
protected |
offset in x and y direction where text starts
Definition at line 792 of file context.h.
Referenced by context(), process_text(), set_cursor(), and set_cursor().