libgoatvr

annotate src/opengl.c @ 31:ec6edfe7774c

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