libgoatvr

view src/opengl.c @ 33:1102327fe85f

added red-cyan anaglyph fallback drawing
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 30 Oct 2015 06:34:00 +0200
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__ */