[651/906] up/download: fix some typos when removing GLEW

This commit is contained in:
Matthew Waters 2013-01-17 23:12:35 +11:00
parent a6504181a3
commit 6bee1ffdd3
2 changed files with 17 additions and 15 deletions

View file

@ -891,7 +891,7 @@ _create_shader (GstGLDisplay * display, const gchar * vertex_src,
const gchar * fragment_src, GstGLShader ** out_shader) const gchar * fragment_src, GstGLShader ** out_shader)
{ {
GstGLShader *shader; GstGLShader *shader;
GError *error; GError *error = NULL;
g_return_val_if_fail (vertex_src != NULL || fragment_src != NULL, FALSE); g_return_val_if_fail (vertex_src != NULL || fragment_src != NULL, FALSE);
@ -1154,8 +1154,8 @@ _do_download_draw_rgb_opengl (GstGLDisplay * display, GstGLDownload * download)
break; break;
} }
glReadBuffer (GL_NONE); gl->ReadBuffer (GL_NONE);
glDisable (GL_TEXTURE_RECTANGLE_ARB); gl->Disable (GL_TEXTURE_RECTANGLE_ARB);
} }
#endif #endif
@ -1262,15 +1262,15 @@ _do_download_draw_yuv_opengl (GstGLDisplay * display, GstGLDownload * download)
GL_COLOR_ATTACHMENT2 GL_COLOR_ATTACHMENT2
}; };
gfloat verts[8] = { -1.0f, -1.0f, gfloat verts[8] = { 1.0f, -1.0f,
1.0f, -1.0f, -1.0f, -1.0f,
1.0f, 1.0f, -1.0f, 1.0f,
-1.0f, 1.0f 1.0f, 1.0f
}; };
gint texcoords[8] = { 0, 0, gfloat texcoords[8] = { out_width, 0.0,
out_width, 0, 0.0, 0.0,
out_width, out_height, 0.0, out_height,
0, out_height out_width, out_height
}; };
gl = display->gl_vtable; gl = display->gl_vtable;
@ -1329,7 +1329,7 @@ _do_download_draw_yuv_opengl (GstGLDisplay * display, GstGLDownload * download)
gl->MatrixMode (GL_PROJECTION); gl->MatrixMode (GL_PROJECTION);
gl->LoadIdentity (); gl->LoadIdentity ();
gl->ActiveTexture (GL_TEXTURE0_ARB); gl->ActiveTexture (GL_TEXTURE0);
gst_gl_shader_set_uniform_1i (download->shader, "tex", 0); gst_gl_shader_set_uniform_1i (download->shader, "tex", 0);
gst_gl_shader_set_uniform_1f (download->shader, "w", (gfloat) out_width); gst_gl_shader_set_uniform_1f (download->shader, "w", (gfloat) out_width);
gst_gl_shader_set_uniform_1f (download->shader, "h", (gfloat) out_height); gst_gl_shader_set_uniform_1f (download->shader, "h", (gfloat) out_height);
@ -1343,13 +1343,15 @@ _do_download_draw_yuv_opengl (GstGLDisplay * display, GstGLDownload * download)
"Download video format inconsistensy %d", v_format); "Download video format inconsistensy %d", v_format);
} }
gl->ClientActiveTexture (GL_TEXTURE0);
gl->EnableClientState (GL_VERTEX_ARRAY); gl->EnableClientState (GL_VERTEX_ARRAY);
gl->EnableClientState (GL_TEXTURE_COORD_ARRAY); gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
gl->VertexPointer (2, GL_FLOAT, 0, &verts); gl->VertexPointer (2, GL_FLOAT, 0, &verts);
gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords); gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords);
gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4); gl->DrawArrays (GL_QUADS, 0, 4);
gl->DisableClientState (GL_VERTEX_ARRAY); gl->DisableClientState (GL_VERTEX_ARRAY);
gl->DisableClientState (GL_TEXTURE_COORD_ARRAY); gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);

View file

@ -703,7 +703,7 @@ _create_shader (GstGLDisplay * display, const gchar * vertex_src,
const gchar * fragment_src, GstGLShader ** out_shader) const gchar * fragment_src, GstGLShader ** out_shader)
{ {
GstGLShader *shader; GstGLShader *shader;
GError *error; GError *error = NULL;
g_return_val_if_fail (vertex_src != NULL || fragment_src != NULL, FALSE); g_return_val_if_fail (vertex_src != NULL || fragment_src != NULL, FALSE);
@ -799,7 +799,7 @@ _init_upload (GstGLDisplay * display, GstGLUpload * upload)
{ {
gchar text_shader_UYVY[2048]; gchar text_shader_UYVY[2048];
#if GST_GL_HAVE_OPENGL #if GST_GL_HAVE_OPENGL
if (USING_GLES2 (display)) { if (USING_OPENGL (display)) {
sprintf (text_shader_UYVY, upload->priv->YUY2_UYVY, sprintf (text_shader_UYVY, upload->priv->YUY2_UYVY,
'a', 'b', 'r'); 'a', 'b', 'r');
} }