libgoatvr

view 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 source
1 #include "opengl.h"
3 #ifdef __unix__
4 void vr_gl_swap_buffers(void)
5 {
6 Display *dpy = glXGetCurrentDisplay();
7 Drawable win = glXGetCurrentDrawable();
8 glXSwapBuffers(dpy, win);
9 }
10 #endif
12 #ifdef WIN32
13 void vr_gl_swap_buffers(void)
14 {
15 HDC dc = wglGetCurrentDC();
16 SwapBuffers(dc);
17 }
18 #endif