if (gl->GenVertexArrays)
gl->BindVertexArray (ca_sink->vao);
- else
- _bind_buffer (ca_sink);
+ _bind_buffer (ca_sink);
gl->ActiveTexture (GL_TEXTURE0);
gl->BindTexture (GL_TEXTURE_2D, ca_sink->redisplay_texture);
if (gl->GenVertexArrays)
gl->BindVertexArray (0);
- else
- _unbind_buffer (ca_sink);
+ _unbind_buffer (ca_sink);
/* end default opengl scene */
GST_CA_OPENGL_LAYER_SINK_UNLOCK (ca_sink);
if (gl->GenVertexArrays)
gl->BindVertexArray (src->vao);
- else
- _bind_buffer (src);
+ _bind_buffer (src);
gl->DrawElements (GL_TRIANGLES, src->n_indices, GL_UNSIGNED_SHORT,
(gpointer) (gintptr) src->index_offset);
if (gl->GenVertexArrays)
gl->BindVertexArray (0);
- else
- _unbind_buffer (src);
+ _unbind_buffer (src);
gst_gl_context_clear_shader (src->base.context);
if (gl->GenVertexArrays)
gl->BindVertexArray (cube_filter->vao);
- else
- _bind_buffer (cube_filter);
+ _bind_buffer (cube_filter);
gl->DrawElements (GL_TRIANGLES, 36, GL_UNSIGNED_SHORT, 0);
if (gl->GenVertexArrays)
gl->BindVertexArray (0);
- else
- _unbind_buffer (cube_filter);
+ _unbind_buffer (cube_filter);
gl->Disable (GL_DEPTH_TEST);
if (gl->GenVertexArrays)
gl->BindVertexArray (gl_sink->vao);
- else
- _bind_buffer (gl_sink);
+ _bind_buffer (gl_sink);
gl->ActiveTexture (GL_TEXTURE0);
gl->BindTexture (gl_target, gl_sink->redisplay_texture);
if (gl->GenVertexArrays)
gl->BindVertexArray (0);
- else
- _unbind_buffer (gl_sink);
+ _unbind_buffer (gl_sink);
if (gl_sink->ignore_alpha)
gl->Disable (GL_BLEND);
GL_STATIC_DRAW);
}
- if (!gl->GenVertexArrays || overlay->geometry_change) {
- _bind_buffer (overlay, overlay->overlay_vbo);
- }
+ _bind_buffer (overlay, overlay->overlay_vbo);
gl->BindTexture (GL_TEXTURE_2D, image_tex);
gst_gl_shader_set_uniform_1f (overlay->shader, "alpha", overlay->alpha);
ret = TRUE;
out:
- if (gl->GenVertexArrays) {
+ if (gl->GenVertexArrays)
gl->BindVertexArray (0);
- } else {
- _unbind_buffer (overlay);
- }
+ _unbind_buffer (overlay);
gst_gl_context_clear_shader (GST_GL_BASE_FILTER (filter)->context);
if (gl->GenVertexArrays)
gl->BindVertexArray (transformation->vao);
- if (transformation->caps_change) {
+ if (transformation->caps_change)
_upload_vertices (transformation);
- _bind_buffer (transformation);
- } else if (!gl->GenVertexArrays) {
- _bind_buffer (transformation);
- }
+ _bind_buffer (transformation);
gl->DrawElements (GL_TRIANGLE_STRIP, 5, GL_UNSIGNED_SHORT, 0);
if (gl->GenVertexArrays)
gl->BindVertexArray (0);
- else
- _unbind_buffer (transformation);
+ _unbind_buffer (transformation);
gst_gl_context_clear_shader (GST_GL_BASE_FILTER (filter)->context);
transformation->caps_change = FALSE;
if (gl->BindVertexArray)
gl->BindVertexArray (convert->priv->vao);
- else
- _bind_buffer (convert);
+ _bind_buffer (convert);
for (i = c_info->in_n_textures - 1; i >= 0; i--) {
gchar *scale_name = g_strdup_printf ("tex_scale%u", i);
if (gl->BindVertexArray)
gl->BindVertexArray (0);
- else
- _unbind_buffer (convert);
+ _unbind_buffer (convert);
if (gl->DrawBuffer)
gl->DrawBuffer (GL_NONE);
gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, filter->vbo_indices);
gl->BufferData (GL_ELEMENT_ARRAY_BUFFER, sizeof (indices), indices,
GL_STATIC_DRAW);
-
- if (gl->GenVertexArrays) {
- _bind_buffer (filter);
- gl->BindVertexArray (0);
- }
-
- gl->BindBuffer (GL_ARRAY_BUFFER, 0);
- gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
}
if (gl->GenVertexArrays)
gl->BindVertexArray (filter->vao);
- else
- _bind_buffer (filter);
+ _bind_buffer (filter);
gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
if (gl->GenVertexArrays)
gl->BindVertexArray (0);
- else
- _unbind_buffer (filter);
+ _unbind_buffer (filter);
}
}
if (gl->BindVertexArray)
gl->BindVertexArray (priv->vao);
- else
- _bind_buffer (viewconvert);
+ _bind_buffer (viewconvert);
if (in_mode == GST_VIDEO_MULTIVIEW_MODE_SEPARATED ||
in_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
if (gl->BindVertexArray)
gl->BindVertexArray (0);
- else
- _unbind_buffer (viewconvert);
+ _unbind_buffer (viewconvert);
if (gl->DrawBuffer)
gl->DrawBuffer (GL_NONE);
/* we are done with the shader */
if (gl->GenVertexArrays)
gl->BindVertexArray (vao);
- else
- _bind_buffer (context);
+ _bind_buffer (context);
gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
if (gl->GenVertexArrays)
gl->BindVertexArray (0);
- else
- _unbind_buffer (context);
+ _unbind_buffer (context);
return TRUE;
}
if (gl->GenVertexArrays)
gl->BindVertexArray (vao);
- else
- _bind_buffer (context);
+ _bind_buffer (context);
gl->ActiveTexture (GL_TEXTURE0);
gl->BindTexture (GL_TEXTURE_2D, tex_id);
if (gl->GenVertexArrays)
gl->BindVertexArray (0);
- else
- _unbind_buffer (context);
+ _unbind_buffer (context);
return TRUE;
}