示例#1
0
/* Entry point of program */
int main(int argc, char* argv[])
{
    GLWrapper *glw = new GLWrapper(1024, 768, "Lab2: Hello 3D");;

    if (!ogl_LoadFunctions())
    {
        fprintf(stderr, "ogl_LoadFunctions() failed. Exiting\n");
        return 0;
    }

    /* Note it you might want to move this call to the wrapper class */
    glw->setErrorCallback(error_callback);

    glw->setRenderer(display);
    glw->setKeyCallback(keyCallback);
    glw->setMouseCallback(mouseCallback);
    glw->setReshapeCallback(reshape);

    init(glw);

    glw->eventLoop();

    delete(glw);
    return 0;
}
示例#2
0
/* Entry point of program */
int main(int argc, char* argv[])
{
	GLWrapper *glw = new GLWrapper(1024, 768, "Lab2: Hello 3D");;

	if (!ogl_LoadFunctions())
	{
		fprintf(stderr, "ogl_LoadFunctions() failed. Exiting\n");
		return 0;
	}

	glw->setRenderer(display);
	glw->setKeyCallback(keyCallback);
	glw->setReshapeCallback(reshape);

	init(glw);

	glw->eventLoop();

	delete(glw);
	return 0;
}