Ticket #55: gl2_removeosd.diff

File gl2_removeosd.diff, 2.9 KB (added by reimar, 22 years ago)

removing OSD from gl2

  • libvo/vo_gl2.c

    RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v
    retrieving revision 1.51
    diff -u -r1.51 vo_gl2.c
     
    102102static int      gl_bilinear=1;
    103103static int      gl_antialias=0;
    104104
    105 static void (*draw_alpha_fnc)
    106                  (int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride);
    107 
    108105
    109106/* The squares that are tiled to make up the game screen polygon */
    110107
    … …  
    556553  glLoadIdentity();
    557554}
    558555
    559 static void draw_alpha_32(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
    560    vo_draw_alpha_rgb32(w,h,src,srca,stride,ImageData+4*(y0*image_width+x0),4*image_width);
    561 }
    562 
    563 static void draw_alpha_24(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
    564    vo_draw_alpha_rgb24(w,h,src,srca,stride,ImageData+3*(y0*image_width+x0),3*image_width);
    565 }
    566 
    567 static void draw_alpha_16(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
    568    vo_draw_alpha_rgb16(w,h,src,srca,stride,ImageData+2*(y0*image_width+x0),2*image_width);
    569 }
    570 
    571 static void draw_alpha_15(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
    572    vo_draw_alpha_rgb15(w,h,src,srca,stride,ImageData+2*(y0*image_width+x0),2*image_width);
    573 }
    574 
    575 static void draw_alpha_null(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
    576 }
    577 
    578556#ifdef GL_WIN32
    579557
    580558static 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) {
    … …  
    962940
    963941  image_bytes=(image_bpp+7)/8;
    964942
    965   draw_alpha_fnc=draw_alpha_null;
    966 
    967943  switch(image_bpp)
    968944  {
    969945        case 15:
    … …  
    980956                                gl_bitmap_type     = GL_UNSIGNED_SHORT_5_6_5;
    981957                                gl_bitmap_type_s   ="GL_UNSIGNED_SHORT_5_6_5";
    982958                        }
    983 
    984                         if (image_bpp==15)
    985                              draw_alpha_fnc=draw_alpha_15;
    986                         else
    987                              draw_alpha_fnc=draw_alpha_16;
    988 
    989959                        break;
    990960        case 24:       
    991961                        if(image_mode!=MODE_BGR)
    … …  
    1000970                        }
    1001971                        gl_bitmap_type   = GL_UNSIGNED_BYTE;
    1002972                        gl_bitmap_type_s ="GL_UNSIGNED_BYTE";
    1003 
    1004                         draw_alpha_fnc=draw_alpha_24; break;
    1005973                        break;
    1006974        case 32:       
    1007975                        /* RGBA8888 */
    … …  
    1016984                                gl_bitmap_type   = GL_UNSIGNED_INT_8_8_8_8;
    1017985                                gl_bitmap_type_s ="GL_UNSIGNED_INT_8_8_8_8";
    1018986                        }
    1019 
    1020                         draw_alpha_fnc=draw_alpha_32; break;
    1021987                        break;
    1022988  }
    1023989
    … …  
    10901056
    10911057static void draw_osd(void)
    10921058{
    1093   if (ImageData)
    1094     vo_draw_text(image_width,image_height,draw_alpha_fnc);
    10951059}
    10961060
    10971061static void
    … …  
    11661130//    case IMGFMT_RGB32:
    11671131//    case IMGFMT_BGR32:
    11681132#endif
    1169         return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_OSD;
     1133        return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
    11701134    }
    11711135    return 0;
    11721136}