[gst-cvs] gst-plugins-gl: fix typo

Jan Schmidt thaytan at kemper.freedesktop.org
Fri Jun 12 03:35:09 PDT 2009


Module: gst-plugins-gl
Branch: master
Commit: 89451c4dccbf89b7410fba90e4ac0fff695925cf
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-gl/commit/?id=89451c4dccbf89b7410fba90e4ac0fff695925cf

Author: Jan Schmidt <thaytan at noraisin.net>
Date:   Fri Jun 12 11:33:02 2009 +0100

fix typo

Change GST_GL_DISPLAY_PROJECTION_PERSPECIVE to
GST_GL_DISPLAY_PROJECTION_PERSPECTIVE.

Re-indent a couple of files that needed it.

---

 gst-libs/gst/gl/gstgldisplay.c |    4 +-
 gst-libs/gst/gl/gstgldisplay.h |    2 +-
 gst/gl/gstglbumper.c           |    2 +-
 gst/gl/gstglfilterapp.c        |    2 +-
 gst/gl/gstglfiltercube.c       |  151 ++++++++++++++++++++--------------------
 gst/gl/gstglfilterglass.c      |    2 +-
 6 files changed, 81 insertions(+), 82 deletions(-)

diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
index c820b2f..c0aae87 100644
--- a/gst-libs/gst/gl/gstgldisplay.c
+++ b/gst-libs/gst/gl/gstgldisplay.c
@@ -533,7 +533,7 @@ gst_gl_display_thread_create_context (GstGLDisplay * display)
 
   display->gl_window =
       gst_gl_window_new (display->upload_width, display->upload_height,
-          display->external_gl_context);
+      display->external_gl_context);
 
   if (!display->gl_window) {
     display->isAlive = FALSE;
@@ -1601,7 +1601,7 @@ gst_gl_display_thread_use_fbo (GstGLDisplay * display)
       gluOrtho2D (display->use_fbo_proj_param1, display->use_fbo_proj_param2,
           display->use_fbo_proj_param3, display->use_fbo_proj_param4);
       break;
-    case GST_GL_DISPLAY_PROJECTION_PERSPECIVE:
+    case GST_GL_DISPLAY_PROJECTION_PERSPECTIVE:
       gluPerspective (display->use_fbo_proj_param1,
           display->use_fbo_proj_param2, display->use_fbo_proj_param3,
           display->use_fbo_proj_param4);
diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h
index f737e8b..738c6f3 100644
--- a/gst-libs/gst/gl/gstgldisplay.h
+++ b/gst-libs/gst/gl/gstgldisplay.h
@@ -55,7 +55,7 @@ typedef enum
 typedef enum
 {
   GST_GL_DISPLAY_PROJECTION_ORTHO2D,
-  GST_GL_DISPLAY_PROJECTION_PERSPECIVE
+  GST_GL_DISPLAY_PROJECTION_PERSPECTIVE
 } GstGLDisplayProjection;
 
 //Texture pool elements
diff --git a/gst/gl/gstglbumper.c b/gst/gl/gstglbumper.c
index aa9a63b..2058b50 100644
--- a/gst/gl/gstglbumper.c
+++ b/gst/gl/gstglbumper.c
@@ -353,7 +353,7 @@ gst_gl_bumper_filter (GstGLFilter * filter, GstGLBuffer * inbuf,
       inbuf->width, inbuf->height, inbuf->texture,
       //bumper_filter->fovy, bumper_filter->aspect, bumper_filter->znear, bumper_filter->zfar,
       45, (gdouble) filter->width / (gdouble) filter->height, 0.1, 50,
-      GST_GL_DISPLAY_PROJECTION_PERSPECIVE, bumper_filter);
+      GST_GL_DISPLAY_PROJECTION_PERSPECTIVE, bumper_filter);
 
   return TRUE;
 }
