Remove glutInitWindowPosition() calls to play nicer with window managers.
Move glutInitWindowSize() calls before glutInit() so the the default window
size can be overridden by the -geometry cmd line option.
int main( int argc, char *argv[] )
{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 200, 200 );
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Win = glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
int main (int argc, char *argv[])
{
- glutInit (&argc, argv);
- glutInitWindowPosition ( 0, 0);
glutInitWindowSize (200, 200);
+ glutInit (&argc, argv);
glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow (argv[0]);
glutReshapeFunc (Reshape);
int main( int argc, char *argv[] )
{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 400, 400 );
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Win = glutCreateWindow(argv[0]);
glewInit();
int main(int argc, char *argv[])
{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
glutInitWindowSize(600, 450);
-
+ glutInit(&argc, argv);
IndexMode = argc > 1 && strcmp(argv[1], "-ci") == 0;
if (IndexMode)
Init( argc, argv );
- glutInit( &argc, argv );
glutInitWindowSize( (int) Width, (int) Height );
- glutInitWindowPosition( 0, 0 );
+ glutInit( &argc, argv );
mode = ColorMode | GLUT_DOUBLE;
if (BufferMask & GL_STENCIL_BUFFER_BIT)
const char *filename = IMAGE_FILE;
int i = 1;
+ glutInitWindowSize( WinWidth, WinHeight );
+ glutInit( &argc, argv );
+
if (argc > i && strcmp(argv[i], "-ci")==0) {
ciMode = GL_TRUE;
i++;
filename = argv[i];
}
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( WinWidth, WinHeight );
-
if (ciMode)
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
else
int main( int argc, char *argv[] )
{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
glutInitWindowSize(600, 500);
+ glutInit(&argc, argv);
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
glutCreateWindow("Texture Cube Mapping");
glewInit();
const char *filename = IMAGE_FILE;
int i = 1;
+ glutInitWindowSize( 500, 400 );
+ glutInit( &argc, argv );
+
if (argc > i && strcmp(argv[i], "-ci")==0) {
ciMode = GL_TRUE;
i++;
filename = argv[i];
}
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 500, 400 );
-
if (ciMode)
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
else
int
main(int argc, char *argv[])
{
- glutInit(&argc, argv);
glutInitWindowSize(WinWidth, WinHeight);
+ glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("OpenGL Engine Demo");
glewInit();
int
main(int argc, char *argv[])
{
+ glutInitWindowSize(WinWidth, WinHeight);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
- glutInitWindowSize(WinWidth, WinHeight);
Win = glutCreateWindow("fbo_firecube");
glewInit();
init(argc, argv);
HEIGHT = atoi(av[3]);
}
- glutInitWindowPosition(0, 0);
glutInitWindowSize(WIDTH, HEIGHT);
glutInit(&ac, av);
int
main( int argc, char *argv[] )
{
- glutInit( &argc, argv );
glutInitWindowSize( 600, 600 );
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
glewInit();
int main( int argc, char *argv[] )
{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 200, 200 );
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Win = glutCreateWindow(argv[0]);
glewInit();
int
main(int argc, char *argv[])
{
- glutInit(&argc, argv);
- glutInitWindowPosition( 0, 0);
glutInitWindowSize(200, 200);
+ glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
int
main(int argc, char **argv)
{
+ glutInitWindowSize(500, 400);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
-
- glutInitWindowPosition(50, 50);
- glutInitWindowSize(500, 400);
-
glutCreateWindow("gamma test patterns");
glutReshapeFunc(Reshape);
glutDisplayFunc(display);
int
main(int argc, char *argv[])
{
+ glutInitWindowSize(WinWidth, WinHeight);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
- glutInitWindowSize(WinWidth, WinHeight);
Win = glutCreateWindow("gearbox");
init(argc, argv);
int main(int argc, char *argv[])
{
+ glutInitWindowSize(300, 300);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
-
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(300, 300);
win = glutCreateWindow("Gears");
init(argc, argv);
{
char *file;
- if (argc < 2)
- file = "geartrain.dat";
- else
- file = argv[1];
-
- glutInit(&argc, argv);
- glutInitWindowPosition (0, 0);
glutInitWindowSize(640,480);
+ glutInit(&argc, argv);
glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
if (glutCreateWindow ("Gear Train Simulation") == GL_FALSE)
exit (1);
+ if (argc < 2)
+ file = "geartrain.dat";
+ else
+ file = argv[1];
+
getdata (file);
process ();
init ();
int main( int argc, char *argv[] )
{
- glutInit( &argc, argv );
glutInitWindowSize(WinWidth, WinHeight);
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0] );
glewInit();
if (ac == 2)
frontbuffer = 0;
+ glutInitWindowSize(640, 480);
glutInit(&ac, av);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(640, 480);
glutCreateWindow("OpenGL/Mesa Performances");
glutDisplayFunc(display);
glutMainLoop();
fprintf(stderr,
"IperS V1.0\nWritten by David Bucciarelli (tech.hmw@plus.it)\n");
- glutInitWindowPosition(0, 0);
glutInitWindowSize(WIDTH, HEIGHT);
glutInit(&ac, av);
read_surface( "isosurf.dat" );
- glutInit( &argc, argv);
- glutInitWindowPosition(0, 0);
glutInitWindowSize(400, 400);
+ glutInit( &argc, argv);
type = GLUT_DEPTH;
type |= GLUT_RGB;
int main( int argc, char *argv[] )
{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 350, 350 );
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
win = glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
object=1;
- glutInit(&argc, argv);
- glutInitWindowPosition(0,0);
glutInitWindowSize(640,480);
+ glutInit(&argc, argv);
glutInitDisplayMode( GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGB );
{
GLint i;
- glutInit( &argc, argv );
glutInitWindowSize( 300, 300 );
- glutInitWindowPosition( 0, 0 );
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
glewInit();
int main( int argc, char *argv[] )
{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 400, 300 );
-
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
-
glutCreateWindow(argv[0]);
glewInit();
main(int argc, char **argv)
{
int i;
+
+ glutInitWindowSize(300, 300);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(300, 300);
for (i=1; i<argc; i++) {
if(!strcmp("-noms", argv[i])) {
int
main(int argc, char **argv)
{
+ glutInitWindowSize(500,500);
glutInit(&argc, argv);
+ glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
+ (void) glutCreateWindow("projtex");
+ glewInit();
if (argc > 1) {
NumTextures = atoi(argv[1]);
}
assert(NumTextures <= MAX_TEX);
- glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
- glutInitWindowSize(500,500);
- (void) glutCreateWindow("projtex");
- glewInit();
-
loadTexture = loadImageTextures;
drawObject = drawCube;
initialize();
}
*/
- glutInitWindowPosition(0, 0);
glutInitWindowSize(WIDTH, HEIGHT);
glutInit(&ac, av);
main( int argc, char *argv[] )
{
GLboolean ciMode = GL_FALSE;
+ glutInitWindowSize( 750, 250 );
+ glutInit( &argc, argv );
if (argc > 1 && strcmp(argv[1], "-ci")==0) {
ciMode = GL_TRUE;
}
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 750, 250 );
if (ciMode)
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
else
int main( int argc, char *argv[] )
{
- glutInit( &argc, argv );
- glutInitWindowPosition(0, 0);
glutInitWindowSize( 400, 400 );
-
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
-
glutCreateWindow(argv[0]);
Init();
int
main(int argc, char *argv[])
{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
glutInitWindowSize(WindowWidth, WindowHeight);
+ glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
glutCreateWindow(argv[0]);
glewInit();
int main( int argc, char *argv[] )
{
-
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 300, 300 );
-
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
-
glutCreateWindow( "spectex" );
Init();
main(int argc, char **argv)
{
int i;
+
+ glutInitWindowSize(600,300);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE);
linearFiltering = 0;
}
}
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(600,300);
glutCreateWindow("sprite blast");
glewInit();
glutReshapeFunc(reshape);
}
*/
- glutInitWindowPosition(0,0);
glutInitWindowSize(WIDTH,HEIGHT);
glutInit(&ac,av);
int
main(int ac, char **av)
{
- glutInitWindowPosition(0, 0);
glutInitWindowSize(WIDTH, HEIGHT);
glutInit(&ac, av);
usage();
+ glutInitWindowSize( 400, 400 );
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_SINGLE | GLUT_RGB );
- glutInitWindowPosition(0, 0);
- glutInitWindowSize( 400, 400 );
glutCreateWindow( argv[0] );
/* GH: Bit of a hack...
int main( int argc, char *argv[] )
{
- glutInit( &argc, argv );
glutInitWindowSize( 400, 400 );
- glutInitWindowPosition( 0, 0 );
-
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Win = glutCreateWindow(argv[0] );
GLboolean info = GL_FALSE;
int i;
+ glutInitWindowSize( winWidth, winHeight );
glutInit( &argc, argv );
for ( i = 1 ; i < argc ; i++ ) {
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE );
}
- glutInitWindowSize( winWidth, winHeight );
- glutInitWindowPosition( 0, 0 );
Win = glutCreateWindow( "Texture Environment Test" );
initialize();
int
main(int argc, char *argv[])
{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
glutInitWindowSize(700, 700);
+ glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
Win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
int main( int argc, char *argv[] )
{
- printf("For options: %s -help\n", argv[0]);
- glutInit( &argc, argv );
glutInitWindowSize( (int) Width, (int) Height );
- glutInitWindowPosition( 0, 0 );
-
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
-
glutCreateWindow( argv[0] );
+ printf("For options: %s -help\n", argv[0]);
if (argc==2 && strcmp(argv[1],"-help")==0) {
Help(argv[0]);
return 0;
fprintf(stderr,
"Tunnel V1.5\nWritten by David Bucciarelli (tech.hmw@plus.it)\n");
- glutInitWindowPosition(0, 0);
glutInitWindowSize(WIDTH, HEIGHT);
glutInit(&ac, av);
fprintf(stderr,
"Tunnel2 V1.0\nWritten by David Bucciarelli (tech.hmw@plus.it)\n");
- glutInitWindowPosition(0, 0);
glutInitWindowSize(WIDTHC0, HEIGHTC0);
glutInit(&ac, av);
int main( int argc, char *argv[] )
{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
glutInitWindowSize( Width, Height );
+ glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Win = glutCreateWindow( "GL_APPLE_vertex_array_object demo" );
glutReshapeFunc( Reshape );
int main( int argc, char *argv[] )
{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
glutInitWindowSize(500, 500);
+ glutInit(&argc, argv);
glutInitDisplayMode( GLUT_RGB );
if (glutCreateWindow("winpos") <= 0) {