Mercurial > mplayer.hg
comparison libvo/gl_common.c @ 16109:519a307e3ccf
OpenGL fixes for windows and vo_gl.c ported to windows.
author | reimar |
---|---|
date | Tue, 26 Jul 2005 13:47:18 +0000 |
parents | 629c54dc7e0d |
children | 5683110fce0a |
comparison
equal
deleted
inserted
replaced
16108:ab2504f2d5d6 | 16109:519a307e3ccf |
---|---|
1 #include "gl_common.h" | 1 #include "gl_common.h" |
2 | 2 |
3 void (APIENTRY *BindBuffer)(GLenum, GLuint); | 3 void (APIENTRY *BindBuffer)(GLenum, GLuint); |
4 GLvoid* (APIENTRY *MapBuffer)(GLenum, GLenum); | 4 GLvoid* (APIENTRY *MapBuffer)(GLenum, GLenum); |
5 GLboolean (APIENTRY *UnmapBuffer)(GLenum); | 5 GLboolean (APIENTRY *UnmapBuffer)(GLenum); |
6 void (APIENTRY *BufferData)(GLenum, GLsizeiptr, const GLvoid *, GLenum); | 6 void (APIENTRY *BufferData)(GLenum, intptr_t, const GLvoid *, GLenum); |
7 void (APIENTRY *CombinerParameterfv)(GLenum, const GLfloat *); | 7 void (APIENTRY *CombinerParameterfv)(GLenum, const GLfloat *); |
8 void (APIENTRY *CombinerParameteri)(GLenum, GLint); | 8 void (APIENTRY *CombinerParameteri)(GLenum, GLint); |
9 void (APIENTRY *CombinerInput)(GLenum, GLenum, GLenum, GLenum, GLenum, | 9 void (APIENTRY *CombinerInput)(GLenum, GLenum, GLenum, GLenum, GLenum, |
10 GLenum); | 10 GLenum); |
11 void (APIENTRY *CombinerOutput)(GLenum, GLenum, GLenum, GLenum, GLenum, | 11 void (APIENTRY *CombinerOutput)(GLenum, GLenum, GLenum, GLenum, GLenum, |
255 if (!ProgramEnvParameter4f) | 255 if (!ProgramEnvParameter4f) |
256 ProgramEnvParameter4f = getProcAddress("glProgramEnvParameter4fNV"); | 256 ProgramEnvParameter4f = getProcAddress("glProgramEnvParameter4fNV"); |
257 } | 257 } |
258 | 258 |
259 #ifdef GL_WIN32 | 259 #ifdef GL_WIN32 |
260 static void *w32gpa(const GLubyte *procName) { | |
261 return wglGetProcAddress(procName); | |
262 } | |
263 | |
260 int setGlWindow(int *vinfo, HGLRC *context, HWND win) | 264 int setGlWindow(int *vinfo, HGLRC *context, HWND win) |
261 { | 265 { |
262 int new_vinfo; | 266 int new_vinfo; |
263 HDC windc = GetDC(win); | 267 HDC windc = GetDC(win); |
264 HGLRC new_context = 0; | 268 HGLRC new_context = 0; |
302 if (!keep_context) { | 306 if (!keep_context) { |
303 if (*context) | 307 if (*context) |
304 wglDeleteContext(*context); | 308 wglDeleteContext(*context); |
305 *context = new_context; | 309 *context = new_context; |
306 *vinfo = new_vinfo; | 310 *vinfo = new_vinfo; |
307 getProcAddress = wglGetProcAddress; | 311 getProcAddress = w32gpa; |
308 getFunctions(); | 312 getFunctions(); |
309 | 313 |
310 // and inform that reinit is neccessary | 314 // and inform that reinit is neccessary |
311 return SET_WINDOW_REINIT; | 315 return SET_WINDOW_REINIT; |
312 } | 316 } |