Ejemplo n.º 1
0
int main(int argc, char *argv[]){
    PaStream *stream;

    sharedBuffer = (Packet *)malloc(sizeof(Packet) * BUFFER_SIZE);

    processArgs(argc, argv);

    if (!startAudio(stream, argv[1])){
        exit(1);
    }

    // TODO - get rid of glut stuff and set up context manually
    setupGlut(argc, argv);

    GLenum err = glewInit();
    if (GLEW_OK != err){
        fprintf(stderr, "GLEW Error: %s\n", glewGetErrorString(err));
        exit(1);
    }

    SetupRC();
    glutMainLoop();

    free(sharedBuffer);
    endAudio(stream);
    exit(0);
}
int
main(int argc, char* argv[])
{
    OSG::osgInit(argc,argv);

    setupGlut(&argc, argv);
    setupScene();

    OSG::commitChanges();

    glutReshapeWindow(600, 600);
    glutMainLoop();

    return EXIT_SUCCESS;
}
Ejemplo n.º 3
0
int main(int argc, char **argv) 
{
	std::string fileName(argv[1]);
	primaryOBJ = new model(fileName, verticesPerFace);

	//setup glut window
	setupGlut(argc, argv);

	//setup the projection and view matrices
	initViewport();
	//initialize the cube map textures that will form our skybox
	initCubeMap();

	// initialize the fbo for dynamic cubemapping
	//initDynamicCubeMap();
	// standard light initialization.  Relatively unchanged from the Bunny project
	create_lights();
	//standard material initialization.  Relatively unchanged from the Bunny project
	create_material();
	teapotShader = set_shaders((char *)"phongEC");
	planeShader = set_shaders((char *)"plane");

	// This will read in the texture that will be applied to the teapot, if a texture is applied to the teapot at all
	// initTeapotTexture((char*)"textures/bubble_color.ppm");
	initCircleTexture((char*)"textures/circle.tga");
	// setting up the main shader for the teapot
	defaultShader = set_shaders((char*)"phongEC");
	// setting up the shader for the skybox / cube map
	skyboxShader = set_shaders((char*)"skybox");
	// set up the skybox geometry cube
	initSkyboxGeometry();

	// Main loop functions
	glutDisplayFunc(draw_AA);
	glutKeyboardFunc(keyBindings);
	glutSpecialFunc(translateCam);

	glutMainLoop();
	return 0;
}
Ejemplo n.º 4
0
int main(int argi, char* argv[]){
	setupGlut(argi, argv);
	glutMainLoop();
}