1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 11:49:56 +00:00
openmw-tes3mp/components/terrain/material.hpp

60 lines
1.4 KiB
C++
Raw Normal View History

#ifndef COMPONENTS_TERRAIN_MATERIAL_H
#define COMPONENTS_TERRAIN_MATERIAL_H
2015-06-02 23:18:36 +00:00
#include <osgFX/Technique>
#include <osgFX/Effect>
2015-06-02 23:18:36 +00:00
#include "defs.hpp"
namespace osg
{
class Texture2D;
}
namespace Terrain
{
2015-06-02 23:18:36 +00:00
class FixedFunctionTechnique : public osgFX::Technique
{
public:
2015-06-02 23:18:36 +00:00
FixedFunctionTechnique(
const std::vector<osg::ref_ptr<osg::Texture2D> >& layers,
const std::vector<osg::ref_ptr<osg::Texture2D> >& blendmaps, int blendmapScale, float layerTileSize);
2015-06-02 23:18:36 +00:00
protected:
virtual void define_passes() {}
};
2013-08-20 07:52:27 +00:00
2015-06-02 23:18:36 +00:00
class Effect : public osgFX::Effect
{
public:
Effect(
const std::vector<osg::ref_ptr<osg::Texture2D> >& layers,
const std::vector<osg::ref_ptr<osg::Texture2D> >& blendmaps, int blendmapScale, float layerTileSize);
2015-06-02 23:18:36 +00:00
virtual bool define_techniques();
2015-06-02 23:18:36 +00:00
virtual const char *effectName() const
{
return NULL;
}
virtual const char *effectDescription() const
{
return NULL;
}
virtual const char *effectAuthor() const
{
return NULL;
}
private:
2015-06-02 23:18:36 +00:00
std::vector<osg::ref_ptr<osg::Texture2D> > mLayers;
std::vector<osg::ref_ptr<osg::Texture2D> > mBlendmaps;
int mBlendmapScale;
float mLayerTileSize;
};
}
#endif