[066/906] up

git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@430 93df14bb-0f41-7a43-8087-d3e2a2f0e464
This commit is contained in:
Julien Isorce 2008-05-18 19:18:04 +00:00 committed by Tim-Philipp Müller
parent f386219271
commit 708918b3ec

View file

@ -13,7 +13,7 @@
//------------------------------------------------------------
//-------------------- Private déclarations ------------------
//-------------------- Private d<EFBFBD>clarations ------------------
//------------------------------------------------------------
static void gst_gl_display_finalize (GObject * object);
static gpointer gst_gl_display_glutThreadFunc (GstGLDisplay* display);
@ -379,7 +379,11 @@ gst_gl_display_glutCreateWindow (GstGLDisplay *display)
glutInitWindowSize(display->glcontext_width, display->glcontext_height);
//create opengl context
#if WIN32
sprintf_s(buffer, 5, "%d", glutWinId);
#else
sprintf(buffer, "%d", glutWinId);
#endif
display->title = g_string_append (display->title, buffer);
glutWinId = glutCreateWindow (display->title->str, display->winId);
@ -559,11 +563,18 @@ gst_gl_display_glutCreateWindow (GstGLDisplay *display)
g_print ("Context %d, ARB_fragment_program supported: yes\n", glutWinId);
//from video to texture
#if WIN32
sprintf_s (program, 2048, display->textFProgram_YUY2_UYVY, 'r', 'g', 'a');
#else
sprintf (program, display->textFProgram_YUY2_UYVY, 'r', 'g', 'a');
#endif
display->GLSLProgram_YUY2 = gst_gl_display_loadGLSLprogram (program);
#if WIN32
sprintf_s (program, 2048, display->textFProgram_YUY2_UYVY, 'a', 'b', 'r');
#else
sprintf (program, display->textFProgram_YUY2_UYVY, 'a', 'b', 'r');
#endif
display->GLSLProgram_UYVY = gst_gl_display_loadGLSLprogram (program);
display->GLSLProgram_I420_YV12 = gst_gl_display_loadGLSLprogram (display->textFProgram_I420_YV12);
@ -572,10 +583,10 @@ gst_gl_display_glutCreateWindow (GstGLDisplay *display)
//from texture to video
sprintf_s (program, 2048, display->textFProgram_to_YUY2_UYVY, "y2,u,y1,v");
sprintf (program, display->textFProgram_to_YUY2_UYVY, "y2,u,y1,v");
display->GLSLProgram_to_YUY2 = gst_gl_display_loadGLSLprogram (program);
sprintf_s (program, 2048, display->textFProgram_to_YUY2_UYVY, "v,y1,u,y2");
sprintf (program, display->textFProgram_to_YUY2_UYVY, "v,y1,u,y2");
display->GLSLProgram_to_UYVY = gst_gl_display_loadGLSLprogram (program);
display->GLSLProgram_to_I420_YV12 = gst_gl_display_loadGLSLprogram (display->textFProgram_to_I420_YV12);