nuclear@4: #ifdef WIN32 nuclear@4: #define WIN32_LEAN_AND_MEAN nuclear@4: #include nuclear@4: #endif nuclear@4: nuclear@4: #ifdef __APPLE__ nuclear@4: #include nuclear@4: #else nuclear@4: #include nuclear@4: #endif nuclear@4: nuclear@4: #include "vr_impl.h" nuclear@4: nuclear@4: static int init(void) nuclear@4: { nuclear@4: return 0; nuclear@4: } nuclear@4: nuclear@4: static void draw(unsigned int fbtex, float u, float maxu, float v, float maxv) nuclear@4: { nuclear@4: glPushAttrib(GL_ENABLE_BIT | GL_TRANSFORM_BIT); nuclear@4: nuclear@4: glDisable(GL_LIGHTING); nuclear@4: glDisable(GL_DEPTH_TEST); nuclear@4: glDisable(GL_FOG); nuclear@4: glDisable(GL_CULL_FACE); nuclear@4: nuclear@4: glMatrixMode(GL_MODELVIEW); nuclear@4: glLoadIdentity(); nuclear@4: glMatrixMode(GL_PROJECTION); nuclear@4: glLoadIdentity(); nuclear@4: nuclear@4: glBegin(GL_QUADS); nuclear@4: glTexCoord2f(u, v); nuclear@4: glVertex2f(-1, -1); nuclear@4: glTexCoord2f((u + maxu) / 2, v); nuclear@4: glVertex2f(1, -1); nuclear@4: glTexCoord2f((u + maxu) / 2, maxv); nuclear@4: glVertex2f(1, 1); nuclear@4: glTexCoord2f(u, maxv); nuclear@4: glVertex2f(-1, 1); nuclear@4: glEnd(); nuclear@4: nuclear@4: glPopMatrix(); nuclear@4: glMatrixMode(GL_MODELVIEW); nuclear@4: glPopMatrix(); nuclear@4: nuclear@4: glPopAttrib(); nuclear@4: } nuclear@4: nuclear@4: struct vr_module *vr_module_null(void) nuclear@4: { nuclear@4: static struct vr_module m; nuclear@4: nuclear@4: if(!m.init) { nuclear@4: m.name = "null"; nuclear@4: m.init = init; nuclear@4: m.draw = draw; nuclear@4: } nuclear@4: return &m; nuclear@4: }