3#include <cgv/render/shader_program.h>
4#include <cgv/render/texture.h>
5#include <cgv/render/vertex_buffer.h>
6#include <cgv_gl/gl/gl.h>
8#include "gl/lib_begin.h"
19 bool init_frame_called;
31 int head_pointers_binding_point;
32 int nodes_binding_point;
37 void ensure_buffers(
context& ctx);
50 a_buffer(
unsigned _fragments_per_pixel = 32,
unsigned _nodes_per_pixel = 64,
int _depth_tex_unit = 0,
51 int _node_counter_binding_point = 0,
int _head_pointers_binding_point = 0,
int _nodes_binding_point = 1);
77 int& ref_node_counter_binding_point () {
return node_counter_binding_point ; }
78 int& ref_head_pointers_binding_point() {
return head_pointers_binding_point ; }
79 int& ref_nodes_binding_point () {
return nodes_binding_point ; }
84#include <cgv/config/lib_end.h>
float z_fight_removal_exp
set thickness of fragments to 10^z_fight_removal_exp where this is measured in scaling of depth buffe...
unsigned nodes_per_pixel
to be reserved number of fragment nodes per pixel (changes are applied when in init_frame() function)
int z_fight_removal
whether to use volumetric blending of thickened fragments
unsigned fragments_per_pixel
to be handled fragments per pixel (changes are applied when in init_frame() function)
a_buffer(unsigned _fragments_per_pixel=32, unsigned _nodes_per_pixel=64, int _depth_tex_unit=0, int _node_counter_binding_point=0, int _head_pointers_binding_point=0, int _nodes_binding_point=1)
construct and configure
bool pre_multiply_opacity
whether to assume that fragment color is already multiplied with opacity
void destruct(context &ctx)
destruct all render objects
bool init(context &ctx)
construct internally used programs
unsigned z_fight_window_width
size of disambiguation windows
texture depth_tex
Depth texture used to emulate depth buffer.
bool enable(context &ctx, shader_program &prog, int tex_unit=-1)
Enable writing fragments to a_buffer with provided program.
void disable(context &ctx, size_t *out_node_count=nullptr)
finish writing fragments to a_buffer and return current number of nodes in node buffer
cgv::render::vertex_buffer node_counter_buffer
Buffers used to store per pixel frament lists.
int node_counter_binding_point
Buffer binding point indices.
void init_frame(context &ctx)
ensure that a_buffer size corresponds to context size
int depth_tex_unit
Default texture unit used for depth texture.
void finish_frame(context &ctx)
per fragment sort nodes and blend over current framebuffer
base class for all drawables, which is independent of the used rendering API.
Stores preprocessor options used for conditionally compiling shader programs.
a shader program combines several shader code fragments to a complete definition of the shading pipel...
the texture class encapsulates all functionality independent of the rendering api.
a vertex buffer is an unstructured memory block on the GPU.
namespace for api independent GPU programming
@ VBT_ATOMIC_COUNTER
The buffer contains atomic counter and will be bound to GL_ATOMIC_COUNTER_BUFFER.
@ VBT_STORAGE
The buffer contains arbitrary data and will be bound to GL_SHADER_STORAGE_BUFFER.
this header is dependency free