diff --git a/gst/gl/gstglfilterapp.c b/gst/gl/gstglfilterapp.c
index b8ec60b..f69a346 100644
--- a/gst/gl/gstglfilterapp.c
+++ b/gst/gl/gstglfilterapp.c
@@ -172,7 +172,7 @@ gst_gl_filter_app_filter (GstGLFilter * filter, GstGLBuffer * inbuf,
         filter->fbo, filter->depthbuffer, outbuf->texture,
         app_filter->clientDrawCallback, inbuf->width, inbuf->height,
         inbuf->texture, 45, (gfloat) filter->width / (gfloat) filter->height,
-        0.1, 100, GST_GL_DISPLAY_PROJECTION_PERSPECIVE, NULL);
+        0.1, 100, GST_GL_DISPLAY_PROJECTION_PERSPECTIVE, NULL);
   }
   //default
   else {
diff --git a/gst/gl/gstglfiltercube.c b/gst/gl/gstglfiltercube.c
index 225b353..907ce4a 100644
--- a/gst/gl/gstglfiltercube.c
+++ b/gst/gl/gstglfiltercube.c
@@ -118,7 +118,6 @@ static const gchar *cube_v_src =
     "     -sin(zrot),  cos(zrot),        0.0, 0.0,                \n"
     "            0.0,        0.0,        1.0, 0.0,                \n"
     "            0.0,        0.0,        0.0, 1.0 );              \n"
-
     "   gl_Position = matZ * matY * matX * u_matrix * a_position; \n"
     "   v_texCoord = a_texCoord;                                  \n"
     "}                                                            \n";
@@ -292,7 +291,7 @@ gst_gl_filter_cube_filter (GstGLFilter * filter, GstGLBuffer * inbuf,
       filter->fbo, filter->depthbuffer, outbuf->texture,
       gst_gl_filter_cube_callback, inbuf->width, inbuf->height, inbuf->texture,
       cube_filter->fovy, cube_filter->aspect, cube_filter->znear,
-      cube_filter->zfar, GST_GL_DISPLAY_PROJECTION_PERSPECIVE,
+      cube_filter->zfar, GST_GL_DISPLAY_PROJECTION_PERSPECTIVE,
       (gpointer) cube_filter);
 
   return TRUE;
@@ -391,78 +390,78 @@ gst_gl_filter_cube_callback (gint width, gint height, guint texture,
   glVertex3f (-1.0f, 1.0f, -1.0f);
   glEnd ();
 #else
-  const GLfloat v_vertices [] = {
-     
+  const GLfloat v_vertices[] = {
+
     //front face
-     1.0f,   1.0f, -1.0f,
-     1.0f,   0.0f,
-     1.0f,  -1.0f, -1.0f,
-     1.0f,   1.0f,
-    -1.0f,  -1.0f, -1.0f,
-     0.0f,   1.0f,
-    -1.0f,   1.0f, -1.0f,
-     0.0f,   0.0f,
-     //back face
-     1.0f,   1.0f,  1.0f,
-     1.0f,   0.0f,
-    -1.0f,   1.0f,  1.0f,
-     0.0f,   0.0f,
-    -1.0f,  -1.0f,  1.0f,
-     0.0f,   1.0f,
-     1.0f,  -1.0f,  1.0f,
-     1.0f,   1.0f, 
-     //right face
-     1.0f,   1.0f,  1.0f,
-             1.0f,  0.0f,
-     1.0f,  -1.0f,  1.0f,
-             0.0f,  0.0f,
-     1.0f,  -1.0f, -1.0f,
-             0.0f,  1.0f,
-     1.0f,   1.0f, -1.0f,
-             1.0f,  1.0f,
-     //left face
-     -1.0f,  1.0f,  1.0f,
-             1.0f,  0.0f,
-     -1.0f,  1.0f, -1.0f,
-             1.0f,  1.0f,
-     -1.0f, -1.0f, -1.0f,
-             0.0f,  1.0f,
-     -1.0f, -1.0f,  1.0f,
-             0.0f,  0.0f,
-     //top face
-      1.0f, -1.0f,  1.0f,
-      1.0f,         0.0f,
-     -1.0f, -1.0f,  1.0f,
-      0.0f,         0.0f,
-     -1.0f, -1.0f, -1.0f,
-      0.0f,         1.0f,
-      1.0f, -1.0f, -1.0f,
-      1.0f,         1.0f,
-      //bottom face
-      1.0f,  1.0f,  1.0f,
-      1.0f,         0.0f,
-      1.0f,  1.0f, -1.0f,
-      1.0f,         1.0f,     
-     -1.0f,  1.0f, -1.0f,
-      0.0f,         1.0f,
-     -1.0f,  1.0f,  1.0f,
-      0.0f,         0.0f
-    };
+    1.0f, 1.0f, -1.0f,
+    1.0f, 0.0f,
+    1.0f, -1.0f, -1.0f,
+    1.0f, 1.0f,
+    -1.0f, -1.0f, -1.0f,
+    0.0f, 1.0f,
+    -1.0f, 1.0f, -1.0f,
+    0.0f, 0.0f,
+    //back face
+    1.0f, 1.0f, 1.0f,
+    1.0f, 0.0f,
+    -1.0f, 1.0f, 1.0f,
+    0.0f, 0.0f,
+    -1.0f, -1.0f, 1.0f,
+    0.0f, 1.0f,
+    1.0f, -1.0f, 1.0f,
+    1.0f, 1.0f,
+    //right face
+    1.0f, 1.0f, 1.0f,
+    1.0f, 0.0f,
+    1.0f, -1.0f, 1.0f,
+    0.0f, 0.0f,
+    1.0f, -1.0f, -1.0f,
+    0.0f, 1.0f,
+    1.0f, 1.0f, -1.0f,
+    1.0f, 1.0f,
+    //left face
+    -1.0f, 1.0f, 1.0f,
+    1.0f, 0.0f,
+    -1.0f, 1.0f, -1.0f,
+    1.0f, 1.0f,
+    -1.0f, -1.0f, -1.0f,
+    0.0f, 1.0f,
+    -1.0f, -1.0f, 1.0f,
+    0.0f, 0.0f,
+    //top face
+    1.0f, -1.0f, 1.0f,
+    1.0f, 0.0f,
+    -1.0f, -1.0f, 1.0f,
+    0.0f, 0.0f,
+    -1.0f, -1.0f, -1.0f,
+    0.0f, 1.0f,
+    1.0f, -1.0f, -1.0f,
+    1.0f, 1.0f,
+    //bottom face
+    1.0f, 1.0f, 1.0f,
+    1.0f, 0.0f,
+    1.0f, 1.0f, -1.0f,
+    1.0f, 1.0f,
+    -1.0f, 1.0f, -1.0f,
+    0.0f, 1.0f,
+    -1.0f, 1.0f, 1.0f,
+    0.0f, 0.0f
+  };
 
   GLushort indices[] = {
-     0,  1,  2, 
-     0,  2,  3,
-     4,  5,  6,
-     4,  6,  7,
-     8,  9, 10,
-     8, 10, 11,
+    0, 1, 2,
+    0, 2, 3,
+    4, 5, 6,
+    4, 6, 7,
+    8, 9, 10,
+    8, 10, 11,
     12, 13, 14,
     12, 14, 15,
     16, 17, 18,
     16, 18, 19,
     20, 21, 22,
     20, 22, 23
-    };
+  };
 
   GLint attr_position_loc = 0;
   GLint attr_texture_loc = 0;
@@ -471,7 +470,8 @@ gst_gl_filter_cube_callback (gint width, gint height, guint texture,
     0.5f, 0.0f, 0.0f, 0.0f,
     0.0f, 0.5f, 0.0f, 0.0f,
     0.0f, 0.0f, 0.5f, 0.0f,
-    0.0f, 0.0f, 0.0f, 1.0f};
+    0.0f, 0.0f, 0.0f, 1.0f
+  };
 
   glEnable (GL_DEPTH_TEST);
 
