src/3rdparty/phonon/gstreamer/glrenderer.cpp
changeset 30 5dc02b23752f
parent 0 1918ee327afb
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   264 
   264 
   265     QPalette palette;
   265     QPalette palette;
   266     palette.setColor(QPalette::Background, Qt::black);
   266     palette.setColor(QPalette::Background, Qt::black);
   267     setPalette(palette);
   267     setPalette(palette);
   268     setAutoFillBackground(true);
   268     setAutoFillBackground(true);
   269     // Videowidget allways have this property to allow hiding the mouse cursor
   269     // Videowidget always have this property to allow hiding the mouse cursor
   270     setMouseTracking(true);
   270     setMouseTracking(true);
   271 }
   271 }
   272 
   272 
   273 void GLRenderWidgetImplementation::updateTexture(const QByteArray &array, int width, int height)
   273 void GLRenderWidgetImplementation::updateTexture(const QByteArray &array, int width, int height)
   274 {
   274 {
   302         glEnable(GL_FRAGMENT_PROGRAM_ARB);
   302         glEnable(GL_FRAGMENT_PROGRAM_ARB);
   303         glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, m_program);
   303         glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, m_program);
   304         const float tx_array[] = { 0, 0, 1, 0, 1, 1, 0, 1};
   304         const float tx_array[] = { 0, 0, 1, 0, 1, 1, 0, 1};
   305         const QRectF r = drawFrameRect();
   305         const QRectF r = drawFrameRect();
   306 
   306 
   307         const float v_array[] = { r.left(), r.top(), r.right(), r.top(), r.right(), r.bottom(), r.left(), r.bottom() };
   307         const float v_array[] = { float(r.left()), float(r.top()), float(r.right()), float(r.top()), float(r.right()), float(r.bottom()), float(r.left()), float(r.bottom()) };
   308 
   308 
   309         glActiveTexture(GL_TEXTURE0);
   309         glActiveTexture(GL_TEXTURE0);
   310         glBindTexture(GL_TEXTURE_2D, m_texture[0]);
   310         glBindTexture(GL_TEXTURE_2D, m_texture[0]);
   311         glActiveTexture(GL_TEXTURE1);
   311         glActiveTexture(GL_TEXTURE1);
   312         glBindTexture(GL_TEXTURE_2D, m_texture[1]);
   312         glBindTexture(GL_TEXTURE_2D, m_texture[1]);