VIDEO: removed dedicated threadpool

master
mgerhardy 2016-04-06 20:15:27 +02:00
parent 662c30ea02
commit e594749c30
2 changed files with 2 additions and 5 deletions

View File

@ -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;
}

View File

@ -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: