Function:s2open
From S2PLOT
(Difference between revisions)
Revision as of 04:16, 26 October 2007 S2plot admin (Talk | contribs) ← Previous diff |
Current revision S2plot admin (Talk | contribs) |
||
Line 22: | Line 22: | ||
== PGPLOT Equivalent == | == PGPLOT Equivalent == | ||
- | [ http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGOPEN | PGOPEN ] | + | [http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGOPEN PGOPEN ] |
== Code Example == | == Code Example == | ||
Line 45: | Line 45: | ||
</pre></code> | </pre></code> | ||
- | [[S2PLOT:Functions List | Back]] to S2PLOT function list. | + | [[S2PLOT:Function List | Back]] to S2PLOT function list. |
__NOTOC__ | __NOTOC__ | ||
__NOEDITSECTION__ | __NOEDITSECTION__ |
Current revision
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
PGPLOT Equivalent
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.