From 4c63dcc29f54bf30397c2a3e641efd87657abe92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Wed, 27 Aug 2014 10:52:32 +0300 Subject: [PATCH] Model Renderer|Cleanup: Renamed "emission" map to "emissive" map --- .../client/net.dengine.client.pack/testmodel.pack/Info | 4 ++-- doomsday/client/src/render/modelrenderer.cpp | 4 ++-- doomsday/libgui/include/de/graphics/modeldrawable.h | 2 +- doomsday/libgui/src/graphics/modeldrawable.cpp | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doomsday/client/net.dengine.client.pack/testmodel.pack/Info b/doomsday/client/net.dengine.client.pack/testmodel.pack/Info index 0e3a2493b0..6c70e3a5f2 100644 --- a/doomsday/client/net.dengine.client.pack/testmodel.pack/Info +++ b/doomsday/client/net.dengine.client.pack/testmodel.pack/Info @@ -11,11 +11,11 @@ asset model.thing.possessed { group material.@0 { heightMap = "bodyheights.png" - #emissionMap = "bodyemission.png" + #emissiveMap = "bodyemission.png" } #group material.@5 { # heightMap = "bodyheights.png" - # emissionMap = "bodyemission.png" + # emissiveMap = "bodyemission.png" #} group animation { diff --git a/doomsday/client/src/render/modelrenderer.cpp b/doomsday/client/src/render/modelrenderer.cpp index 721fb256ba..6f0b722548 100644 --- a/doomsday/client/src/render/modelrenderer.cpp +++ b/doomsday/client/src/render/modelrenderer.cpp @@ -143,7 +143,7 @@ DENG2_PIMPL(ModelRenderer) model.setAtlas(*atlas); model.setDefaultTexture(ModelDrawable::Normals, defaultNormals); - model.setDefaultTexture(ModelDrawable::Emission, defaultEmission); + model.setDefaultTexture(ModelDrawable::Emissive, defaultEmission); model.setDefaultTexture(ModelDrawable::Specular, defaultSpecular); // Use the texture mapping specified in the shader. This has to be done @@ -212,7 +212,7 @@ DENG2_PIMPL(ModelRenderer) handleMaterialTexture(model, mat.key(), *mat.value(), "normalMap", ModelDrawable::Normals); handleMaterialTexture(model, mat.key(), *mat.value(), "heightMap", ModelDrawable::Height); handleMaterialTexture(model, mat.key(), *mat.value(), "specularMap", ModelDrawable::Specular); - handleMaterialTexture(model, mat.key(), *mat.value(), "emissionMap", ModelDrawable::Emission); + handleMaterialTexture(model, mat.key(), *mat.value(), "emissiveMap", ModelDrawable::Emissive); } } diff --git a/doomsday/libgui/include/de/graphics/modeldrawable.h b/doomsday/libgui/include/de/graphics/modeldrawable.h index 7fd6c0ce04..62a21f4156 100644 --- a/doomsday/libgui/include/de/graphics/modeldrawable.h +++ b/doomsday/libgui/include/de/graphics/modeldrawable.h @@ -61,7 +61,7 @@ class LIBGUI_PUBLIC ModelDrawable : public AssetGroup The default normal vector pointing straight away from the surface is therefore (128, 128, 255) => (0, 0, 1). */ Specular = 2, ///< Specular color (RGB) and reflection sharpness (A). - Emission = 3, /**< Additional light emitted by the surface that is not affected by + Emissive = 3, /**< Additional light emitted by the surface that is not affected by external factors. */ Height = 4, /**< Height values are converted to a normal map. Lighter regions are higher than dark regions. */ diff --git a/doomsday/libgui/src/graphics/modeldrawable.cpp b/doomsday/libgui/src/graphics/modeldrawable.cpp index 20a48704a3..1be253198d 100644 --- a/doomsday/libgui/src/graphics/modeldrawable.cpp +++ b/doomsday/libgui/src/graphics/modeldrawable.cpp @@ -469,7 +469,7 @@ DENG2_PIMPL(ModelDrawable) case aiTextureType_NORMALS: return Normals; case aiTextureType_HEIGHT: return Height; case aiTextureType_SPECULAR: return Specular; - case aiTextureType_EMISSIVE: return Emission; + case aiTextureType_EMISSIVE: return Emissive; default: DENG2_ASSERT(!"Unsupported texture type"); return Diffuse; @@ -484,7 +484,7 @@ DENG2_PIMPL(ModelDrawable) case Normals: return aiTextureType_NORMALS; case Height: return aiTextureType_HEIGHT; case Specular: return aiTextureType_SPECULAR; - case Emission: return aiTextureType_EMISSIVE; + case Emissive: return aiTextureType_EMISSIVE; default: break; } @@ -526,7 +526,7 @@ DENG2_PIMPL(ModelDrawable) fallBackToDefaultTexture(mat, Specular); loadTextureImage(i, aiTextureType_EMISSIVE); - fallBackToDefaultTexture(mat, Emission); + fallBackToDefaultTexture(mat, Emissive); } } @@ -1058,7 +1058,7 @@ ModelDrawable::TextureMap ModelDrawable::textToTextureMap(String const &text) { "diffuse", Diffuse }, { "normals", Normals }, { "specular", Specular }, - { "emission", Emission }, + { "emission", Emissive }, { "height", Height } }; @@ -1135,7 +1135,7 @@ void ModelDrawable::unsetAtlas() ModelDrawable::Mapping ModelDrawable::diffuseNormalsSpecularEmission() // static { - return Mapping() << Diffuse << Normals << Specular << Emission; + return Mapping() << Diffuse << Normals << Specular << Emissive; } void ModelDrawable::setTextureMapping(Mapping mapsToUse)