qzdoom/src/gl/system/gl_interface.h

55 lines
854 B
C
Raw Normal View History

#ifndef R_RENDER
#define R_RENDER
#include "basictypes.h"
enum RenderFlags
{
// [BB] Added texture compression flags.
RFL_TEXTURE_COMPRESSION=1,
RFL_TEXTURE_COMPRESSION_S3TC=2,
RFL_FRAMEBUFFER = 4,
RFL_BUFFER_STORAGE = 8,
RFL_SHADER_STORAGE_BUFFER = 16,
};
enum TexMode
{
TMF_MASKBIT = 1,
TMF_OPAQUEBIT = 2,
TMF_INVERTBIT = 4,
TM_MODULATE = 0,
TM_MASK = TMF_MASKBIT,
TM_OPAQUE = TMF_OPAQUEBIT,
TM_INVERT = TMF_INVERTBIT,
//TM_INVERTMASK = TMF_MASKBIT | TMF_INVERTBIT
TM_INVERTOPAQUE = TMF_INVERTBIT | TMF_OPAQUEBIT,
};
struct RenderContext
{
unsigned int flags;
unsigned int maxuniforms;
float version;
float glslversion;
int max_texturesize;
char * vendorstring;
int MaxLights() const
{
return maxuniforms>=2048? 128:64;
}
bool hasGLSL() const
{
return glslversion >= 1.3f;
}
};
extern RenderContext gl;
#endif