Ticket #55: gl2_removeosd.diff
| File gl2_removeosd.diff, 2.9 KB (added by , 22 years ago) |
|---|
-
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
102 102 static int gl_bilinear=1; 103 103 static int gl_antialias=0; 104 104 105 static void (*draw_alpha_fnc)106 (int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride);107 108 105 109 106 /* The squares that are tiled to make up the game screen polygon */ 110 107 … … 556 553 glLoadIdentity(); 557 554 } 558 555 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 578 556 #ifdef GL_WIN32 579 557 580 558 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) { … … 962 940 963 941 image_bytes=(image_bpp+7)/8; 964 942 965 draw_alpha_fnc=draw_alpha_null;966 967 943 switch(image_bpp) 968 944 { 969 945 case 15: … … 980 956 gl_bitmap_type = GL_UNSIGNED_SHORT_5_6_5; 981 957 gl_bitmap_type_s ="GL_UNSIGNED_SHORT_5_6_5"; 982 958 } 983 984 if (image_bpp==15)985 draw_alpha_fnc=draw_alpha_15;986 else987 draw_alpha_fnc=draw_alpha_16;988 989 959 break; 990 960 case 24: 991 961 if(image_mode!=MODE_BGR) … … 1000 970 } 1001 971 gl_bitmap_type = GL_UNSIGNED_BYTE; 1002 972 gl_bitmap_type_s ="GL_UNSIGNED_BYTE"; 1003 1004 draw_alpha_fnc=draw_alpha_24; break;1005 973 break; 1006 974 case 32: 1007 975 /* RGBA8888 */ … … 1016 984 gl_bitmap_type = GL_UNSIGNED_INT_8_8_8_8; 1017 985 gl_bitmap_type_s ="GL_UNSIGNED_INT_8_8_8_8"; 1018 986 } 1019 1020 draw_alpha_fnc=draw_alpha_32; break;1021 987 break; 1022 988 } 1023 989 … … 1090 1056 1091 1057 static void draw_osd(void) 1092 1058 { 1093 if (ImageData)1094 vo_draw_text(image_width,image_height,draw_alpha_fnc);1095 1059 } 1096 1060 1097 1061 static void … … 1166 1130 // case IMGFMT_RGB32: 1167 1131 // case IMGFMT_BGR32: 1168 1132 #endif 1169 return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_OSD;1133 return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; 1170 1134 } 1171 1135 return 0; 1172 1136 }
