CUGL  2.0
Enumerations | Functions
Error messages

Enumerations

enum  cugl::CUGLErrorType {
  cugl::NO_ERROR = 0, cugl::BAD_INDEX, cugl::BAD_MATRIX_MODE, cugl::BAD_ROTATION_MATRIX,
  cugl::SINGULAR_MATRIX, cugl::ZERO_DIVISOR, cugl::ZERO_NORM, cugl::BAD_INTERPOLATOR_ARG,
  cugl::OPEN_FAILED, cugl::NOT_BMP_FILE, cugl::NOT_24_BITS, cugl::COMPRESSED_BMP_FILE,
  cugl::NOT_ENOUGH_MEMORY, cugl::NO_PIX_MAP, cugl::BAD_PLANE, cugl::BAD_LINE,
  cugl::TOO_MANY_MATERIALS, cugl::TOO_MANY_POINTS
}
 

Functions

CUGLErrorType cugl::getError ()
 
const char * cugl::getErrorString (CUGLErrorType err)
 
void cugl::checkCUGLStatus ()
 
void cugl::checkOpenGLStatus ()
 

Detailed Description

Enumeration Type Documentation

Enumeration values for CUGL function errors.

Enumerator:
NO_ERROR 

No error has occurred since the error flag was reset.

BAD_INDEX 

Encountered an invalid array index.

BAD_MATRIX_MODE 

The matrix mode was not GL_PROJECTION or GL_MODELVIEW.

BAD_ROTATION_MATRIX 

The given matrix was not a rotation matrix.

SINGULAR_MATRIX 

The matrix is singular.

ZERO_DIVISOR 

An attempt was made to divide by zero.

ZERO_NORM 

An attempt was made to normalize a null vector.

BAD_INTERPOLATOR_ARG 

The angle between the rotations of the interpolator is zero.

OPEN_FAILED 

The program failed to open a BMP file.

NOT_BMP_FILE 

The file opened was not a BMP file.

NOT_24_BITS 

The BMP file was not in 24-bit format.

COMPRESSED_BMP_FILE 

The BMP file was in compressed form.

NOT_ENOUGH_MEMORY 

There is not enough memory to store the pixel map.

NO_PIX_MAP 

There is no pixel map to draw.

BAD_PLANE 

Parameters do not define a plane.

BAD_LINE 

The line lies in the plane.

TOO_MANY_MATERIALS 

Too many materials.

TOO_MANY_POINTS 

Too many points.

Definition at line 69 of file cugl.h.

Function Documentation

void cugl::checkCUGLStatus ( )

Display a message if an CUGL error has occurred. This function checks the CUGL error status. If no error has occurred, it has no effect. If CUGL has reported an error, this function writes the CUGL error code and the corresponding message to the stream cerr.

Since getError() clears the CUGL error flag, after calling this function CUGL shows no errors.

This function is intended mainly for development and should not normally be included in a production program.

void cugl::checkOpenGLStatus ( )

Display a message if an OpenGL error has occurred. This function checks the OpenGL error status. If no error has occurred, it has no effect. If OpenGL has reported an error, this function writes the OpenGL error code and the corresponding message to the stream cerr.

Since glGetError() clears the OpenGL error flag, after calling this function OpenGL shows no errors.

This function is intended mainly for development and should not normally be included in a production program.

CUGLErrorType cugl::getError ( )

Set code to NO_ERROR and return last error code.

Returns
the most recent error code.
const char* cugl::getErrorString ( CUGLErrorType  err)

Map error codes to descriptive strings.

Parameters
erris an error code obtained from getError().
Returns
A string describing the eeror.