The main thread is not mutex blocked while child threads load anymore.
This commit is contained in:
@@ -13,7 +13,7 @@ private:
|
||||
|
||||
public:
|
||||
~Model();
|
||||
const std::vector<RawModel::MaterialGroup>& TextureGroups() const { return m_RawModel->TextureGroups; }
|
||||
const std::vector<RawModel::MaterialGroup>& MaterialGroups() const { return m_RawModel->MaterialGroups; }
|
||||
const glm::mat4& Matrix() const { return m_RawModel->m_Matrix; }
|
||||
const std::vector<RawModel::Vertex>& Vertices() const { return m_RawModel->m_Vertices; }
|
||||
|
||||
|
||||
@@ -15,16 +15,16 @@
|
||||
|
||||
struct ModelJob : RenderJob
|
||||
{
|
||||
ModelJob(Model* model, Camera* camera, glm::mat4 matrix, ::Model::MaterialGroup texGroup, ComponentWrapper modelComponent, World* world)
|
||||
ModelJob(Model* model, Camera* camera, glm::mat4 matrix, ::RawModel::MaterialGroup matGroup, ComponentWrapper modelComponent, World* world)
|
||||
: RenderJob()
|
||||
{
|
||||
Model = model;
|
||||
TextureID = (texGroup.Texture) ? texGroup.Texture->ResourceID : 0;
|
||||
DiffuseTexture = texGroup.Texture.get();
|
||||
NormalTexture = texGroup.NormalMap.get();
|
||||
SpecularTexture = texGroup.SpecularMap.get();
|
||||
StartIndex = texGroup.StartIndex;
|
||||
EndIndex = texGroup.EndIndex;
|
||||
TextureID = (matGroup.Texture) ? matGroup.Texture->ResourceID : 0;
|
||||
DiffuseTexture = matGroup.Texture.get();
|
||||
NormalTexture = matGroup.NormalMap.get();
|
||||
SpecularTexture = matGroup.SpecularMap.get();
|
||||
StartIndex = matGroup.StartIndex;
|
||||
EndIndex = matGroup.EndIndex;
|
||||
Matrix = matrix;
|
||||
Color = modelComponent["Color"];
|
||||
Entity = modelComponent.EntityID;
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
unsigned int EndIndex;
|
||||
};
|
||||
|
||||
std::vector<MaterialGroup> TextureGroups;
|
||||
std::vector<MaterialGroup> MaterialGroups;
|
||||
|
||||
std::vector<Vertex> m_Vertices;
|
||||
std::vector<unsigned int> m_Indices;
|
||||
|
||||
Reference in New Issue
Block a user