added -f option for full-screeen
This commit is contained in:
@@ -236,6 +236,7 @@ static void SpecialKey( int key, int x, int y )
|
|||||||
static void Init( int argc, char *argv[] )
|
static void Init( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
GLboolean convolve = GL_FALSE;
|
GLboolean convolve = GL_FALSE;
|
||||||
|
GLboolean fullscreen = GL_FALSE;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
@@ -248,8 +249,13 @@ static void Init( int argc, char *argv[] )
|
|||||||
else if (strcmp(argv[i], "-c")==0) {
|
else if (strcmp(argv[i], "-c")==0) {
|
||||||
convolve = GL_TRUE;
|
convolve = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(argv[i], "-f")==0) {
|
||||||
|
fullscreen = GL_TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fullscreen)
|
||||||
|
glutFullScreen();
|
||||||
|
|
||||||
/* Cylinder object */
|
/* Cylinder object */
|
||||||
{
|
{
|
||||||
@@ -421,6 +427,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutSpecialFunc( SpecialKey );
|
glutSpecialFunc( SpecialKey );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
if (Animate)
|
||||||
glutIdleFunc( Idle );
|
glutIdleFunc( Idle );
|
||||||
|
|
||||||
glutCreateMenu(ModeMenu);
|
glutCreateMenu(ModeMenu);
|
||||||
|
Reference in New Issue
Block a user