SFMLApplication(): contextSettings(32), window(sf::VideoMode(800, 600), "Skeletal Animation Library", sf::Style::Default, contextSettings), astroBoyMovingGlasses(astroBoy.model), astroBoyHeadBanging(astroBoy.model) { //Output bone hierarchy of astroBoy model: printBoneHierarchy(astroBoy.model); window.setFramerateLimit(144); window.setVerticalSyncEnabled(true); //Various settings glClearColor(0.5, 0.5, 0.5, 0.0f); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS); glEnable(GL_TEXTURE_2D); //Lighting GLfloat light_color[] = {0.9, 0.9, 0.9, 1.f}; glMaterialfv(GL_FRONT, GL_DIFFUSE, light_color); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); //Setup projection matrix glMatrixMode(GL_PROJECTION); glLoadIdentity(); //45° Field of View, 4:3 ratio, display range : 0.1 unit <-> 100 units gluPerspective(45.0, 4.0 / 3.0, 0.1, 100.0); glMatrixMode(GL_MODELVIEW); }
SFMLApplication(): contextSettings(32), window(sf::VideoMode(800, 640), "Skeletal Animation Library", sf::Style::Default, contextSettings), astroBoyMovingGlasses(astroBoy.model), astroBoyHeadBanging(astroBoy.model) { //Output bone hierarchy of astroBoy model: printBoneHierarchy(astroBoy.model); }