Fix Obj texture parsing error: where obj texture map statement contains texture option, it will fail to parse the correct image url, as a result, the texture won't be shown. Besides, we also add clamp texture mode for obj
This commit is contained in:
@@ -161,6 +161,19 @@ struct Material
|
||||
aiString textureSpecularity;
|
||||
aiString textureOpacity;
|
||||
aiString textureDisp;
|
||||
enum TextureType
|
||||
{
|
||||
TextureDiffuseType = 0,
|
||||
TextureSpecularType,
|
||||
TextureAmbientType,
|
||||
TextureBumpType,
|
||||
TextureNormalType,
|
||||
TextureSpecularityType,
|
||||
TextureOpacityType,
|
||||
TextureDispType,
|
||||
TextureTypeCount
|
||||
};
|
||||
bool clamp[TextureTypeCount];
|
||||
|
||||
//! Ambient color
|
||||
aiColor3D ambient;
|
||||
@@ -186,6 +199,10 @@ struct Material
|
||||
, ior (1.f)
|
||||
{
|
||||
// empty
|
||||
for (size_t i = 0; i < TextureTypeCount; ++i)
|
||||
{
|
||||
clamp[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Destructor
|
||||
|
||||
Reference in New Issue
Block a user