quick changes

This commit is contained in:
devZoGok
2022-03-31 19:09:10 +03:00
parent 0d30778d97
commit ca38704a09
+2 -4
View File
@@ -58,24 +58,22 @@ int main(){
rootNode->attachChild(driver); rootNode->attachChild(driver);
Box *leftBox = new Box(size); Box *leftBox = new Box(size);
Node *leftNode = new Node(); Node *leftNode = new Node(Vector3(-1, 0, 0));
Material *leftMat = new Material(shaderPath); Material *leftMat = new Material(shaderPath);
leftMat->addBoolUniform("texturingEnabled", false); leftMat->addBoolUniform("texturingEnabled", false);
leftMat->addVec4Uniform("diffuseColor", Vector4(1, 0, 0, 1)); leftMat->addVec4Uniform("diffuseColor", Vector4(1, 0, 0, 1));
leftBox->setMaterial(leftMat); leftBox->setMaterial(leftMat);
leftNode->attachMesh(leftBox); leftNode->attachMesh(leftBox);
rootNode->attachChild(leftNode); rootNode->attachChild(leftNode);
leftNode->setPosition(Vector3(-1, 0, 0));
Box *rightBox = new Box(size); Box *rightBox = new Box(size);
Node *rightNode = new Node(); Node *rightNode = new Node(Vector3(1, 0, 0));
Material *rightMat = new Material(shaderPath); Material *rightMat = new Material(shaderPath);
rightMat->addBoolUniform("texturingEnabled", false); rightMat->addBoolUniform("texturingEnabled", false);
rightMat->addVec4Uniform("diffuseColor", Vector4(0, 0, 1, 1)); rightMat->addVec4Uniform("diffuseColor", Vector4(0, 0, 1, 1));
rightBox->setMaterial(rightMat); rightBox->setMaterial(rightMat);
rightNode->attachMesh(rightBox); rightNode->attachMesh(rightBox);
rootNode->attachChild(rightNode); rootNode->attachChild(rightNode);
rightNode->setPosition(Vector3(1, 0, 0));
/* /*
* KeyframeChannel structs determine what object and how it will be animated. * KeyframeChannel structs determine what object and how it will be animated.