~ubuntu-dev/mplayer/ubuntu-feisty

« back to all changes in this revision

Viewing changes to libvo/vo_gl2.c

  • Committer: Reinhard Tartler
  • Date: 2006-07-08 08:47:54 UTC
  • Revision ID: siretart@tauware.de-20060708084754-c3ff228cc9c2d8de
upgrade to pre8

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
  int dirtyXoff, dirtyYoff, dirtyWidth, dirtyHeight;
101
101
};
102
102
 
103
 
static GLint getInternalFormat()
 
103
static GLint getInternalFormat(void)
104
104
{
105
105
#ifdef GL_WIN32
106
106
  PIXELFORMATDESCRIPTOR pfd;
150
150
  return GL_RGB;
151
151
}
152
152
 
153
 
static int initTextures()
 
153
static int initTextures(void)
154
154
{
155
155
  struct TexSquare *tsq=0;
156
156
  GLfloat texpercx, texpercy;
467
467
}
468
468
 
469
469
 
470
 
static void drawTextureDisplay ()
 
470
static void drawTextureDisplay (void)
471
471
{
472
472
  struct TexSquare *square = texgrid;
473
473
  int x, y/*, xoff=0, yoff=0, wd, ht*/;
595
595
#ifdef GL_WIN32
596
596
 
597
597
static int config_w32(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) {
598
 
    o_dwidth = d_width;
599
 
    o_dheight = d_height;
600
 
    vo_fs = flags & VOFLAG_FULLSCREEN;
601
 
    vo_vm = flags & VOFLAG_MODESWITCHING;
602
 
    
603
 
    vo_dwidth = d_width;
604
 
    vo_dheight = d_height;
605
 
 
606
 
    if (!createRenderingContext())
 
598
    if (!vo_w32_config(d_width, d_height, flags))
607
599
        return -1;
608
600
 
609
601
    if (vo_fs)
714
706
 
715
707
        /* Map window. */
716
708
        XMapWindow(mDisplay, vo_window);
717
 
#ifdef HAVE_XINERAMA
718
 
        vo_x11_xinerama_move(mDisplay,vo_window);
719
 
#endif
720
709
        vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 );
721
710
        XClearWindow(mDisplay,vo_window);
722
711
 
776
765
        glBindTexture(GL_TEXTURE_2D, 0);
777
766
      case YUV_CONVERSION_FRAGMENT_POW:
778
767
      case YUV_CONVERSION_FRAGMENT:
 
768
        if (!GenPrograms || !BindProgram) {
 
769
          mp_msg(MSGT_VO, MSGL_ERR, "[gl] fragment program functions missing!\n");
 
770
          break;
 
771
        }
779
772
        GenPrograms(1, &fragprog);
780
773
        BindProgram(GL_FRAGMENT_PROGRAM, fragprog);
781
774
        break;
782
775
    }
783
 
    glSetupYUVConversion(GL_TEXTURE_2D, use_yuv, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0);
 
776
    glSetupYUVConversion(GL_TEXTURE_2D, use_yuv, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0,
 
777
                         texture_width, texture_height);
784
778
  }
785
779
 
786
780
  gl_set_antialias(0);
818
812
        panscan_init();
819
813
        aspect_save_orig(width,height);
820
814
        aspect_save_prescale(d_width,d_height);
821
 
        aspect_save_screenres(vo_screenwidth,vo_screenheight);
 
815
        update_xinerama_info();
822
816
 
823
817
        aspect(&d_width,&d_height,A_NOZOOM);
824
818
        vo_dx = (int)(vo_screenwidth - d_width) / 2;
825
819
        vo_dy = (int)(vo_screenheight - d_height) / 2;
826
820
        geometry(&vo_dx, &vo_dy, &d_width, &d_height,
827
821
                  vo_screenwidth, vo_screenheight);
 
822
        vo_dx += xinerama_x;
 
823
        vo_dy += xinerama_y;
828
824
 
829
825
#if defined(HAVE_NEW_GUI) && !defined(GL_WIN32)
830
826
        if (use_gui) {