cgv
Loading...
Searching...
No Matches
gl_context.h
1#pragma once
2
3#include <stack>
4#include <cgv/render/context.h>
5#include <cgv/render/shader_program.h>
6#include <cgv_gl/gl/gl.h>
7
8#include "lib_begin.h"
9
10namespace cgv {
12 namespace render {
14 namespace gl {
15
17extern CGV_API std::vector<int> get_context_creation_attrib_list(cgv::render::context_config& cc);
18
20extern CGV_API void set_gl_format(texture& tex, GLuint gl_format, const std::string& component_format_description);
21
23extern CGV_API GLuint get_gl_format(const texture& tex);
24
25extern CGV_API GLuint map_to_gl(PrimitiveType pt);
26
27extern CGV_API GLuint map_to_gl(MaterialSide ms);
28
29extern CGV_API GLuint map_to_gl(BlendFunction blend_function);
30
31extern CGV_API GLboolean map_to_gl(bool flag);
32
33extern CGV_API GLuint get_gl_id(const void* handle);
34
35extern CGV_API void* get_handle(GLuint id);
36
38extern CGV_API void set_material(const cgv::media::illum::phong_material& mat, MaterialSide ms, float alpha);
39
40
43class CGV_API gl_context : public render::context
44{
45private:
46 GLuint texture_bind(TextureType tt, GLuint tex_id) const;
47 void texture_unbind(TextureType tt, GLuint tmp_id) const;
48 GLuint texture_generate(texture_base& tb) const;
49 /*
50 void frame_buffer_bind(const frame_buffer_base& fbb, void*& user_data) const;
51 void frame_buffer_unbind(const frame_buffer_base& fbb, void*& user_data) const;
52 void frame_buffer_bind(frame_buffer_base& fbb) const;
53 void frame_buffer_unbind(frame_buffer_base& fbb) const;
54 */
55protected:
56 shader_program progs[4];
57 mutable cgv::type::uint64_type max_nr_indices, max_nr_vertices;
58 bool debug_texture_format_matching = false;
59 void ensure_configured() const;
60 void destruct_render_objects() override;
61 void put_id(void* handle, void* ptr) const override;
62 void draw_elements_void(GLenum mode, size_t count, GLenum type, size_t type_size, const void* indices) const;
63 template <typename T>
64 void draw_elements(GLenum mode, size_t count, const T* indices) const {
65 if (!gl_traits<T>::valid_index)
66 error("called draw_elements with invalid index type");
67 else
68 draw_elements_void(mode, count, gl_traits<T>::type, sizeof(T), indices);
69 }
70
71 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 override;
72 bool texture_create(texture_base& tb, cgv::data::data_format& df) const override;
73 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 override;
74 bool texture_create_from_buffer(texture_base& tb, cgv::data::data_format& df, int x, int y, int level) const override;
75 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 override;
76 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 override;
77 bool texture_copy_back(const texture_base& tb, int level, cgv::data::data_view& dv) const override;
78 bool texture_create_mipmaps(texture_base& tb, cgv::data::data_format& df) const override;
79 bool texture_generate_mipmaps(texture_base& tb, unsigned int dim) const override;
80 bool texture_destruct(texture_base& tb) const override;
81 bool texture_set_state(const texture_base& tb) const override;
82 bool texture_enable(texture_base& tb, int tex_unit, unsigned int nr_dims) const override;
83 bool texture_disable(texture_base& tb, int tex_unit, unsigned int nr_dims) const override;
84 bool texture_bind_as_image(texture_base& tb, int tex_unit, int level, bool bind_array, int layer, AccessType access) const override;
85
86 bool render_buffer_create(render_buffer_base& rc, cgv::data::component_format& cf, int& _width, int& _height) const override;
87 bool render_buffer_destruct(render_buffer_base& rc) const override;
88
89 bool frame_buffer_create(frame_buffer_base& fbb) const override;
90 bool frame_buffer_attach(frame_buffer_base& fbb, const render_buffer_base& rb, bool is_depth, int i) const override;
91 bool frame_buffer_attach(frame_buffer_base& fbb, const texture_base& t, bool is_depth, int level, int i, int z) const override;
92 bool frame_buffer_is_complete(const frame_buffer_base& fbb) const override;
93 bool frame_buffer_enable(frame_buffer_base& fbb) override;
94 bool frame_buffer_disable(frame_buffer_base& fbb) override;
95 bool frame_buffer_destruct(frame_buffer_base& fbb) const override;
96 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 override;
97 int frame_buffer_get_max_nr_color_attachments() const override;
98 int frame_buffer_get_max_nr_draw_buffers() const override;
99
100 bool shader_code_create(render_component& sc, ShaderType st, const std::string& source) const override;
101 bool shader_code_compile(render_component& sc) const override;
102 void shader_code_destruct(render_component& sc) const override;
103
104 bool shader_program_create(shader_program_base& spb) const override;
105 void shader_program_attach(shader_program_base& spb, const render_component& sc) const override;
106 bool shader_program_link(shader_program_base& spb) const override;
107 bool shader_program_set_state(shader_program_base& spb) const override;
108 bool shader_program_enable(shader_program_base& spb) override;
109 bool shader_program_disable(shader_program_base& spb) override;
110 void shader_program_detach(shader_program_base& spb, const render_component& sc) const override;
111 bool shader_program_destruct(shader_program_base& spb) const override;
112 bool shader_program_get_active_uniforms(shader_program_base& spb, std::vector<std::string>& names) const override;
113 void shader_program_inspect_variables(shader_program_base& spb, ProgramVariableKind kind, std::vector<program_variable_info>& Vs, bool get_location, bool get_value) const override;
114
115 int get_uniform_location(const shader_program_base& spb, const std::string& name) const override;
116 bool set_uniform_void(shader_program_base& spb, int loc, type_descriptor value_type, const void* value_ptr) const override;
117 bool set_uniform_array_void(shader_program_base& spb, int loc, type_descriptor value_type, const void* value_ptr, size_t nr_elements) const override;
118 int get_uniform_block_index(const shader_program_base& spb, const std::string& name) const override;
119 bool set_uniform_block_binding(shader_program_base& spb, int index, int binding) const override;
120 int get_attribute_location(const shader_program_base& spb, const std::string& name) const override;
121 bool set_attribute_void(shader_program_base& spb, int loc, type_descriptor value_type, const void* value_ptr) const override;
122
123 bool attribute_array_binding_create(attribute_array_binding_base& aab) const override;
124 bool attribute_array_binding_destruct(attribute_array_binding_base& aab) const override;
125 bool attribute_array_binding_enable(attribute_array_binding_base& aab) override;
126 bool attribute_array_binding_disable(attribute_array_binding_base& aab) override;
127 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, unsigned stride_in_bytes) const override;
128 bool set_element_array(attribute_array_binding_base* aab, const vertex_buffer_base* vbb) const override;
129 bool enable_attribute_array(attribute_array_binding_base* aab, int loc, bool do_enable) const override;
130 bool is_attribute_array_enabled(const attribute_array_binding_base* aab, int loc) const override;
131
132 bool vertex_buffer_bind(const vertex_buffer_base& vbb, VertexBufferType _type, unsigned _idx) const override;
133 bool vertex_buffer_unbind(const vertex_buffer_base& vbb, VertexBufferType _type, unsigned _idx) const override;
134 bool vertex_buffer_create(vertex_buffer_base& vbb, const void* array_ptr, size_t size_in_bytes) const override;
135 bool vertex_buffer_resize(vertex_buffer_base& vbb, const void* array_ptr, size_t size_in_bytes) const override;
136 bool vertex_buffer_clear(vertex_buffer_base& vbb, size_t offset, size_t size_in_bytes) const override;
137 bool vertex_buffer_replace(vertex_buffer_base& vbb, size_t offset, size_t size_in_bytes, const void* array_ptr) const override;
138 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 override;
139 bool vertex_buffer_copy_back(const vertex_buffer_base& vbb, size_t offset, size_t size_in_bytes, void* array_ptr) const override;
140 bool vertex_buffer_destruct(vertex_buffer_base& vbb) const override;
141
142 bool check_gl_error(const std::string& where, const cgv::render::render_component* rc = 0) const;
143 bool check_texture_support(TextureType tt, const std::string& where, const cgv::render::render_component* rc = 0) const;
144 bool check_shader_support(ShaderType st, const std::string& where, const cgv::render::render_component* rc = 0) const;
145 bool check_fbo_support(const std::string& where, const cgv::render::render_component* rc = 0) const;
151 void draw_textual_info() override;
153 bool show_help;
154 bool show_stats;
156 void rotate_vector_to_target(const dvec3& vector, const dvec3& target);
157public:
159 gl_context();
161 bool configure_gl();
162 void resize_gl();
163
165 void set_bg_color(vec4 rgba) override;
167 void set_bg_depth(float d) override;
169 void set_bg_stencil(int s) override;
171 void set_bg_accum_color(vec4 rgba) override;
173 void clear_background(bool color_flag, bool depth_flag, bool stencil_flag = false, bool accum_flag = false) override;
174
176 float get_info_font_size() const;
180 float get_current_font_size() const override;
184 void perform_screen_shot() override;
186 RenderAPI get_render_api() const override;
188 void init_render_pass() override;
190 void finish_render_pass() override;
193
194 void set_color(const rgba& clr) override;
196 void set_material(const cgv::media::illum::surface_material& mat) override;
198 void enable_material(textured_material& mat) override;
200 void disable_material(textured_material& mat) override;
202 shader_program& ref_default_shader_program(bool texture_support = false) override;
204 shader_program& ref_surface_shader_program(bool texture_support = false) override;
206 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 override;
208 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 override;
210 void on_lights_changed() override;
212 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) override;
214 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) override;
216 void draw_light_source(const cgv::media::illum::light_source& l, float intensity_scale, float light_scale) override;
218
219 void announce_external_viewport_change(ivec4& cgv_viewport_storage) override;
221 void recover_from_external_viewport_change(const ivec4& cgv_viewport_storage) override;
223 void announce_external_frame_buffer_change(void*& cgv_fbo_storage) override;
225 void recover_from_external_frame_buffer_change(void* cgv_fbo_storage) override;
226
229
230 void push_pixel_coords() override;
232 void pop_pixel_coords() override;
234 virtual bool read_frame_buffer(
235 data::data_view& dv,
236 unsigned int x = 0, unsigned int y = 0,
237 FrameBufferType buffer_type = FB_BACK,
240 int w = -1, int h = -1) override;
242
245
246 bool prepare_attributes(std::vector<vec3>& P, std::vector<vec3>& N, std::vector<vec2>& T, unsigned nr_vertices,
247 const float* vertices, const float* normals, const float* tex_coords,
248 const int* vertex_indices, const int* normal_indices, const int* tex_coord_indices, bool flip_normals) const;
250 bool release_attributes(const float* normals, const float* tex_coords, const int* normal_indices, const int* tex_coord_indices) const;
253 const float* vertices, const float* normals, const float* tex_coords,
254 const int* vertex_indices, const int* normal_indices, const int* tex_coord_indices,
255 int nr_faces, int face_degree, bool flip_normals = false) const override;
258 const float* vertices, const float* normals, const float* tex_coords,
259 const int* vertex_indices, const int* normal_indices, const int* tex_coord_indices,
260 int nr_faces, int face_degree, bool is_fan, bool flip_normals = false) const override;
262 void draw_faces(
263 const float* vertices, const float* normals, const float* tex_coords,
264 const int* vertex_indices, const int* normal_indices, const int* tex_coord_indices,
265 int nr_faces, int face_degree, bool flip_normals) const override;
268 const float* vertices, const float* normals, const float* tex_coords,
269 const int* vertex_indices, const int* normal_indices, const int* tex_coord_indices,
270 int nr_faces, int face_degree, bool is_fan, bool flip_normals) const override;
272
275
277 void set_depth_test_state(DepthTestState state) override;
279 void set_depth_func(CompareFunction func) override;
281 void enable_depth_test() override;
283 void disable_depth_test() override;
284
286 void set_cull_state(CullingMode culling_mode) override;
287
289 void set_blend_state(BlendState state) override;
291 void set_blend_func(BlendFunction src_factor, BlendFunction dst_factor) override;
293 void set_blend_func_separate(BlendFunction src_color_factor, BlendFunction dst_color_factor, BlendFunction src_alpha_factor, BlendFunction dst_alpha_factor) override;
295 void enable_blending() override;
297 void disable_blending() override;
298
300 void set_buffer_mask(BufferMask mask) override;
302 void set_depth_mask(bool flag) override;
304 void set_color_mask(bvec4 flags) override;
305
307
310
311 dmat4 get_modelview_matrix() const override;
313 void set_modelview_matrix(const dmat4& V) override;
315 dmat4 get_projection_matrix() const override;
317 void set_projection_matrix(const dmat4& P) override;
318
320 void pop_window_transformation_array() override;
322 unsigned get_max_window_transformation_array_size() const override;
324
325protected:
326 void update_window_transformation_array();
327public:
329 void set_viewport(const ivec4& viewport, int array_index = -1) override;
331 void set_depth_range(const dvec2& depth_range = dvec2(0, 1), int array_index = -1) override;
332
333 // return homogeneous 4x4 projection matrix, which transforms from clip to device space
334 // dmat4 get_device_matrix() const;
336 double get_window_z(int x_window, int y_window) const override;
338};
339
340 }
341 }
342}
343
344#include <cgv/config/lib_end.h>
the component format inherits the information of a packing_info and adds information on the component...
The const_data_view has the functionality of the data_view but uses a const pointer and therefore doe...
Definition data_view.h:221
A data_format describes a multidimensional data block of data entries.
Definition data_format.h:17
the data view gives access to a data array of one, two, three or four dimensions.
Definition data_view.h:153
>simple class to hold the properties of a light source
base class for attribute_array_bindings
Definition context.h:462
base class for all drawables, which is independent of the used rendering API.
Definition context.h:670
virtual void error(const std::string &message, const render_component *rc=0) const
error handling
Definition context.cxx:307
base interface for framebuffer
Definition context.h:529
media::font::font_face_ptr get_current_font_face() const override
overwrite function to return info font face in case no font is currently selected
void set_depth_func(CompareFunction func) override
set the depth test function
void push_pixel_coords() override
use this to push transformation matrices on the stack such that x and y coordinates correspond to win...
void set_depth_mask(bool flag) override
set the depth buffer mask
RenderAPI get_render_api() const override
return the used rendering API
bool frame_buffer_disable(frame_buffer_base &fbb) override
disable the framebuffer object
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) override
tesselate an arrow from the origin in z-direction
void set_color(const rgba &clr) override
set the current color
void set_buffer_mask(BufferMask mask) override
set the buffer mask for depth and color buffers
float info_font_size
font size to draw textual info
Definition gl_context.h:149
bool frame_buffer_is_complete(const frame_buffer_base &fbb) const override
check for completeness, if not complete, get the reason in last_error
void set_bg_color(vec4 rgba) override
set a user defined background color
void draw_light_source(const cgv::media::illum::light_source &l, float intensity_scale, float light_scale) override
draw a light source with an emissive material
void announce_external_viewport_change(ivec4 &cgv_viewport_storage) override
announce an external viewport change performed with rendering API to the cgv framework providing spac...
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 override
get list of program attributes
void enable_depth_test() override
enable the depth test
void pop_window_transformation_array() override
restore previous viewport and depth range arrays defining the window transformations
shader_program & ref_default_shader_program(bool texture_support=false) override
return a reference to a shader program used to render without illumination
bool prepare_attributes(std::vector< vec3 > &P, std::vector< vec3 > &N, std::vector< vec2 > &T, unsigned nr_vertices, const float *vertices, const float *normals, const float *tex_coords, const int *vertex_indices, const int *normal_indices, const int *tex_coord_indices, bool flip_normals) const
helper function to prepare attribute arrays
gl_context()
construct context and attach signals
cgv::media::font::font_face_ptr get_info_font_face() const
return info font face and ensure that it is created
void set_color_mask(bvec4 flags) override
set the color buffer mask
void recover_from_external_frame_buffer_change(void *cgv_fbo_storage) override
restore cgv frame buffer to the state before the external change
dmat4 get_modelview_matrix() const override
return homogeneous 4x4 viewing matrix, which transforms from world to eye space
void set_material(const cgv::media::illum::surface_material &mat) override
set the current material
void enable_blending() override
enable blending
void set_bg_stencil(int s) override
set a user defined background stencil value
void recover_from_external_viewport_change(const ivec4 &cgv_viewport_storage) override
restore cgv viewport to the state before the external change
void set_modelview_matrix(const dmat4 &V) override
set the current modelview matrix, which transforms from world to eye space
double get_window_z(int x_window, int y_window) const override
read the device z-coordinate from the z-buffer for the given device x- and y-coordinates
dmat4 get_projection_matrix() const override
return homogeneous 4x4 projection matrix, which transforms from eye to clip space
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 override
get list of program uniforms
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=type::info::TI_UINT8, data::ComponentFormat cf=data::CF_RGB, int w=-1, int h=-1) override
implement according to specification in context class
void enable_material(textured_material &mat) override
enable a material with textures
float get_info_font_size() const
return info font size
void set_bg_depth(float d) override
set a user defined background depth value
cgv::media::font::font_face_ptr info_font_face
font used to draw textual info
Definition gl_context.h:147
void clear_background(bool color_flag, bool depth_flag, bool stencil_flag=false, bool accum_flag=false) override
clear the buffer contents of the flagged buffers to the set background colors
shader_program & ref_surface_shader_program(bool texture_support=false) override
return a reference to the default shader program used to render surfaces
void set_depth_range(const dvec2 &depth_range=dvec2(0, 1), int array_index=-1) override
set the current depth range or one of the depth ranges in the window transformation array
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) const override
tesselate with one face strip
void set_blend_state(BlendState state) override
set the complete blend state
bool configure_gl()
ensure that glew is initialized, define lighting mode, viewing pyramid and the rendering mode and ret...
bool release_attributes(const float *normals, const float *tex_coords, const int *normal_indices, const int *tex_coord_indices) const
helper function to disable attribute arrays
float get_current_font_size() const override
overwrite function to return info font size in case no font is currently selected
void set_cull_state(CullingMode culling_mode) override
set the culling state
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 override
pass geometry of given faces to current shader program and generate draw calls to render lines for th...
void set_projection_matrix(const dmat4 &P) override
set the current projection matrix, which transforms from eye to clip space
unsigned get_max_window_transformation_array_size() const override
query the maximum number of supported window transformations, which is at least 1
void set_bg_accum_color(vec4 rgba) override
set a user defined background color for the accumulation buffer
void disable_blending() override
disable blending
void rotate_vector_to_target(const dvec3 &vector, const dvec3 &target)
helper function that multiplies a rotation to modelview matrix such that vector is rotated onto targe...
void set_blend_func(BlendFunction src_factor, BlendFunction dst_factor) override
set the blend function
void set_viewport(const ivec4 &viewport, int array_index=-1) override
set the current viewport or one of the viewports in the window transformation array
void pop_pixel_coords() override
pop previously changed transformation matrices
void disable_material(textured_material &mat) override
disable a material with textures
void on_lights_changed() override
helper function to send light update events
void disable_depth_test() override
disable the depth test
void set_blend_func_separate(BlendFunction src_color_factor, BlendFunction dst_color_factor, BlendFunction src_alpha_factor, BlendFunction dst_alpha_factor) override
set the blend function separately for color and alpha
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) const override
tesselate with independent faces
void set_depth_test_state(DepthTestState state) override
set the depth test state
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 override
pass geometry of given strip or fan to current shader program and generate draw calls to render lines...
void announce_external_frame_buffer_change(void *&cgv_fbo_storage) override
announce an external frame buffer change performed with rendering API to the cgv framework providing ...
base interface for a render_buffer
Definition context.h:381
base interface for all render components
Definition context.h:357
base interface for a texture
Definition context.h:389
class that extends obj_material with the management of textures
base interface for a vertex buffer
Definition context.h:510
namespace for data management components
ComponentFormat
define standard formats, which should be used to avoid wrong assignment of component names
@ CF_RGB
color format with two components R and G
data::ref_ptr< font_face > font_face_ptr
always use this ref counted pointer to store font faces
Definition font.h:52
namespace for opengl specific GPU programming
Definition gl.cxx:6
CGV_API void set_material(const cgv::media::illum::phong_material &mat, MaterialSide ms, float alpha)
set material in opengl state to given material
void set_gl_format(texture &tex, GLuint gl_format, const std::string &component_format_description)
set a very specific texture format. This should be called after the texture is constructed and before...
std::vector< int > get_context_creation_attrib_list(cgv::render::context_config &cc)
construct a 0 terminated list of context creation attribute definitions
GLuint get_gl_format(const texture &tex)
return the texture format used for a given texture. If called before texture has been created,...
namespace for api independent GPU programming
RenderAPI
enumeration of rendering APIs which can be queried from the context
Definition context.h:126
CullingMode
different culling modes
Definition context.h:199
BlendFunction
different blend functions
Definition context.h:206
AccessType
different access types
Definition context.h:322
FrameBufferType
different frame buffer types which can be combined together with or
Definition context.h:546
MaterialSide
different sides of a material
Definition context.h:184
ProgramVariableKind
enumerates different kinds of shader program variables
Definition context.h:91
ShaderType
different shader types
Definition context.h:543
PrimitiveType
different primitive types
Definition context.h:281
VertexBufferType
Provides vertex buffer types to allow implicit binding.
Definition context.h:474
BufferTypeBits
Bits for the selection of different buffer types.
Definition context.h:519
TextureType
different texture types
Definition context.h:257
CompareFunction
different comparison functions used for depth testing or texture comparisons
Definition context.h:310
TypeId
ids for the different types and type constructs
Definition type_id.h:12
@ TI_UINT8
signed integer stored in 64 bits
Definition type_id.h:23
namespace for compile time type information
Definition bool32_t.h:7
unsigned long long uint64_type
this type provides an 64 bit unsigned integer type
this header is dependency free
Definition print.h:11
cgv::math::fvec< float, 4 > vec4
declare type of 4d single precision floating point vectors (used for homogeneous coordinates)
Definition fvec.h:696
cgv::media::color< float, cgv::media::RGB, cgv::media::OPACITY > rgba
declare rgba color type with 32 bit components
Definition color.h:898
cgv::math::fvec< double, 3 > dvec3
declare type of 3d double precision floating point vectors
Definition fvec.h:701
cgv::math::fvec< int32_t, 4 > ivec4
declare type of 4d 32 bit integer vectors
Definition fvec.h:723
cgv::math::fmat< double, 4, 4 > dmat4
declare type of 4x4 matrices
Definition fmat.h:481
cgv::math::fvec< bool, 4 > bvec4
declare type of 4d boolean vectors
Definition fvec.h:689
cgv::math::fvec< double, 2 > dvec2
declare type of 2d double precision floating point vectors
Definition fvec.h:699
Stores properties of a phong brdf material.
Stores properties of a surface material.
Represents a blend state used to configure fragment blending.
Definition context.h:696
Represents a buffer mask used to mask depth and color buffer outputs.
Definition context.h:711
Represents a depth test state used to configure depth testing.
Definition context.h:688
compact type description of data that can be sent to the context; convertible to int
Definition context.h:61