2020-01-07 00:11:19 +00:00
|
|
|
#pragma once
|
2019-10-05 10:28:08 +00:00
|
|
|
|
|
|
|
#include "gl_uniform.h"
|
|
|
|
|
|
|
|
class FShader
|
|
|
|
{
|
|
|
|
friend class FShaderManager;
|
|
|
|
friend class FRenderState;
|
|
|
|
|
|
|
|
unsigned int hVertProg = 0;
|
|
|
|
unsigned int hFragProg = 0;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
unsigned int hShader = 0;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
FShader() = default;
|
|
|
|
virtual ~FShader();
|
|
|
|
|
|
|
|
virtual bool Load(const char * name, const char * vert_prog_lump, const char * fragprog); //, const char * fragprog2, const char *defines);
|
|
|
|
bool Bind();
|
|
|
|
unsigned int GetHandle() const { return hShader; }
|
|
|
|
};
|
|
|
|
|
|
|
|
class PolymostShader : public FShader
|
|
|
|
{
|
|
|
|
public:
|
2019-10-19 20:46:37 +00:00
|
|
|
FBufferedUniform1i Flags;
|
2019-10-05 10:28:08 +00:00
|
|
|
FBufferedUniform1f NPOTEmulationFactor;
|
|
|
|
FBufferedUniform1f NPOTEmulationXOffset;
|
|
|
|
FBufferedUniform1f Brightness;
|
2019-10-19 20:46:37 +00:00
|
|
|
FBufferedUniformPalEntry FogColor;
|
2019-10-06 10:42:35 +00:00
|
|
|
|
2020-06-05 22:44:57 +00:00
|
|
|
FBufferedUniform4f DetailParms;
|
|
|
|
FBufferedUniform1f AlphaThreshold;
|
|
|
|
FBufferedUniform1i muFogEnabled;
|
|
|
|
FBufferedUniform4f muLightParms;
|
2019-10-06 08:19:51 +00:00
|
|
|
FUniformMatrix4f ModelMatrix;
|
2019-10-10 17:40:33 +00:00
|
|
|
FUniformMatrix4f TextureMatrix;
|
2020-06-05 15:02:21 +00:00
|
|
|
FBufferedUniform4f muTextureBlendColor;
|
|
|
|
FBufferedUniform4f muTextureModulateColor;
|
|
|
|
FBufferedUniform4f muTextureAddColor;
|
2019-10-10 17:40:33 +00:00
|
|
|
|
2019-10-05 10:28:08 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
PolymostShader() = default;
|
|
|
|
virtual bool Load(const char * name, const char * vert_prog_lump, const char * fragprog); //, const char * fragprog2, const char *defines);
|
|
|
|
};
|
2019-10-05 11:09:15 +00:00
|
|
|
|