mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-30 05:47:57 +03:00
Imported Upstream version 0.26.0
This commit is contained in:
commit
9a2b6c69b6
1398 changed files with 212217 additions and 0 deletions
57
components/nifogre/material.hpp
Normal file
57
components/nifogre/material.hpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
#ifndef COMPONENTS_NIFOGRE_MATERIAL_HPP
|
||||
#define COMPONENTS_NIFOGRE_MATERIAL_HPP
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <cassert>
|
||||
|
||||
#include <OgreString.h>
|
||||
|
||||
namespace Nif
|
||||
{
|
||||
class ShapeData;
|
||||
class NiTexturingProperty;
|
||||
class NiMaterialProperty;
|
||||
class NiAlphaProperty;
|
||||
class NiVertexColorProperty;
|
||||
class NiZBufferProperty;
|
||||
class NiSpecularProperty;
|
||||
class NiWireframeProperty;
|
||||
}
|
||||
|
||||
namespace NifOgre
|
||||
{
|
||||
|
||||
class NIFMaterialLoader {
|
||||
static void warn(const std::string &msg)
|
||||
{
|
||||
std::cerr << "NIFMaterialLoader: Warn: " << msg << std::endl;
|
||||
}
|
||||
|
||||
static void fail(const std::string &msg)
|
||||
{
|
||||
std::cerr << "NIFMaterialLoader: Fail: "<< msg << std::endl;
|
||||
abort();
|
||||
}
|
||||
|
||||
static std::map<size_t,std::string> sMaterialMap;
|
||||
|
||||
static std::string findTextureName(const std::string &filename);
|
||||
|
||||
public:
|
||||
static Ogre::String getMaterial(const Nif::ShapeData *shapedata,
|
||||
const Ogre::String &name, const Ogre::String &group,
|
||||
const Nif::NiTexturingProperty *texprop,
|
||||
const Nif::NiMaterialProperty *matprop,
|
||||
const Nif::NiAlphaProperty *alphaprop,
|
||||
const Nif::NiVertexColorProperty *vertprop,
|
||||
const Nif::NiZBufferProperty *zprop,
|
||||
const Nif::NiSpecularProperty *specprop,
|
||||
const Nif::NiWireframeProperty *wireprop,
|
||||
bool &needTangents);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue