added scene-graph with chair objects

This commit is contained in:
Caenneth 2024-06-19 21:58:00 +02:00
parent 7db5240ced
commit f38f58a3a8
1 changed files with 4 additions and 4 deletions

View File

@ -212,7 +212,7 @@ void init(void) {
setNodeRenderFunction(&renderNode);
// read scene graph
rootNode = loadSceneGraphFromFile("../test-scene-graph.scg");
rootNode = loadSceneGraphFromFile("../scene-graph.scg");
// ENABLE BACKFACE CULLING
glFrontFace(GL_CCW);
@ -261,9 +261,9 @@ void draw(void) {
if (step > 1.0f) step -= 1.0f;
if (step < 0.0f) step += 1.0f;
SceneNode* box3 = findNodeByName("box3", rootNode);
rotateY(&box3->transformation, &box3->transformation, 0.001);
updateSceneNode(rootNode, NULL);
//SceneNode* box3 = findNodeByName("box3", rootNode);
//rotateY(&box3->transformation, &box3->transformation, 0.001);
//updateSceneNode(rootNode, NULL);
// step multiplied by pi * 2 for use in rotation and trig functions
GLfloat stepi = step * pi * 2;