comparison libvo/vo_gl.c @ 11988:ccb15c72f331

printf -> mp_msg patch by Reimar Dffinger <Reimar.Doeffinger@stud.uni-karlsruhe.de>
author attila
date Sun, 22 Feb 2004 15:30:01 +0000
parents 85e503ddf65f
children 9d96071652c4
comparison
equal deleted inserted replaced
11987:5f780dae2cf3 11988:ccb15c72f331
4 #include <stdlib.h> 4 #include <stdlib.h>
5 #include <string.h> 5 #include <string.h>
6 #include <math.h> 6 #include <math.h>
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include "mp_msg.h"
9 #include "config.h" 10 #include "config.h"
10 #include "video_out.h" 11 #include "video_out.h"
11 #include "video_out_internal.h" 12 #include "video_out_internal.h"
12 13
13 #include <X11/Xlib.h> 14 #include <X11/Xlib.h>
53 static uint32_t texture_height; 54 static uint32_t texture_height;
54 55
55 static int slice_height=1; 56 static int slice_height=1;
56 57
57 static void resize(int x,int y){ 58 static void resize(int x,int y){
58 printf("[gl] Resize: %dx%d\n",x,y); 59 mp_msg(MSGT_VO, MSGL_V, "[gl] Resize: %dx%d\n",x,y);
59 glViewport( 0, 0, x, y ); 60 glViewport( 0, 0, x, y );
60 61
61 glMatrixMode(GL_PROJECTION); 62 glMatrixMode(GL_PROJECTION);
62 glLoadIdentity(); 63 glLoadIdentity();
63 glOrtho(0, image_width, image_height, 0, -1,1); 64 glOrtho(0, image_width, image_height, 0, -1,1);
111 /* Make the window */ 112 /* Make the window */
112 113
113 vinfo=glXChooseVisual( mDisplay,mScreen,wsGLXAttrib ); 114 vinfo=glXChooseVisual( mDisplay,mScreen,wsGLXAttrib );
114 if (vinfo == NULL) 115 if (vinfo == NULL)
115 { 116 {
116 printf("[gl] no GLX support present\n"); 117 mp_msg(MSGT_VO, MSGL_ERR, "[gl] no GLX support present\n");
117 return -1; 118 return -1;
118 } 119 }
119 120
120 121
121 122
174 glDepthMask(GL_FALSE); 175 glDepthMask(GL_FALSE);
175 glDisable(GL_CULL_FACE); 176 glDisable(GL_CULL_FACE);
176 177
177 glEnable(GL_TEXTURE_2D); 178 glEnable(GL_TEXTURE_2D);
178 179
179 printf("[gl] Creating %dx%d texture...\n",texture_width,texture_height); 180 mp_msg(MSGT_VO, MSGL_V, "[gl] Creating %dx%d texture...\n",texture_width,texture_height);
180 181
181 #if 1 182 #if 1
182 // glBindTexture(GL_TEXTURE_2D, texture_id); 183 // glBindTexture(GL_TEXTURE_2D, texture_id);
183 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR); 184 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR);
184 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR); 185 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR);
300 } 301 }
301 else 302 else
302 { 303 {
303 slice_height = 4; 304 slice_height = 4;
304 } 305 }
305 printf("[vo_gl] Using %d as slice_height (0 means image_height).\n", slice_height); 306 mp_msg(MSGT_VO, MSGL_INFO, "[vo_gl] Using %d as slice_height (0 means image_height).\n", slice_height);
306 307
307 if( !vo_init() ) return -1; // Can't open X11 308 if( !vo_init() ) return -1; // Can't open X11
308 309
309 return 0; 310 return 0;
310 } 311 }