#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import "CC3OpenGLES11Intercept.h"
Defines | |
#define | GL_ERROR_LOGGING_ENABLED 0 |
#define | GL_ERROR_TRACING_ENABLED 0 |
Functions | |
void | DoLogGLErrorState (NSString *fmt,...) |
NSString * | GetGLErrorText (GLenum errCode) |
NSString * | NSStringFromGLEnum (GLenum gle) |
#define GL_ERROR_LOGGING_ENABLED 0 |
LogGLErrorState logs an ERROR level description of any glError that has occurred since it was last called.
Like all logging macros, LogGLErrorState takes a format string and a variable length list of arguments. The GL error code and description is also added to the logged information.
Use the LogGLErrorState() macro and the GL_ERROR_LOGGING_ENABLED compiler switch to turn checking and logging of GL error state. Be sure to set the compiler switch GL_ERROR_LOGGING_ENABLED to zero when compiling for production code release, to avoid the overhead of making the GL error state call. This is important to maximize the GL state machine performance.
If the compiler switch GL_ERROR_ASSERTION_ENABLED is set to anything other than zero, an assertion error will also be raised to halt execution at the point where the GL error occurred, otherwise, the error will be logged and execution will continue.
#define GL_ERROR_TRACING_ENABLED 0 |
LogGLErrorTrace logs an ERROR level description of any glError that has occurred since it was last called.
LogGLErrorTrace is distinct from LogGLErrorState in that it is called during every GL call, whereas LogGLErrorState is invoked only once per rendering loop. This permits dual-level detection of GL errors, that can be configured as follows:
The GL_ERROR_TRACING_ENABLED compiler build switch requires that the GL_ERROR_LOGGING_ENABLED compiler build switch is also set.
Like all logging macros, LogGLErrorTrace takes a format string and a variable length list of arguments. The GL error code and description is also added to the logged information.
Use the LogGLErrorTrace() macro and the GL_ERROR_TRACING_ENABLED compile switch to turn checking and logging of GL error tracing. Be sure to set the compiler switch GL_ERROR_TRACING_ENABLED to zero when compiling for production code release, to avoid the overhead of making the GL error state call. This is important to maximize the GL state machine throughput.
If the compiler switch GL_ERROR_ASSERTION_ENABLED is set to anything other than zero, an assertion error will also be raised to halt execution at the point where the GL error occurred, otherwise, the error will be logged and execution will continue.
void DoLogGLErrorState | ( | NSString * | fmt, |
... | |||
) |
The implementation of the LogGLErrorState and LogGLErrorTrace compiler macros.
See the API documentation for those macros for more information on logging and tracing GL errors.
NSString* GetGLErrorText | ( | GLenum | errCode ) |
Returns a text description of the specified GL error code.
NSString* NSStringFromGLEnum | ( | GLenum | gle ) |
Returns a string containing the name of the specified GL enumeration code.