MCPcopy Create free account
hub / github.com/assimp/assimp / Load

Method Load

samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/ModelLoader.cpp:18–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18bool ModelLoader::Load(HWND hwnd, ID3D11Device * dev, ID3D11DeviceContext * devcon, std::string filename) {
19 Assimp::Importer importer;
20
21 const aiScene* pScene = importer.ReadFile(filename,
22 aiProcess_Triangulate |
23 aiProcess_ConvertToLeftHanded);
24
25 if (pScene == nullptr)
26 return false;
27
28 this->directory_ = filename.substr(0, filename.find_last_of("/\\"));
29
30 this->dev_ = dev;
31 this->devcon_ = devcon;
32 this->hwnd_ = hwnd;
33
34 processNode(pScene->mRootNode, pScene);
35
36 return true;
37}
38
39void ModelLoader::Draw(ID3D11DeviceContext * devcon) {
40 for (size_t i = 0; i < meshes_.size(); ++i ) {

Callers 1

InitGraphicsFunction · 0.45

Calls 1

ReadFileMethod · 0.45

Tested by

no test coverage detected