1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/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-03 01:18:36 +02:00
#include <osgFX/Technique>
#include <osgFX/Effect>
2015-06-03 01:18:36 +02:00
#include "defs.hpp"
namespace osg
{
class Texture2D;
}
namespace Terrain
{
2015-06-03 01:18:36 +02:00
class FixedFunctionTechnique : public osgFX::Technique
{
public:
2015-06-03 01:18:36 +02: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-03 01:18:36 +02:00
protected:
virtual void define_passes() {}
};
2013-08-20 09:52:27 +02:00
2015-06-03 01:18:36 +02: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-03 01:18:36 +02:00
virtual bool define_techniques();
2015-06-03 01:18:36 +02: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-03 01:18:36 +02:00
std::vector<osg::ref_ptr<osg::Texture2D> > mLayers;
std::vector<osg::ref_ptr<osg::Texture2D> > mBlendmaps;
int mBlendmapScale;
float mLayerTileSize;
};
}
#endif