@@ -480,20 +480,18 @@ gst_gl_filter_cube_callback (gint width, gint height, guint texture,
 
   gst_gl_shader_use (cube_filter->shader);
 
-  attr_position_loc = 
-    gst_gl_shader_get_attribute_location (cube_filter->shader, 
-    "a_position");
-  attr_texture_loc = 
-    gst_gl_shader_get_attribute_location (cube_filter->shader, 
-    "a_texCoord");
+  attr_position_loc =
+      gst_gl_shader_get_attribute_location (cube_filter->shader, "a_position");
+  attr_texture_loc =
+      gst_gl_shader_get_attribute_location (cube_filter->shader, "a_texCoord");
 
   //Load the vertex position
-  glVertexAttribPointer (attr_position_loc, 3, GL_FLOAT, 
-    GL_FALSE, 5 * sizeof(GLfloat), v_vertices);
+  glVertexAttribPointer (attr_position_loc, 3, GL_FLOAT,
+      GL_FALSE, 5 * sizeof (GLfloat), v_vertices);
 
   //Load the texture coordinate
   glVertexAttribPointer (attr_texture_loc, 2, GL_FLOAT,
-    GL_FALSE, 5 * sizeof(GLfloat), &v_vertices[3]);
+      GL_FALSE, 5 * sizeof (GLfloat), &v_vertices[3]);
 
   glEnableVertexAttribArray (attr_position_loc);
   glEnableVertexAttribArray (attr_texture_loc);
@@ -504,7 +502,8 @@ gst_gl_filter_cube_callback (gint width, gint height, guint texture,
   gst_gl_shader_set_uniform_1f (cube_filter->shader, "xrot_degree", xrot);
   gst_gl_shader_set_uniform_1f (cube_filter->shader, "yrot_degree", yrot);
   gst_gl_shader_set_uniform_1f (cube_filter->shader, "zrot_degree", zrot);
-  gst_gl_shader_set_uniform_matrix_4fv (cube_filter->shader, "u_matrix", 1, GL_FALSE, matrix);
+  gst_gl_shader_set_uniform_matrix_4fv (cube_filter->shader, "u_matrix", 1,
+      GL_FALSE, matrix);
 
   glDrawElements (GL_TRIANGLES, 36, GL_UNSIGNED_SHORT, indices);
 
diff --git a/gst/gl/gstglfilterglass.c b/gst/gl/gstglfilterglass.c
index 9b472e5..e932fd0 100644
--- a/gst/gl/gstglfilterglass.c
+++ b/gst/gl/gstglfilterglass.c
@@ -192,7 +192,7 @@ gst_gl_filter_glass_filter (GstGLFilter * filter, GstGLBuffer * inbuf,
       filter->fbo, filter->depthbuffer, outbuf->texture,
       gst_gl_filter_glass_callback, inbuf->width, inbuf->height, inbuf->texture,
       80, (gdouble) filter->width / (gdouble) filter->height, 1.0, 5000.0,
-      GST_GL_DISPLAY_PROJECTION_PERSPECIVE, (gpointer) glass_filter);
+      GST_GL_DISPLAY_PROJECTION_PERSPECTIVE, (gpointer) glass_filter);
 
   return TRUE;
 }





More information about the Gstreamer-commits mailing list