// reshape the display after a shape change void OpenGLDisplayDevice::reshape(void) { xSize = 512; ySize = 512; xOrig = 0; yOrig = 0; switch (inStereo) { case OPENGL_STEREO_SIDE: case OPENGL_STEREO_CROSSED: set_screen_pos(0.5f * (float)xSize / (float)ySize); break; case OPENGL_STEREO_ABOVEBELOW: set_screen_pos(2.0f * (float)xSize / (float)ySize); break; case OPENGL_STEREO_STENCIL: enable_stencil_stereo(); set_screen_pos((float)xSize / (float)ySize); break; default: set_screen_pos((float)xSize / (float)ySize); break; } }
// reshape the display after a shape change void FltkOpenGLDisplayDevice::reshape(void) { xSize = window->w(); ySize = window->h(); xOrig = window->x(); yOrig = screenY - window->y() - ySize; switch (inStereo) { case OPENGL_STEREO_SIDE: set_screen_pos(0.5f * (float)xSize / (float)ySize); break; case OPENGL_STEREO_ABOVEBELOW: set_screen_pos(2.0f * (float)xSize / (float)ySize); break; case OPENGL_STEREO_STENCIL_CHECKERBOARD: case OPENGL_STEREO_STENCIL_COLUMNS: case OPENGL_STEREO_STENCIL_ROWS: enable_stencil_stereo(inStereo); set_screen_pos((float)xSize / (float)ySize); break; default: set_screen_pos((float)xSize / (float)ySize); break; } }
// reshape the display after a shape change void OpenGLDisplayDevice::reshape(void) { // this code assumes that the xSize and ySize variables have // been updated (magically) already by the time this gets called. switch (inStereo) { case OPENGL_STEREO_SIDE: set_screen_pos(0.5f * (float)xSize / (float)ySize); break; case OPENGL_STEREO_ABOVEBELOW: set_screen_pos(2.0f * (float)xSize / (float)ySize); break; case OPENGL_STEREO_STENCIL_CHECKERBOARD: case OPENGL_STEREO_STENCIL_COLUMNS: case OPENGL_STEREO_STENCIL_ROWS: enable_stencil_stereo(inStereo); set_screen_pos((float)xSize / (float)ySize); break; default: set_screen_pos((float)xSize / (float)ySize); break; } }
// reshape the display after a shape change void OpenGLPbufferDisplayDevice::reshape(void) { switch (inStereo) { case OPENGL_STEREO_SIDE: set_screen_pos(0.5f * (float)xSize / (float)ySize); break; case OPENGL_STEREO_ABOVEBELOW: set_screen_pos(2.0f * (float)xSize / (float)ySize); break; case OPENGL_STEREO_STENCIL_CHECKERBOARD: case OPENGL_STEREO_STENCIL_COLUMNS: case OPENGL_STEREO_STENCIL_ROWS: enable_stencil_stereo(inStereo); set_screen_pos((float)xSize / (float)ySize); break; default: set_screen_pos((float)xSize / (float)ySize); break; } }