Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get the model header
- auto lookupmodel = resourceManager->Resources.find(node->Attachment);
- if(lookupmodel == resourceManager->Resources.end()) { Error("buh"); }
- // -- //
- auto model = (Model*)lookupmodel->second;
- // Get the mesh
- auto lookupmesh = resourceManager->Resources.find(model->Presets[0].Meshes[0].Handle); // lol
- if(lookupmesh == resourceManager->Resources.end()) { Error("buh"); }
- // -- //
- auto mesh = (Mesh*)lookupmesh->second;
- // Get the vertex and index buffers
- auto lookupvbuffer = resourceManager->Resources.find(mesh->VertexBufferID.Handle);
- auto lookupibuffer = resourceManager->Resources.find(mesh->IndexBufferID.Handle);
- if(lookupvbuffer == resourceManager->Resources.end()) { Error("buh"); }
- if(lookupibuffer == resourceManager->Resources.end()) { Error("buh"); }
- // -- //
- auto vbuffer = (Buffer*)lookupvbuffer->second;
- auto ibuffer = (Buffer*)lookupibuffer->second;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement