2019-10-05 10:28:08 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-10-19 20:46:37 +00:00
|
|
|
#include "PalEntry.h"
|
2019-11-05 22:35:38 +00:00
|
|
|
#include "gl_buffers.h"
|
2019-10-05 10:28:08 +00:00
|
|
|
class PolymostShader;
|
|
|
|
|
2019-10-19 20:46:37 +00:00
|
|
|
enum PRSFlags
|
|
|
|
{
|
|
|
|
RF_ColorOnly = 1,
|
|
|
|
RF_UsePalette = 2,
|
|
|
|
RF_DetailMapping = 4,
|
|
|
|
RF_GlowMapping = 8,
|
|
|
|
RF_Brightmapping = 16,
|
|
|
|
RF_NPOTEmulation = 32,
|
|
|
|
RF_ShadeInterpolate = 64,
|
|
|
|
RF_FogDisabled = 128,
|
|
|
|
|
|
|
|
RF_HICTINT_Grayscale = 0x10000,
|
|
|
|
RF_HICTINT_Invert = 0x20000,
|
|
|
|
RF_HICTINT_Colorize = 0x40000,
|
|
|
|
RF_HICTINT_BLEND_Screen = 0x80000,
|
|
|
|
RF_HICTINT_BLEND_Overlay = 0x100000,
|
|
|
|
RF_HICTINT_BLEND_Hardlight = 0x200000,
|
|
|
|
RF_HICTINT_BLENDMASK = RF_HICTINT_BLEND_Screen | RF_HICTINT_BLEND_Overlay | RF_HICTINT_BLEND_Hardlight,
|
|
|
|
};
|
|
|
|
|
2019-10-05 10:28:08 +00:00
|
|
|
struct PolymostRenderState
|
|
|
|
{
|
|
|
|
float Shade;
|
|
|
|
float NumShades = 64.f;
|
2019-10-19 23:14:48 +00:00
|
|
|
float ShadeDiv = 62.f;
|
|
|
|
float VisFactor = 128.f;
|
2019-10-19 20:46:37 +00:00
|
|
|
int Flags = 0;
|
2019-10-05 10:28:08 +00:00
|
|
|
float NPOTEmulationFactor = 1.f;
|
|
|
|
float NPOTEmulationXOffset;
|
|
|
|
float Brightness = 1.f;
|
2019-10-19 20:46:37 +00:00
|
|
|
PalEntry FogColor;
|
2019-11-05 22:35:38 +00:00
|
|
|
|
|
|
|
IVertexBuffer* VertexBuffer = nullptr;
|
|
|
|
int VB_Offset[2] = {};
|
|
|
|
IIndexBuffer* IndexBuffer = nullptr;
|
2019-10-05 10:28:08 +00:00
|
|
|
|
|
|
|
void Apply(PolymostShader *shader);
|
|
|
|
};
|