1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 08:24:05 +00:00
GLideN64/src/Graphics/CombinerProgram.h
Sergey Lipskiy 5604bb94fa Code refactor: CombinerProgram()::getKey() returns reference instead of object
to avoid copy of the key to temp object when combiner added to combiners map.
2017-12-15 12:38:10 +07:00

30 lines
672 B
C++

#pragma once
#include <map>
#include <vector>
#include "CombinerKey.h"
namespace graphics {
class CombinerProgram
{
public:
virtual ~CombinerProgram() {}
virtual void activate() = 0;
virtual void update(bool _force) = 0;
virtual const CombinerKey & getKey() const = 0;
virtual bool usesTexture() const = 0;
virtual bool usesTile(u32 _t) const = 0;
virtual bool usesShade() const = 0;
virtual bool usesLOD() const = 0;
virtual bool usesHwLighting() const = 0;
virtual bool getBinaryForm(std::vector<char> & _buffer) = 0;
static u32 getShaderCombinerOptionsBits();
};
typedef std::map<CombinerKey, graphics::CombinerProgram *> Combiners;
}