102#ifndef GL_VERSION_1_1
144 switch (
ctx->Fog.Mode) {
146 d = 1.0F / (
ctx->Fog.End -
ctx->Fog.Start);
156 d = -
ctx->Fog.Density;
166 d = -(
ctx->Fog.Density*
ctx->Fog.Density);
194 switch (
ctx->Fog.Mode) {
261 GLfloat fog_green =
ctx->Fog.Color[1] *
ctx->Visual->GreenScale;
262 GLfloat fog_blue =
ctx->Fog.Color[2] *
ctx->Visual->BlueScale;
267 switch (
ctx->Fog.Mode) {
276 if (eyez < 0.0) eyez = -eyez;
277 f = (fogEnd - eyez) * fogScale;
291 if (eyez < 0.0) eyez = -eyez;
292 f =
exp( -
ctx->Fog.Density * eyez );
302 GLfloat negDensitySquared = -
ctx->Fog.Density *
ctx->Fog.Density;
307 if (eyez < 0.0) eyez = -eyez;
308 f =
exp( negDensitySquared * eyez*eyez );
343 switch (
ctx->Fog.Mode) {
352 if (eyez < 0.0) eyez = -eyez;
353 f = (fogEnd - eyez) * fogScale;
364 if (eyez < 0.0) eyez = -eyez;
365 f =
exp( -
ctx->Fog.Density * eyez );
372 GLfloat negDensitySquared = -
ctx->Fog.Density *
ctx->Fog.Density;
377 if (eyez < 0.0) eyez = -eyez;
378 f =
exp( negDensitySquared * eyez*eyez );
void gl_problem(const GLcontext *ctx, const char *s)
void gl_error(GLcontext *ctx, GLenum error, const char *s)
void gl_fog_color_pixels(GLcontext *ctx, GLuint n, const GLdepth z[], GLubyte red[], GLubyte green[], GLubyte blue[], GLubyte alpha[])
void gl_fog_index_vertices(GLcontext *ctx, GLuint n, GLfloat v[][4], GLuint indx[])
void gl_fog_index_pixels(GLcontext *ctx, GLuint n, const GLdepth z[], GLuint index[])
void gl_Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params)
void gl_fog_color_vertices(GLcontext *ctx, GLuint n, GLfloat v[][4], GLubyte color[][4])
GLclampf GLclampf GLclampf alpha
GLenum const GLfloat * params
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define CLAMP(f, min, max)