libgoatvr
annotate src/opengl.c @ 7:6896f9cf9621
- configure now emits config.status with the current confure invocation
- now vr_init will heed the VR_MODULE env var for the name of the module to use
- more stuff on the openhmd module
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 19 Sep 2014 15:16:51 +0300 |
parents | |
children | 3d9ec6fe97d7 |
rev | line source |
---|---|
nuclear@5 | 1 #include "opengl.h" |
nuclear@5 | 2 |
nuclear@5 | 3 #ifdef __unix__ |
nuclear@5 | 4 void vr_gl_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@5 | 10 #endif |
nuclear@5 | 11 |
nuclear@5 | 12 #ifdef WIN32 |
nuclear@5 | 13 void vr_gl_swap_buffers(void) |
nuclear@5 | 14 { |
nuclear@5 | 15 HDC dc = wglGetCurrentDC(); |
nuclear@5 | 16 SwapBuffers(dc); |
nuclear@5 | 17 } |
nuclear@5 | 18 #endif |