74 static_line_->vao->bind();
75 static_line_->shader_program->use();
77 _gl glBindBufferBase(_gl GL_UNIFORM_BUFFER, 0, ubo_.id());
78 _gl glDrawArrays(_gl GL_LINES, 0, 2);
79 static_line_->vao->unbind();
94void
xcal::render::opengl::
object::
Line::update_ubo_data()
const {
95 if (mobject_->stroke_color().is_changed() ||
96 mobject_->direct().is_changed() ||
97 mobject_.model_matrix_should_update()) {
101 ubo_data_.color = mobject_->stroke_color();
102 ubo_data_.model = mobject_.model_matrix().T();
103 ubo_.buffer_data(&ubo_data_,
sizeof(ubo_data_), _gl GL_DYNAMIC_DRAW);
105 mobject_->stroke_color().reset_changed();
106 mobject_->direct().reset_changed();