libgoatvr

diff src/opengl.c @ 5:e63cb28fc644

working on the linux side a bit
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 18 Sep 2014 10:56:45 +0300
parents
children 3d9ec6fe97d7
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/opengl.c	Thu Sep 18 10:56:45 2014 +0300
     1.3 @@ -0,0 +1,18 @@
     1.4 +#include "opengl.h"
     1.5 +
     1.6 +#ifdef __unix__
     1.7 +void vr_gl_swap_buffers(void)
     1.8 +{
     1.9 +	Display *dpy = glXGetCurrentDisplay();
    1.10 +	Drawable win = glXGetCurrentDrawable();
    1.11 +	glXSwapBuffers(dpy, win);
    1.12 +}
    1.13 +#endif
    1.14 +
    1.15 +#ifdef WIN32
    1.16 +void vr_gl_swap_buffers(void)
    1.17 +{
    1.18 +	HDC dc = wglGetCurrentDC();
    1.19 +	SwapBuffers(dc);
    1.20 +}
    1.21 +#endif