[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 = display->gl_window =
gst_gl_window_new (display->upload_width, display->upload_height, gst_gl_window_new (display->upload_width, display->upload_height,
display->external_gl_context); display->external_gl_context);
if (!display->gl_window) { if (!display->gl_window) {
display->isAlive = FALSE; 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, gluOrtho2D (display->use_fbo_proj_param1, display->use_fbo_proj_param2,
display->use_fbo_proj_param3, display->use_fbo_proj_param4); display->use_fbo_proj_param3, display->use_fbo_proj_param4);
break; break;
case GST_GL_DISPLAY_PROJECTION_PERSPECIVE: case GST_GL_DISPLAY_PROJECTION_PERSPECTIVE:
gluPerspective (display->use_fbo_proj_param1, gluPerspective (display->use_fbo_proj_param1,
display->use_fbo_proj_param2, display->use_fbo_proj_param3, display->use_fbo_proj_param2, display->use_fbo_proj_param3,
display->use_fbo_proj_param4); display->use_fbo_proj_param4);

View File

@ -55,7 +55,7 @@ typedef enum
typedef enum typedef enum
{ {
GST_GL_DISPLAY_PROJECTION_ORTHO2D, GST_GL_DISPLAY_PROJECTION_ORTHO2D,
GST_GL_DISPLAY_PROJECTION_PERSPECIVE GST_GL_DISPLAY_PROJECTION_PERSPECTIVE
} GstGLDisplayProjection; } GstGLDisplayProjection;
//Texture pool elements //Texture pool elements

View File

@ -353,7 +353,7 @@ gst_gl_bumper_filter (GstGLFilter * filter, GstGLBuffer * inbuf,
inbuf->width, inbuf->height, inbuf->texture, inbuf->width, inbuf->height, inbuf->texture,
//bumper_filter->fovy, bumper_filter->aspect, bumper_filter->znear, bumper_filter->zfar, //bumper_filter->fovy, bumper_filter->aspect, bumper_filter->znear, bumper_filter->zfar,
45, (gdouble) filter->width / (gdouble) filter->height, 0.1, 50, 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; return TRUE;
} }

View File

@ -172,7 +172,7 @@ gst_gl_filter_app_filter (GstGLFilter * filter, GstGLBuffer * inbuf,
filter->fbo, filter->depthbuffer, outbuf->texture, filter->fbo, filter->depthbuffer, outbuf->texture,
app_filter->clientDrawCallback, inbuf->width, inbuf->height, app_filter->clientDrawCallback, inbuf->width, inbuf->height,
inbuf->texture, 45, (gfloat) filter->width / (gfloat) filter->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 //default
else { else {

View File

@ -118,7 +118,6 @@ static const gchar *cube_v_src =
" -sin(zrot), cos(zrot), 0.0, 0.0, \n" " -sin(zrot), cos(zrot), 0.0, 0.0, \n"
" 0.0, 0.0, 1.0, 0.0, \n" " 0.0, 0.0, 1.0, 0.0, \n"
" 0.0, 0.0, 0.0, 1.0 ); \n" " 0.0, 0.0, 0.0, 1.0 ); \n"
" gl_Position = matZ * matY * matX * u_matrix * a_position; \n" " gl_Position = matZ * matY * matX * u_matrix * a_position; \n"
" v_texCoord = a_texCoord; \n" " v_texCoord = a_texCoord; \n"
"} \n"; "} \n";
@ -292,7 +291,7 @@ gst_gl_filter_cube_filter (GstGLFilter * filter, GstGLBuffer * inbuf,
filter->fbo, filter->depthbuffer, outbuf->texture, filter->fbo, filter->depthbuffer, outbuf->texture,
gst_gl_filter_cube_callback, inbuf->width, inbuf->height, inbuf->texture, gst_gl_filter_cube_callback, inbuf->width, inbuf->height, inbuf->texture,
cube_filter->fovy, cube_filter->aspect, cube_filter->znear, 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); (gpointer) cube_filter);
return TRUE; return TRUE;
@ -391,78 +390,78 @@ gst_gl_filter_cube_callback (gint width, gint height, guint texture,
glVertex3f (-1.0f, 1.0f, -1.0f); glVertex3f (-1.0f, 1.0f, -1.0f);
glEnd (); glEnd ();
#else #else
const GLfloat v_vertices [] = { const GLfloat v_vertices[] = {
//front face //front face
1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f,
1.0f, 0.0f, 1.0f, 0.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, -1.0f, -1.0f, -1.0f,
0.0f, 1.0f, 0.0f, 1.0f,
-1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f,
0.0f, 0.0f, 0.0f, 0.0f,
//back face //back face
1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 1.0f, 0.0f,
-1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f,
0.0f, 0.0f, 0.0f, 0.0f,
-1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f,
0.0f, 1.0f, 0.0f, 1.0f,
1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
//right face //right face
1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 1.0f, 0.0f,
1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f,
0.0f, 0.0f, 0.0f, 0.0f,
1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f,
0.0f, 1.0f, 0.0f, 1.0f,
1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
//left face //left face
-1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 1.0f, 0.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, -1.0f, -1.0f, -1.0f,
0.0f, 1.0f, 0.0f, 1.0f,
-1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f,
0.0f, 0.0f, 0.0f, 0.0f,
//top face //top face
1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f,
1.0f, 0.0f, 1.0f, 0.0f,
-1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f,
0.0f, 0.0f, 0.0f, 0.0f,
-1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f,
0.0f, 1.0f, 0.0f, 1.0f,
1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
//bottom face //bottom face
1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 1.0f, 0.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, -1.0f, 1.0f, -1.0f,
0.0f, 1.0f, 0.0f, 1.0f,
-1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f,
0.0f, 0.0f 0.0f, 0.0f
}; };
GLushort indices[] = { GLushort indices[] = {
0, 1, 2, 0, 1, 2,
0, 2, 3, 0, 2, 3,
4, 5, 6, 4, 5, 6,
4, 6, 7, 4, 6, 7,
8, 9, 10, 8, 9, 10,
8, 10, 11, 8, 10, 11,
12, 13, 14, 12, 13, 14,
12, 14, 15, 12, 14, 15,
16, 17, 18, 16, 17, 18,
16, 18, 19, 16, 18, 19,
20, 21, 22, 20, 21, 22,
20, 22, 23 20, 22, 23
}; };
GLint attr_position_loc = 0; GLint attr_position_loc = 0;
GLint attr_texture_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.5f, 0.0f, 0.0f, 0.0f,
0.0f, 0.5f, 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.5f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f}; 0.0f, 0.0f, 0.0f, 1.0f
};
glEnable (GL_DEPTH_TEST); glEnable (GL_DEPTH_TEST);
@ -481,19 +481,17 @@ gst_gl_filter_cube_callback (gint width, gint height, guint texture,
gst_gl_shader_use (cube_filter->shader); gst_gl_shader_use (cube_filter->shader);
attr_position_loc = attr_position_loc =
gst_gl_shader_get_attribute_location (cube_filter->shader, gst_gl_shader_get_attribute_location (cube_filter->shader, "a_position");
"a_position");
attr_texture_loc = attr_texture_loc =
gst_gl_shader_get_attribute_location (cube_filter->shader, gst_gl_shader_get_attribute_location (cube_filter->shader, "a_texCoord");
"a_texCoord");
//Load the vertex position //Load the vertex position
glVertexAttribPointer (attr_position_loc, 3, GL_FLOAT, glVertexAttribPointer (attr_position_loc, 3, GL_FLOAT,
GL_FALSE, 5 * sizeof(GLfloat), v_vertices); GL_FALSE, 5 * sizeof (GLfloat), v_vertices);
//Load the texture coordinate //Load the texture coordinate
glVertexAttribPointer (attr_texture_loc, 2, GL_FLOAT, 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_position_loc);
glEnableVertexAttribArray (attr_texture_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, "xrot_degree", xrot);
gst_gl_shader_set_uniform_1f (cube_filter->shader, "yrot_degree", yrot); 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_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); 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, filter->fbo, filter->depthbuffer, outbuf->texture,
gst_gl_filter_glass_callback, inbuf->width, inbuf->height, inbuf->texture, gst_gl_filter_glass_callback, inbuf->width, inbuf->height, inbuf->texture,
80, (gdouble) filter->width / (gdouble) filter->height, 1.0, 5000.0, 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; return TRUE;
} }