diff options
author | Gernot Ziegler <gz@lysator.liu.se> | 2003-10-27 18:34:48 +0000 |
---|---|---|
committer | Gernot Ziegler <gz@lysator.liu.se> | 2003-10-27 18:34:48 +0000 |
commit | 537084d264c4bb5fc9d02504d7e79961fd8e83c7 (patch) | |
tree | 96be4d2e4328649022e919f155ff90d3c0c128c3 /sys/glsink/gstglxwindow.c | |
parent | bf156442acd3af570fae1bfe4cd1641ca704e09b (diff) | |
download | gst-plugins-bad-537084d264c4bb5fc9d02504d7e79961fd8e83c7.tar.gz gst-plugins-bad-537084d264c4bb5fc9d02504d7e79961fd8e83c7.tar.bz2 gst-plugins-bad-537084d264c4bb5fc9d02504d7e79961fd8e83c7.zip |
introducing NVidia accelerated OpenGL videosinks :)
Original commit message from CVS:
introducing NVidia accelerated OpenGL videosinks :)
Diffstat (limited to 'sys/glsink/gstglxwindow.c')
-rw-r--r-- | sys/glsink/gstglxwindow.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/glsink/gstglxwindow.c b/sys/glsink/gstglxwindow.c index 96ec673a..5f723160 100644 --- a/sys/glsink/gstglxwindow.c +++ b/sys/glsink/gstglxwindow.c @@ -1,3 +1,5 @@ +/* This stores the common OpenGL initialization stuff for all instances */ + /* gcc -ansi -pedantic on GNU/Linux causes warnings and errors * unless this is defined: * warning: #warning "Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE" @@ -90,17 +92,13 @@ gst_glxwindow_callback(GObject *object, GParamSpec *pspec, GstGLImageInfo *data) XMapRaised (data->dpy, data->win); // resize OpenGL - g_warning("resizing in OpenGL"); + //g_warning("resizing in OpenGL"); glViewport(0, 0, (GLint) w, (GLint) h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); GLfloat aspect = (GLfloat) h / (GLfloat) w; glFrustum(-1.0, 1.0, -aspect, aspect, 5.0, 500.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, -3.0, -50.0); } } if (attr.width != data->width || attr.height != data->height) @@ -230,6 +228,9 @@ gst_glxwindow_new (GstElement *sink) glPolygonMode(GL_FRONT, GL_FILL); glPolygonMode(GL_BACK, GL_FILL); + glShadeModel(GL_SMOOTH); + glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST); + XSelectInput (new->dpy, new->win, ExposureMask | StructureNotifyMask); g_object_set (sink, "hook", new, NULL); |