libgoatvr

view src/opengl.c @ 30:1a8343ea54ce

fixed on windows
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 11 Apr 2015 04:01:47 +0300
parents 61feb3661397
children
line source
1 #include "opengl.h"
3 #ifdef __unix__
4 void vrimp_swap_buffers(void)
5 {
6 Display *dpy = glXGetCurrentDisplay();
7 Drawable win = glXGetCurrentDrawable();
8 glXSwapBuffers(dpy, win);
9 }
10 #endif /* __unix__ */
12 #ifdef WIN32
13 void vrimp_swap_buffers(void)
14 {
15 HDC dc = wglGetCurrentDC();
16 SwapBuffers(dc);
17 }
18 #endif /* WIN32 */
20 #ifdef __APPLE__
21 void vrimp_swap_buffers(void)
22 {
23 /* TODO: I don't think this can even be done without obj-c and a pointer
24 * to a GLView class or whatever the fuck it's called... investigate further
25 */
26 }
27 #endif /* __APPLE__ */