1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 23:49:55 +00:00
openmw-tes3mp/apps/openmw/mwrender/util.hpp

38 lines
1,013 B
C++
Raw Normal View History

2015-04-19 15:55:56 +00:00
#ifndef OPENMW_MWRENDER_UTIL_H
#define OPENMW_MWRENDER_UTIL_H
#include <osg/NodeCallback>
2015-04-19 15:55:56 +00:00
#include <osg/ref_ptr>
#include <string>
namespace osg
{
class Node;
}
namespace Resource
{
class ResourceSystem;
}
namespace MWRender
{
2016-09-14 14:18:29 +00:00
// Overrides the texture of nodes in the mesh that had the same NiTexturingProperty as the first NiTexturingProperty of the .NIF file's root node,
// if it had a NiTexturingProperty. Used for applying "particle textures" to magic effects.
void overrideFirstRootTexture(const std::string &texture, Resource::ResourceSystem *resourceSystem, osg::ref_ptr<osg::Node> node);
2015-04-19 15:55:56 +00:00
void overrideTexture(const std::string& texture, Resource::ResourceSystem* resourceSystem, osg::ref_ptr<osg::Node> node);
// Node callback to entirely skip the traversal.
class NoTraverseCallback : public osg::NodeCallback
{
public:
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
// no traverse()
}
};
2015-04-19 15:55:56 +00:00
}
#endif