From 892d056a444d189624861b66c95f5ca4d7e0f2b5 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 27 Nov 2014 16:17:50 +1100 Subject: [PATCH] gl: remove the use of glu --- ext/gl/Makefile.am | 4 - ext/gl/gstglfiltercube.c | 101 ++--------------- ext/gl/gstglfiltercube.h | 1 + ext/gl/gstglimagesink.c | 8 -- ext/gl/gstopengl.c | 11 +- gst-libs/gst/gl/gstglapi.h | 2 - gst-libs/gst/gl/gstglframebuffer.c | 104 ------------------ gst-libs/gst/gl/gstglframebuffer.h | 7 -- gst-libs/gst/gl/gstglutils.c | 62 ----------- gst-libs/gst/gl/gstglutils.h | 6 - tests/examples/gl/generic/cube/main.cpp | 2 - tests/examples/gl/generic/cubeyuv/main.cpp | 2 - tests/examples/gl/generic/doublecube/main.cpp | 2 - .../gl/generic/recordgraphic/main.cpp | 1 - .../gl/qt/mousevideooverlay/pipeline.cpp | 2 - .../gl/qt/qglwidgetvideooverlay/pipeline.cpp | 2 - .../gl/qt/qglwtextureshare/qglrenderer.cpp | 1 - tests/examples/gl/sdl/sdlshare.c | 3 - 18 files changed, 14 insertions(+), 307 deletions(-) diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am index 2d1376529d..989ca69527 100644 --- a/ext/gl/Makefile.am +++ b/ext/gl/Makefile.am @@ -17,8 +17,6 @@ OPENGL_SOURCES = \ gstglfilterglass.h \ gstglfilterapp.c \ gstglfilterapp.h \ - gstglfilterreflectedscreen.c \ - gstglfilterreflectedscreen.h \ gstgldeinterlace.c \ gstgldeinterlace.h \ gltestsrc.c \ @@ -43,8 +41,6 @@ OPENGL_SOURCES = \ if HAVE_PNG OPENGL_SOURCES += \ - gstglbumper.c \ - gstglbumper.h \ gstgldifferencematte.c \ gstgldifferencematte.h endif diff --git a/ext/gl/gstglfiltercube.c b/ext/gl/gstglfiltercube.c index cb06d34925..0f57e71d5c 100644 --- a/ext/gl/gstglfiltercube.c +++ b/ext/gl/gstglfiltercube.c @@ -78,12 +78,7 @@ static gboolean gst_gl_filter_cube_set_caps (GstGLFilter * filter, static void gst_gl_filter_cube_reset (GstGLFilter * filter); static void gst_gl_filter_cube_reset_gl (GstGLFilter * filter); static gboolean gst_gl_filter_cube_init_shader (GstGLFilter * filter); -static void _callback_gles2 (gint width, gint height, guint texture, - gpointer stuff); -#if GST_GL_HAVE_OPENGL -static void _callback_opengl (gint width, gint height, guint texture, - gpointer stuff); -#endif +static void _callback (gpointer stuff); static gboolean gst_gl_filter_cube_filter_texture (GstGLFilter * filter, guint in_tex, guint out_tex); @@ -324,29 +319,14 @@ gst_gl_filter_cube_filter_texture (GstGLFilter * filter, guint in_tex, guint out_tex) { GstGLFilterCube *cube_filter = GST_GL_FILTER_CUBE (filter); - GLCB cb = NULL; - GstGLAPI api; - api = gst_gl_context_get_gl_api (GST_GL_FILTER (cube_filter)->context); - -#if GST_GL_HAVE_OPENGL - if (api & GST_GL_API_OPENGL) - cb = _callback_opengl; -#endif - if (api & (GST_GL_API_GLES2 | GST_GL_API_OPENGL3)) - cb = _callback_gles2; + cube_filter->in_tex = in_tex; /* blocking call, use a FBO */ - gst_gl_context_use_fbo (filter->context, + gst_gl_context_use_fbo_v2 (filter->context, GST_VIDEO_INFO_WIDTH (&filter->out_info), - GST_VIDEO_INFO_HEIGHT (&filter->out_info), - filter->fbo, filter->depthbuffer, out_tex, - cb, - GST_VIDEO_INFO_WIDTH (&filter->in_info), - GST_VIDEO_INFO_HEIGHT (&filter->in_info), - in_tex, cube_filter->fovy, cube_filter->aspect, - cube_filter->znear, cube_filter->zfar, - GST_GL_DISPLAY_PROJECTION_PERSPECTIVE, (gpointer) cube_filter); + GST_VIDEO_INFO_HEIGHT (&filter->out_info), filter->fbo, + filter->depthbuffer, out_tex, _callback, (gpointer) cube_filter); return TRUE; } @@ -387,73 +367,6 @@ static const GLfloat vertices[] = { }; /* *INDENT-ON* */ -/* opengl scene, params: input texture (not the output filter->texture) */ -#if GST_GL_HAVE_OPENGL -static void -_callback_opengl (gint width, gint height, guint texture, gpointer stuff) -{ - GstGLFilterCube *cube_filter = GST_GL_FILTER_CUBE (stuff); - GstGLFilter *filter = GST_GL_FILTER (stuff); - GstGLFuncs *gl = filter->context->gl_vtable; - - static GLfloat xrot = 0; - static GLfloat yrot = 0; - static GLfloat zrot = 0; - - GLushort indices[] = { - 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 - }; - - gl->Enable (GL_DEPTH_TEST); - - gl->Enable (GL_TEXTURE_2D); - gl->BindTexture (GL_TEXTURE_2D, texture); - - gl->ClearColor (cube_filter->red, cube_filter->green, cube_filter->blue, 0.0); - gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - gl->MatrixMode (GL_PROJECTION); - gluLookAt (0.0, 0.0, -6.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); - gl->MatrixMode (GL_MODELVIEW); - gl->LoadIdentity (); - -// gl->Translatef (0.0f, 0.0f, -5.0f); - - gl->Rotatef (xrot, 1.0f, 0.0f, 0.0f); - gl->Rotatef (yrot, 0.0f, 1.0f, 0.0f); - gl->Rotatef (zrot, 0.0f, 0.0f, 1.0f); - - gl->ClientActiveTexture (GL_TEXTURE0); - gl->EnableClientState (GL_TEXTURE_COORD_ARRAY); - gl->EnableClientState (GL_VERTEX_ARRAY); - - gl->VertexPointer (3, GL_FLOAT, 5 * sizeof (float), vertices); - gl->TexCoordPointer (2, GL_FLOAT, 5 * sizeof (float), &vertices[3]); - - gl->DrawElements (GL_TRIANGLES, 36, GL_UNSIGNED_SHORT, indices); - - gl->DisableClientState (GL_TEXTURE_COORD_ARRAY); - gl->DisableClientState (GL_VERTEX_ARRAY); - - gl->Disable (GL_DEPTH_TEST); - - xrot += 0.3f; - yrot += 0.2f; - zrot += 0.4f; -} -#endif - static void _bind_buffer (GstGLFilterCube * cube_filter) { @@ -491,7 +404,7 @@ _unbind_buffer (GstGLFilterCube * cube_filter) } static void -_callback_gles2 (gint width, gint height, guint texture, gpointer stuff) +_callback (gpointer stuff) { GstGLFilter *filter = GST_GL_FILTER (stuff); GstGLFilterCube *cube_filter = GST_GL_FILTER_CUBE (filter); @@ -531,7 +444,7 @@ _callback_gles2 (gint width, gint height, guint texture, gpointer stuff) gst_gl_shader_use (cube_filter->shader); gl->ActiveTexture (GL_TEXTURE0); - gl->BindTexture (GL_TEXTURE_2D, texture); + gl->BindTexture (GL_TEXTURE_2D, cube_filter->in_tex); gst_gl_shader_set_uniform_1i (cube_filter->shader, "s_texture", 0); gst_gl_shader_set_uniform_1f (cube_filter->shader, "xrot_degree", xrot); gst_gl_shader_set_uniform_1f (cube_filter->shader, "yrot_degree", yrot); diff --git a/ext/gl/gstglfiltercube.h b/ext/gl/gstglfiltercube.h index a24547bdfc..6850f00308 100644 --- a/ext/gl/gstglfiltercube.h +++ b/ext/gl/gstglfiltercube.h @@ -52,6 +52,7 @@ struct _GstGLFilterCube gdouble znear; gdouble zfar; + guint in_tex; GLuint vao; GLuint vertex_buffer; GLint attr_position; diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index 427234894e..668458db8a 100644 --- a/ext/gl/gstglimagesink.c +++ b/ext/gl/gstglimagesink.c @@ -1246,14 +1246,6 @@ gst_glimage_sink_on_resize (GstGLImageSink * gl_sink, gint width, gint height) } else { gl->Viewport (0, 0, width, height); } -#if GST_GL_HAVE_OPENGL - if (USING_OPENGL (gl_sink->context)) { - gl->MatrixMode (GL_PROJECTION); - gl->LoadIdentity (); - gluOrtho2D (0, width, 0, height); - gl->MatrixMode (GL_MODELVIEW); - } -#endif } } diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c index e71ec10fc2..0f17c4c277 100644 --- a/ext/gl/gstopengl.c +++ b/ext/gl/gstopengl.c @@ -65,13 +65,13 @@ #include "gstglfilterlaplacian.h" #include "gstglfilterglass.h" #include "gstglfilterblur.h" -#include "gstglfilterreflectedscreen.h" +/* #include "gstglfilterreflectedscreen.h" */ #include "gstglfiltersobel.h" #include "gstgldeinterlace.h" #include "gstglmosaic.h" #if HAVE_PNG #include "gstgldifferencematte.h" -#include "gstglbumper.h" +/* #include "gstglbumper.h" */ #endif /* HAVE_PNG */ #endif /* GST_GL_HAVE_OPENGL */ @@ -174,12 +174,12 @@ plugin_init (GstPlugin * plugin) GST_RANK_NONE, GST_TYPE_GL_FILTER_GLASS)) { return FALSE; } - +#if 0 if (!gst_element_register (plugin, "glfilterreflectedscreen", GST_RANK_NONE, GST_TYPE_GL_FILTER_REFLECTED_SCREEN)) { return FALSE; } - +#endif if (!gst_element_register (plugin, "gldeinterlace", GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) { return FALSE; @@ -194,11 +194,12 @@ plugin_init (GstPlugin * plugin) GST_RANK_NONE, gst_gl_differencematte_get_type ())) { return FALSE; } - +#if 0 if (!gst_element_register (plugin, "glbumper", GST_RANK_NONE, gst_gl_bumper_get_type ())) { return FALSE; } +#endif #endif /* HAVE_PNG */ #endif /* GST_GL_HAVE_OPENGL */ diff --git a/gst-libs/gst/gl/gstglapi.h b/gst-libs/gst/gl/gstglapi.h index 11e9f3af23..d3cc52219a 100644 --- a/gst-libs/gst/gl/gstglapi.h +++ b/gst-libs/gst/gl/gstglapi.h @@ -74,10 +74,8 @@ # define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED # include # endif -# include # else # include -# include # if __WIN32__ || _WIN32 # include # endif diff --git a/gst-libs/gst/gl/gstglframebuffer.c b/gst-libs/gst/gl/gstglframebuffer.c index 5a37b4df81..0446c001b8 100644 --- a/gst-libs/gst/gl/gstglframebuffer.c +++ b/gst-libs/gst/gl/gstglframebuffer.c @@ -165,110 +165,6 @@ gst_gl_framebuffer_generate (GstGLFramebuffer * frame, gint width, gint height, return TRUE; } -gboolean -gst_gl_framebuffer_use (GstGLFramebuffer * frame, gint texture_fbo_width, - gint texture_fbo_height, GLuint fbo, GLuint depth_buffer, - GLuint texture_fbo, GLCB cb, gint input_tex_width, - gint input_tex_height, GLuint input_tex, gdouble proj_param1, - gdouble proj_param2, gdouble proj_param3, gdouble proj_param4, - GstGLDisplayProjection projection, gpointer stuff) -{ - const GstGLFuncs *gl; -#if GST_GL_HAVE_GLES2 - GLint viewport_dim[4]; -#endif - - g_return_val_if_fail (GST_IS_GL_FRAMEBUFFER (frame), FALSE); - g_return_val_if_fail (input_tex_width > 0 && input_tex_height > 0, FALSE); - g_return_val_if_fail (texture_fbo_width > 0 && texture_fbo_height > 0, FALSE); - g_return_val_if_fail (input_tex != 0, FALSE); - g_return_val_if_fail (fbo != 0, FALSE); - g_return_val_if_fail (texture_fbo != 0, FALSE); - g_return_val_if_fail (cb != NULL, FALSE); - - gl = frame->context->gl_vtable; - - GST_TRACE ("Binding v1 FBO %u dimensions:%ux%u with texture:%u " - "dimensions:%ux%u", fbo, texture_fbo_width, - texture_fbo_height, texture_fbo, input_tex_width, input_tex_height); - - gl->BindFramebuffer (GL_FRAMEBUFFER, fbo); - - /*setup a texture to render to */ - gl->BindTexture (GL_TEXTURE_2D, texture_fbo); - - /* attach the texture to the FBO to renderer to */ - gl->FramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_TEXTURE_2D, texture_fbo, 0); - - gst_gl_context_clear_shader (frame->context); - -#if GST_GL_HAVE_OPENGL - if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL) { - gl->PushAttrib (GL_VIEWPORT_BIT); - gl->MatrixMode (GL_PROJECTION); - gl->PushMatrix (); - gl->LoadIdentity (); - - switch (projection) { - case GST_GL_DISPLAY_PROJECTION_ORTHO2D: - gluOrtho2D (proj_param1, proj_param2, proj_param3, proj_param4); - break; - case GST_GL_DISPLAY_PROJECTION_PERSPECTIVE: - gluPerspective (proj_param1, proj_param2, proj_param3, proj_param4); - break; - default: - gst_gl_context_set_error (frame->context, "Unknow fbo projection %d", - projection); - } - - gl->MatrixMode (GL_MODELVIEW); - gl->PushMatrix (); - gl->LoadIdentity (); - } -#endif -#if GST_GL_HAVE_GLES2 - if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_GLES2) - gl->GetIntegerv (GL_VIEWPORT, viewport_dim); -#endif - - gl->Viewport (0, 0, texture_fbo_width, texture_fbo_height); - -#if GST_GL_HAVE_OPENGL - if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL) { - const GLenum rt[] = { GL_COLOR_ATTACHMENT0 }; - gl->DrawBuffers (1, rt); - } -#endif - - gl->ClearColor (0.0, 0.0, 0.0, 0.0); - gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - cb (input_tex_width, input_tex_height, input_tex, stuff); - -#if GST_GL_HAVE_OPENGL - if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL) { - const GLenum rt[] = { GL_NONE }; - gl->DrawBuffers (1, rt); - gl->MatrixMode (GL_PROJECTION); - gl->PopMatrix (); - gl->MatrixMode (GL_MODELVIEW); - gl->PopMatrix (); - gl->PopAttrib (); - } -#endif -#if GST_GL_HAVE_GLES2 - if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_GLES2) { - gl->Viewport (viewport_dim[0], viewport_dim[1], viewport_dim[2], - viewport_dim[3]); - } -#endif - - gl->BindFramebuffer (GL_FRAMEBUFFER, 0); - - return TRUE; -} - gboolean gst_gl_framebuffer_use_v2 (GstGLFramebuffer * frame, gint texture_fbo_width, gint texture_fbo_height, GLuint fbo, GLuint depth_buffer, diff --git a/gst-libs/gst/gl/gstglframebuffer.h b/gst-libs/gst/gl/gstglframebuffer.h index 7f1f261a8d..1fc922202b 100644 --- a/gst-libs/gst/gl/gstglframebuffer.h +++ b/gst-libs/gst/gl/gstglframebuffer.h @@ -58,13 +58,6 @@ GstGLFramebuffer *gst_gl_framebuffer_new (GstGLContext *context); gboolean gst_gl_framebuffer_generate (GstGLFramebuffer *frame, gint width, gint height, guint * fbo, guint * depthbuffer); -gboolean gst_gl_framebuffer_use (GstGLFramebuffer * frame, gint texture_fbo_width, - gint texture_fbo_height, GLuint fbo, GLuint depth_buffer, - GLuint texture_fbo, GLCB cb, gint input_tex_width, - gint input_tex_height, GLuint input_tex, gdouble proj_param1, - gdouble proj_param2, gdouble proj_param3, gdouble proj_param4, - GstGLDisplayProjection projection, gpointer stuff); - gboolean gst_gl_framebuffer_use_v2 (GstGLFramebuffer * frame, gint texture_fbo_width, gint texture_fbo_height, GLuint fbo, GLuint depth_buffer, GLuint texture_fbo, GLCB_V2 cb, gpointer stuff); diff --git a/gst-libs/gst/gl/gstglutils.c b/gst-libs/gst/gl/gstglutils.c index 17961024c5..76a78ed34b 100644 --- a/gst-libs/gst/gl/gstglutils.c +++ b/gst-libs/gst/gl/gstglutils.c @@ -341,68 +341,6 @@ gst_gl_context_gen_fbo (GstGLContext * context, gint width, gint height, return TRUE; } -typedef struct _UseFBO -{ - GstGLFramebuffer *frame; - gint texture_fbo_width; - gint texture_fbo_height; - GLuint fbo; - GLuint depth_buffer; - GLuint texture_fbo; - GLCB cb; - gint input_tex_width; - gint input_tex_height; - GLuint input_tex; - gdouble proj_param1; - gdouble proj_param2; - gdouble proj_param3; - gdouble proj_param4; - GstGLDisplayProjection projection; - gpointer stuff; -} UseFBO; - -static void -_use_fbo (GstGLContext * context, UseFBO * data) -{ - gst_gl_framebuffer_use (data->frame, data->texture_fbo_width, - data->texture_fbo_height, data->fbo, data->depth_buffer, - data->texture_fbo, data->cb, data->input_tex_width, - data->input_tex_height, data->input_tex, data->proj_param1, - data->proj_param2, data->proj_param3, data->proj_param4, data->projection, - data->stuff); -} - -/* Called by glfilter */ -/* this function really has to be simplified... do we really need to - set projection this way? Wouldn't be better a set_projection - separate call? or just make glut functions available out of - gst-libs and call it if needed on drawcallback? -- Filippo */ -/* GLCB too.. I think that only needed parameters should be - * GstGLDisplay *display and gpointer data, or just gpointer data */ -/* ..everything here has to be simplified! */ -gboolean -gst_gl_context_use_fbo (GstGLContext * context, gint texture_fbo_width, - gint texture_fbo_height, GLuint fbo, GLuint depth_buffer, - GLuint texture_fbo, GLCB cb, gint input_tex_width, - gint input_tex_height, GLuint input_tex, gdouble proj_param1, - gdouble proj_param2, gdouble proj_param3, gdouble proj_param4, - GstGLDisplayProjection projection, gpointer stuff) -{ - GstGLFramebuffer *frame = gst_gl_framebuffer_new (context); - - UseFBO data = - { frame, texture_fbo_width, texture_fbo_height, fbo, depth_buffer, - texture_fbo, cb, input_tex_width, input_tex_height, input_tex, - proj_param1, proj_param2, proj_param3, proj_param4, projection, stuff - }; - - gst_gl_context_thread_add (context, (GstGLContextThreadFunc) _use_fbo, &data); - - gst_object_unref (frame); - - return TRUE; -} - typedef struct _UseFBO2 { GstGLFramebuffer *frame; diff --git a/gst-libs/gst/gl/gstglutils.h b/gst-libs/gst/gl/gstglutils.h index cb17c41120..231444df6c 100644 --- a/gst-libs/gst/gl/gstglutils.h +++ b/gst-libs/gst/gl/gstglutils.h @@ -76,12 +76,6 @@ void gst_gl_generate_texture_full (GstGLContext * context, const GstVideoInfo * gboolean gst_gl_context_gen_fbo (GstGLContext * context, gint width, gint height, GLuint * fbo, GLuint * depthbuffer); -gboolean gst_gl_context_use_fbo (GstGLContext * context, gint texture_fbo_width, - gint texture_fbo_height, GLuint fbo, GLuint depth_buffer, - GLuint texture_fbo, GLCB cb, gint input_texture_width, - gint input_texture_height, GLuint input_texture, gdouble proj_param1, - gdouble proj_param2, gdouble proj_param3, gdouble proj_param4, - GstGLDisplayProjection projection, gpointer stuff); gboolean gst_gl_context_use_fbo_v2 (GstGLContext * context, gint texture_fbo_width, gint texture_fbo_height, GLuint fbo, GLuint depth_buffer, GLuint texture_fbo, GLCB_V2 cb, gpointer stuff); diff --git a/tests/examples/gl/generic/cube/main.cpp b/tests/examples/gl/generic/cube/main.cpp index b5ded63d92..c671401747 100644 --- a/tests/examples/gl/generic/cube/main.cpp +++ b/tests/examples/gl/generic/cube/main.cpp @@ -19,7 +19,6 @@ */ #include -#include #if __WIN32__ || _WIN32 # include #endif @@ -70,7 +69,6 @@ static gboolean reshapeCallback (void *gl_sink, void *context, GLuint width, GLu glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective(45, (gfloat)width/(gfloat)height, 0.1, 100); glMatrixMode(GL_MODELVIEW); return TRUE; diff --git a/tests/examples/gl/generic/cubeyuv/main.cpp b/tests/examples/gl/generic/cubeyuv/main.cpp index deb75ed6d3..75bc30afbc 100644 --- a/tests/examples/gl/generic/cubeyuv/main.cpp +++ b/tests/examples/gl/generic/cubeyuv/main.cpp @@ -19,7 +19,6 @@ */ #include -#include #if __WIN32__ || _WIN32 # include #endif @@ -92,7 +91,6 @@ static gboolean reshapeCallback (void * gl_sink, void *context, GLuint width, GL glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective(45, (gfloat)width/(gfloat)height, 0.1, 100); glMatrixMode(GL_MODELVIEW); return TRUE; diff --git a/tests/examples/gl/generic/doublecube/main.cpp b/tests/examples/gl/generic/doublecube/main.cpp index 82520383be..e72969904b 100644 --- a/tests/examples/gl/generic/doublecube/main.cpp +++ b/tests/examples/gl/generic/doublecube/main.cpp @@ -19,7 +19,6 @@ */ #include -#include #if __WIN32__ || _WIN32 # include #endif @@ -94,7 +93,6 @@ static gboolean reshapeCallback (void *gl_sink, void *context, GLuint width, GLu glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective(45, (gfloat)width/(gfloat)height, 0.1, 100); glMatrixMode(GL_MODELVIEW); return TRUE; diff --git a/tests/examples/gl/generic/recordgraphic/main.cpp b/tests/examples/gl/generic/recordgraphic/main.cpp index d99d0d8e6b..9cac1e9747 100644 --- a/tests/examples/gl/generic/recordgraphic/main.cpp +++ b/tests/examples/gl/generic/recordgraphic/main.cpp @@ -19,7 +19,6 @@ */ #include -#include #if __WIN32__ || _WIN32 # include #endif diff --git a/tests/examples/gl/qt/mousevideooverlay/pipeline.cpp b/tests/examples/gl/qt/mousevideooverlay/pipeline.cpp index 40cc8d105e..897b28c6bb 100644 --- a/tests/examples/gl/qt/mousevideooverlay/pipeline.cpp +++ b/tests/examples/gl/qt/mousevideooverlay/pipeline.cpp @@ -20,7 +20,6 @@ #include #include -#include #include "pipeline.h" Pipeline::Pipeline(const WId id, const QString videoLocation): @@ -165,7 +164,6 @@ gboolean Pipeline::reshapeCallback (void *sink, void *context, guint width, guin glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective(45, (gfloat)width/(gfloat)height, 0.1, 100); glMatrixMode(GL_MODELVIEW); return TRUE; diff --git a/tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.cpp b/tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.cpp index 84d69e7fcd..69e2774722 100644 --- a/tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.cpp +++ b/tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.cpp @@ -20,7 +20,6 @@ #include #include -#include #include "pipeline.h" Pipeline::Pipeline(const WId id, const QString videoLocation): @@ -162,7 +161,6 @@ gboolean Pipeline::reshapeCallback (void *sink, void *context, guint width, guin glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective(45, (gfloat)width/(gfloat)height, 0.1, 100); glMatrixMode(GL_MODELVIEW); return TRUE; diff --git a/tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp b/tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp index 3eeac475e0..066a1f548a 100644 --- a/tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp +++ b/tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp @@ -122,7 +122,6 @@ QGLRenderer::resizeGL (int width, int height) glMatrixMode (GL_PROJECTION); glLoadIdentity (); - gluPerspective (45.0f, (GLfloat) width / (GLfloat) height, 0.1f, 100.0f); glMatrixMode (GL_MODELVIEW); } diff --git a/tests/examples/gl/sdl/sdlshare.c b/tests/examples/gl/sdl/sdlshare.c index 4f833d85ab..adfcc6ad6e 100644 --- a/tests/examples/gl/sdl/sdlshare.c +++ b/tests/examples/gl/sdl/sdlshare.c @@ -26,7 +26,6 @@ #endif #include -#include #include "SDL/SDL.h" #include "SDL/SDL_opengl.h" @@ -62,8 +61,6 @@ InitGL (int Width, int Height) // We call this right after our OpenGL window is glMatrixMode (GL_PROJECTION); glLoadIdentity (); // Reset The Projection Matrix - gluPerspective (45.0f, (GLfloat) Width / (GLfloat) Height, 0.1f, 100.0f); // Calculate The Aspect Ratio Of The Window - glMatrixMode (GL_MODELVIEW); }