1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 12:39:55 +00:00

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.0 KiB
C++
Raw Normal View History

2015-04-19 17:55:56 +02:00
#ifndef OPENMW_MWRENDER_UTIL_H
#define OPENMW_MWRENDER_UTIL_H
#include <osg/NodeCallback>
2015-04-19 17:55:56 +02:00
#include <osg/ref_ptr>
#include <string>
namespace osg
{
class Node;
}
namespace Resource
{
class ResourceSystem;
}
namespace MWRender
{
2016-09-14 23:18:29 +09: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.
2022-08-23 18:25:25 +02:00
void overrideFirstRootTexture(
std::string_view texture, Resource::ResourceSystem* resourceSystem, osg::ref_ptr<osg::Node> node);
2022-08-23 18:25:25 +02:00
void overrideTexture(
std::string_view texture, Resource::ResourceSystem* resourceSystem, osg::ref_ptr<osg::Node> node);
2015-04-19 17:55:56 +02:00
// Node callback to entirely skip the traversal.
class NoTraverseCallback : public osg::NodeCallback
{
public:
void operator()(osg::Node* node, osg::NodeVisitor* nv) override
{
// no traverse()
}
};
2015-04-19 17:55:56 +02:00
}
#endif