Function:s2open

From S2PLOT

Jump to: navigation, search

s2open

Open the S2PLOT device.

Prototype

int s2open(int fullscreen, int stereo, int argc, char **argv);

Description

Open the S2PLOT device. If fullscreen = 0, use windowed mode, else make best effort at going fullscreen. If stereo = 0, use mono view, else use stereo view. For stereo = 1, attempt active stereo mode, or for stereo = 2, attempt passive stereo mode. The commandline arguments are needed for the creation of GLUT contexts.

See Also

s2opend

s2opendo

PGPLOT Equivalent

PGOPEN

Code Example

#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"

int main(int argc, char *argv[])
{
   int fullscreen = 0;				/* Use the windowed mode */
   int stereo = 2;				/* Use passive stereo mode */

   s2open(fullscreen,stereo, argc, argv);	/* Open the display */
   s2swin(-1.,1., -1.,1., -1.,1.);		/* Set the window coordinates */
   s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0);	/* Draw coordinate box */
   s2show(1);					/* Open the s2plot window */
   
   return 1;
}

Back to S2PLOT function list.


Personal tools