ReactOS 0.4.15-dev-7958-gcd0bb1a
error.c File Reference
#include "gluos.h"
#include "gluint.h"
#include <stddef.h>
#include <GL/glu.h>
Include dependency graph for error.c:

Go to the source code of this file.

Classes

struct  token_string
 

Functions

const GLubyte *GLAPIENTRY gluErrorString (GLenum errorCode)
 

Variables

static const struct token_string Errors []
 

Function Documentation

◆ gluErrorString()

const GLubyte *GLAPIENTRY gluErrorString ( GLenum  errorCode)

Definition at line 67 of file error.c.

68{
69 int i;
70 for (i = 0; Errors[i].String; i++) {
71 if (Errors[i].Token == errorCode)
72 return (const GLubyte *) Errors[i].String;
73 }
74 if ((errorCode >= GLU_NURBS_ERROR1) && (errorCode <= GLU_NURBS_ERROR37)) {
75 return (const GLubyte *) __gluNURBSErrorString(errorCode - (GLU_NURBS_ERROR1 - 1));
76 }
77 if ((errorCode >= GLU_TESS_ERROR1) && (errorCode <= GLU_TESS_ERROR6)) {
78 return (const GLubyte *) __gluTessErrorString(errorCode - (GLU_TESS_ERROR1 - 1));
79 }
80 return (const GLubyte *) 0;
81}
#define GLU_NURBS_ERROR37
Definition: glu.h:164
#define GLU_TESS_ERROR1
Definition: glu.h:244
#define GLU_NURBS_ERROR1
Definition: glu.h:128
#define GLU_TESS_ERROR6
Definition: glu.h:249
static const struct token_string Errors[]
Definition: error.c:43
unsigned char GLubyte
Definition: gl.h:157
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
Definition: glfuncs.h:248
const unsigned char * __gluTessErrorString(int errnum)
Definition: glue.c:90
const unsigned char * __gluNURBSErrorString(int errnum)
Definition: glue.c:75

Variable Documentation

◆ Errors

const struct token_string Errors[]
static
Initial value:
= {
{ GL_NO_ERROR, "no error" },
{ GL_INVALID_ENUM, "invalid enumerant" },
{ GL_INVALID_VALUE, "invalid value" },
{ GL_INVALID_OPERATION, "invalid operation" },
{ GL_STACK_OVERFLOW, "stack overflow" },
{ GL_STACK_UNDERFLOW, "stack underflow" },
{ GL_OUT_OF_MEMORY, "out of memory" },
{ GL_TABLE_TOO_LARGE, "table too large" },
{ GLU_INVALID_ENUM, "invalid enumerant" },
{ GLU_INVALID_VALUE, "invalid value" },
{ GLU_OUT_OF_MEMORY, "out of memory" },
{ GLU_INCOMPATIBLE_GL_VERSION, "incompatible gl version" },
{ GLU_INVALID_OPERATION, "invalid operation" },
{ ~0, NULL }
}
#define NULL
Definition: types.h:112
#define GLU_INVALID_ENUM
Definition: glu.h:88
#define GLU_INCOMPATIBLE_GL_VERSION
Definition: glu.h:91
#define GLU_INVALID_OPERATION
Definition: glu.h:92
#define GLU_OUT_OF_MEMORY
Definition: glu.h:90
#define GLU_INVALID_VALUE
Definition: glu.h:89
#define GL_INVALID_VALUE
Definition: gl.h:695
#define GL_INVALID_OPERATION
Definition: gl.h:696
#define GL_STACK_OVERFLOW
Definition: gl.h:697
#define GL_NO_ERROR
Definition: gl.h:693
#define GL_TABLE_TOO_LARGE
Definition: gl.h:1622
#define GL_OUT_OF_MEMORY
Definition: gl.h:699
#define GL_INVALID_ENUM
Definition: gl.h:694
#define GL_STACK_UNDERFLOW
Definition: gl.h:698

Definition at line 43 of file error.c.

Referenced by BackgroundCopyJob_GetErrorCount(), and gluErrorString().