libgoatvr

diff src/opengl.c @ 8:3d9ec6fe97d7

- added distortion mesh generation for the OpenHMD module (unfinished) - changed internal implementation function naming to use the vrimp_ prefix - added an opengl helper function to load extension entry points
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 20 Sep 2014 13:22:53 +0300
parents e63cb28fc644
children d12592558809
line diff
     1.1 --- a/src/opengl.c	Fri Sep 19 15:16:51 2014 +0300
     1.2 +++ b/src/opengl.c	Sat Sep 20 13:22:53 2014 +0300
     1.3 @@ -1,18 +1,28 @@
     1.4  #include "opengl.h"
     1.5  
     1.6  #ifdef __unix__
     1.7 -void vr_gl_swap_buffers(void)
     1.8 +void vrimp_swap_buffers(void)
     1.9  {
    1.10  	Display *dpy = glXGetCurrentDisplay();
    1.11  	Drawable win = glXGetCurrentDrawable();
    1.12  	glXSwapBuffers(dpy, win);
    1.13  }
    1.14 +
    1.15 +void (*vrimp_glfunc(const char *name))()
    1.16 +{
    1.17 +	return glXGetProcAddress((const unsigned char*)name);
    1.18 +}
    1.19  #endif
    1.20  
    1.21  #ifdef WIN32
    1.22 -void vr_gl_swap_buffers(void)
    1.23 +void vrimp_swap_buffers(void)
    1.24  {
    1.25  	HDC dc = wglGetCurrentDC();
    1.26  	SwapBuffers(dc);
    1.27  }
    1.28 +
    1.29 +void (*vrimp_glfunc(const char *name))()
    1.30 +{
    1.31 +	return wglGetProcAddress(name);
    1.32 +}
    1.33  #endif