1#ifndef GLK_GL_CANVAS_CANVAS_HPP
2#define GLK_GL_CANVAS_CANVAS_HPP
19 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
21 GLCanvas(
const Eigen::Vector2i&
size,
const std::string& shader_name =
"rainbow",
size_t num_color_buffers = 1);
29 void set_effect(
const std::shared_ptr<glk::ScreenEffect>& effect);
30 const std::shared_ptr<glk::ScreenEffect>&
get_effect()
const;
61 Eigen::Vector4i
pick_info(
const Eigen::Vector2i& p,
int window = 2)
const;
62 float pick_depth(
const Eigen::Vector2i& p,
int window = 2)
const;
63 Eigen::Vector3f
unproject(
const Eigen::Vector2i& p,
float depth)
const;
86 std::unique_ptr<glk::GLSLShader>
shader;
Definition texture.hpp:10
Definition gl_canvas.hpp:17
const glk::Texture & color_buffer() const
std::shared_ptr< guik::ProjectionControl > projection_control
Definition gl_canvas.hpp:97
double partial_rendering_clear_thresh
Definition gl_canvas.hpp:81
std::unique_ptr< glk::TextureRenderer > texture_renderer
Definition gl_canvas.hpp:92
const glk::Texture & normal_buffer() const
Eigen::Vector2i size
Definition gl_canvas.hpp:68
void enable_partial_rendering(double clear_thresh=1e-6)
void set_blend_depth_write(bool blend_depth_write)
void set_colormap(glk::COLORMAP colormap_type)
bool is_partial_rendering_enabled
Definition gl_canvas.hpp:79
void enable_info_buffer()
bool load_shader(const std::string &shader_name)
void set_bg_texture(const std::shared_ptr< glk::Texture > &bg_texture)
void disable_partial_rendering()
int dynamic_flag_buffer_id
Definition gl_canvas.hpp:77
GLenum alpha_blend_sfactor
Definition gl_canvas.hpp:71
const glk::Texture & depth_buffer() const
std::unique_ptr< glk::GLSLShader > shader
Definition gl_canvas.hpp:86
std::shared_ptr< guik::CameraControl > camera_control
Definition gl_canvas.hpp:96
void enable_normal_buffer()
std::unique_ptr< glk::GLSLShader > texture_shader
Definition gl_canvas.hpp:87
Eigen::Vector3f unproject(const Eigen::Vector2i &p, float depth) const
void set_clear_color(const Eigen::Vector4f &color)
bool blend_depth_write
Definition gl_canvas.hpp:73
bool normal_buffer_enabled() const
const std::shared_ptr< glk::ScreenEffect > & get_effect() const
void set_blend_func(GLenum sfactor, GLenum dfactor)
void render_to_screen(int color_buffer_id=0)
float pick_depth(const Eigen::Vector2i &p, int window=2) const
void set_size(const Eigen::Vector2i &size)
std::unique_ptr< glk::FrameBuffer > screen_effect_buffer
Definition gl_canvas.hpp:90
bool partial_rendering_enabled() const
double keyboard_control_speed
Definition gl_canvas.hpp:84
void set_effect(const std::shared_ptr< glk::ScreenEffect > &effect)
const glk::Texture & dynamic_flag_buffer() const
std::shared_ptr< glk::Texture > bg_texture
Definition gl_canvas.hpp:93
const glk::Texture & info_buffer() const
std::shared_ptr< glk::ScreenEffect > screen_effect
Definition gl_canvas.hpp:91
bool clear_partial_rendering_flag
Definition gl_canvas.hpp:80
Eigen::Vector4f clear_color
Definition gl_canvas.hpp:69
int normal_buffer_id
Definition gl_canvas.hpp:75
std::unique_ptr< glk::FrameBuffer > frame_buffer
Definition gl_canvas.hpp:89
Eigen::Vector4i pick_info(const Eigen::Vector2i &p, int window=2) const
EIGEN_MAKE_ALIGNED_OPERATOR_NEW GLCanvas(const Eigen::Vector2i &size, const std::string &shader_name="rainbow", size_t num_color_buffers=1)
GLenum alpha_blend_dfactor
Definition gl_canvas.hpp:72
std::unique_ptr< glk::GLSLShader > partial_clear_shader
Definition gl_canvas.hpp:88
void clear_partial_rendering()
std::unique_ptr< glk::Texture > colormap
Definition gl_canvas.hpp:95
Eigen::Matrix4f last_projection_view_matrix
Definition gl_canvas.hpp:82
bool info_buffer_enabled() const
int info_buffer_id
Definition gl_canvas.hpp:76
COLORMAP
Definition colormap.hpp:9
Definition drawable_container.hpp:9