VIDEO: removed dedicated threadpool
parent
662c30ea02
commit
e594749c30
|
@ -6,8 +6,7 @@ namespace video {
|
|||
|
||||
static const char* supportedFormats[] = { "dae", "fbx", nullptr };
|
||||
|
||||
MeshPool::MeshPool() :
|
||||
_threadPool(2) {
|
||||
MeshPool::MeshPool() {
|
||||
}
|
||||
|
||||
MeshPool::~MeshPool() {
|
||||
|
@ -30,7 +29,7 @@ MeshPtr MeshPool::getMesh(const std::string& id) {
|
|||
return i->second;
|
||||
|
||||
const MeshPtr mesh(new Mesh());
|
||||
_threadPool.enqueue([=]() {mesh->loadMesh(name);});
|
||||
core::App::getInstance()->threadPool().enqueue([=]() {mesh->loadMesh(name);});
|
||||
_meshes[name] = mesh;
|
||||
return mesh;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Mesh.h"
|
||||
#include "core/ThreadPool.h"
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
|
||||
|
@ -11,7 +10,6 @@ class MeshPool {
|
|||
private:
|
||||
typedef std::unordered_map<std::string, MeshPtr> Meshes;
|
||||
Meshes _meshes;
|
||||
core::ThreadPool _threadPool;
|
||||
|
||||
std::string getName(const std::string& id) const;
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue