#ifndef __GL_VALUES
#define __GL_VALUES

#include "doomtype.h"

enum GLDrawItemType
{
	GLDIT_WALL,
	GLDIT_FLAT,
	GLDIT_SPRITE,
	GLDIT_POLY,
};

enum DrawListType
{
	GLDL_TRANSLUCENT,
	GLDL_UNLIT,
	GLDL_LIT,
	GLDL_LITFOG,
	GLDL_MASKED,
	GLDL_SKY,
	GLDL_TRANSLUCENTBORDER,


	GLDL_TYPES
};

enum Drawpasses
{
	GLPASS_UNLIT,		// Draws a texture that isn't affected by dynamic lights with sector light settings
	GLPASS_DEPTH,		// Draws depth buffer information only
	GLPASS_BASE,		// Draws the untextured surface only
	GLPASS_LIGHT,		// Draws dynamic lights
	GLPASS_TEXTURE,		// Draws the texture to be modulated with the light information on the base surface
	GLPASS_FOG,			// Draws a fog layer
	GLPASS_DECALS,		// Draws a decal
	GLPASS_TRANSLUCENT,	// Draws translucent objects
};

enum WallTypes
{
	RENDERWALL_NONE,
	RENDERWALL_TOP,
	RENDERWALL_M1S,
	RENDERWALL_M2S,
	RENDERWALL_BOTTOM,
	RENDERWALL_SKY,
	RENDERWALL_DECAL,
	RENDERWALL_FOGSHEET,
	RENDERWALL_HORIZON,
	RENDERWALL_SKYBOX,
	RENDERWALL_SECTORSTACK,
	RENDERWALL_PLANEMIRROR,
	RENDERWALL_MIRROR,
	RENDERWALL_MIRRORSURFACE,
	RENDERWALL_M2SNF,
	RENDERWALL_COLOR,
	RENDERWALL_FFBLOCK,
	// Insert new types at the end!
};


enum SectorRenderFlags
{
	// This is used to avoid creating too many drawinfos
	SSRF_RENDERFLOOR=1,
	SSRF_RENDERCEILING=2,
	SSRF_RENDER3DPLANES=4,
	SSRF_RENDERALL=7,
	SSRF_PROCESSED=8,
};

enum EColorManipulation
{
	CM_INVALID=-1,
	CM_DEFAULT=0,					// untranslated
	CM_DESAT0=CM_DEFAULT,
	CM_DESAT1,					// minimum desaturation
	CM_DESAT31=CM_DESAT1+30,	// maximum desaturation = grayscale
	CM_INVERT,					// Doom's invulnerability colormap
	CM_GOLDMAP,					// Heretic's invulnerability colormap
	CM_SHADE,					// alpha channel texture
	CM_LIMIT,					// Max. manipulation value for regular textures. Everything above is for special use.
	CM_FIRSTCOLORMAP=CM_LIMIT,	// Boom colormaps

	CM_LITE=246,				// special values to handle these items without excessive hacking
	CM_TORCH=247,				// These are not real color manipulations
};

#define TO_MAP(v) ((float)(v)/FRACUNIT)
#define FROM_MAP(f) (fixed_t)quickertoint((f)*FRACUNIT)
#define ANGLE_TO_FLOAT(ang) ((float)((ang) * 180.0f / ANGLE_180))
#define FLOAT_TO_ANGLE(ang) (angle_t)((ang) / 180.f * ANGLE_180)


#endif