mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
readable vb and obj models via the new interface
This commit is contained in:
@@ -15,7 +15,7 @@ namespace vb01{
|
||||
cout<<"Failed to load model:"<<importer.GetErrorString()<<endl;
|
||||
exit(-1);
|
||||
}
|
||||
//processNode(scene->mRootNode, scene, this);
|
||||
processNode(scene->mRootNode, scene, model);
|
||||
}
|
||||
|
||||
void AssimpModelReader::processNode(aiNode *node, const aiScene *scene, Node *currentNode){
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace vb01{
|
||||
shader->setMat4(model,"model");
|
||||
|
||||
if(skeleton){
|
||||
skeleton->update();
|
||||
//skeleton->update();
|
||||
|
||||
shader->editShader(Shader::VERTEX_SHADER,2,"const int numBones="+to_string(skeleton->getNumBones())+";");
|
||||
shader->editShader(Shader::VERTEX_SHADER,3,"const int numVertGroups="+to_string(numVertexGroups)+";");
|
||||
|
||||
+4
-1
@@ -10,10 +10,13 @@ namespace vb01{
|
||||
}
|
||||
|
||||
void Skeleton::update(){
|
||||
for(Bone *b : bones)
|
||||
b->update();
|
||||
}
|
||||
|
||||
void Skeleton::addBone(Bone *bone, Bone *parent){
|
||||
parent->attachChild(bone);
|
||||
if(parent)
|
||||
parent->attachChild(bone);
|
||||
bone->setSkeleton(this);
|
||||
bones.push_back(bone);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user