[352/906] fix typo

Change GST_GL_DISPLAY_PROJECTION_PERSPECIVE to
GST_GL_DISPLAY_PROJECTION_PERSPECTIVE.

Re-indent a couple of files that needed it.
This commit is contained in:
Jan Schmidt 2009-06-12 11:33:02 +01:00 committed by Matthew Waters
parent 2680375248
commit f5ac0a784d
6 changed files with 81 additions and 82 deletions

View file

@ -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);

View file

@ -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

View file

@ -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;
}

View file

@ -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 {

View file

@ -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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.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);

View file

@ -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;
}