add glad to load OpenGL extensions

This commit is contained in:
2019-07-09 11:07:01 +02:00
parent 81b62d9a27
commit 4cbf0c47b4
20 changed files with 65 additions and 209 deletions

View File

@@ -179,8 +179,6 @@ void Canvas::stroke_cancel()
}
void Canvas::stroke_draw_mix(const glm::vec2& bb_min, const glm::vec2& bb_sz)
{
assert(App::I.is_render_thread());
gl_state gl;
gl.save();
@@ -323,8 +321,6 @@ std::array<std::vector<vertex_t>, 6> Canvas::stroke_draw_project(std::array<vert
glm::vec4 Canvas::stroke_draw_samples(int i, std::vector<vertex_t>& P)
{
assert(App::I.is_render_thread());
if (!ShaderManager::ext_framebuffer_fetch)
{
glActiveTexture(GL_TEXTURE1);
@@ -458,8 +454,6 @@ std::vector<Canvas::StrokeFrame> Canvas::stroke_draw_compute(Stroke& stroke) con
void Canvas::stroke_draw()
{
assert(App::I.is_render_thread());
if (!(m_current_stroke && m_current_stroke->has_sample()))
{
//stroke_draw_mix({ 0,0 }, { m_mixer.getWidth(), m_mixer.getHeight() });
@@ -696,8 +690,6 @@ glm::vec3 Canvas::point_trace(glm::vec2 loc)
}
void Canvas::stroke_commit()
{
assert(App::I.is_render_thread());
if (!m_dirty || m_layers.empty())
return;
@@ -874,8 +866,6 @@ void Canvas::stroke_commit()
void Canvas::draw_merge(std::array<bool, 6> faces /*= SIXPLETTE(false)*/)
{
assert(App::I.is_render_thread());
glViewport(0, 0, m_width, m_height);
auto ortho = glm::ortho<float>(-0.5f, 0.5f, -0.5f, 0.5f, -1.f, 1.f);
const auto& b = m_current_stroke->m_brush;
@@ -1130,8 +1120,6 @@ void Canvas::stroke_update(glm::vec3 point, float pressure)
}
void Canvas::stroke_start(glm::vec3 point, float pressure)
{
assert(App::I.is_render_thread());
// need to commit this now before starting a new stroke
if (m_current_stroke && m_commit_delayed)
{
@@ -1542,7 +1530,6 @@ bool Canvas::create(int width, int height)
m_plane.create<1>(1, 1);
m_plane_brush.create<1>(1, 1);
m_brush_shape.create();
m_mesh.create();
m_brush_mix.create(8, 8);
for (auto& l : m_layers)
l->create(width, height, "");