00001 #ifndef __RE_OGLErrorChecker__
00002 #define __RE_OGLErrorChecker__
00003
00004 #include "RE_API.h"
00005 #include <UT/UT_Defines.h>
00006
00007 class RE_OGLRender;
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef RE_CHECK_STATE
00023 #ifdef UT_DEBUG
00024 # define RE_CHECK_STATE 4
00025 #else
00026 # define RE_CHECK_STATE 0
00027 #endif // UT_DEBUG
00028 #endif // RE_CHECK_STATE
00029
00030
00031 #if (RE_CHECK_STATE >= 1)
00032 #define RE_CheckForErrorsOnSwap() REcheckForErrorsOnSwap()
00033 #define RE_CheckValidContext() REcheckValidContext()
00034 #define RE_CheckNoErrors(string) REcheckNoErrors(string)
00035 #define RE_CheckInBegin( ) REcheckInBegin()
00036 #define RE_CheckNotInBegin( ) REcheckNotInBegin()
00037 #define RE_CheckInBeginWithoutContext() \
00038 REcheckInBeginWithoutContext()
00039 #define RE_CheckNotInBeginWithoutContext() \
00040 REcheckNotInBeginWithoutContext()
00041 #define RE_Begin() REbegin()
00042 #define RE_End() REend()
00043
00044 #define RE_SetLockedContext(render) REsetLockedContext(render)
00045 #else
00046 #define RE_CheckForErrorsOnSwap()
00047 #define RE_CheckValidContext()
00048 #define RE_CheckNoErrors(string)
00049 #define RE_CheckInBegin( )
00050 #define RE_CheckNotInBegin( )
00051 #define RE_CheckInBeginWithoutContext( )
00052 #define RE_CheckNotInBeginWithoutContext( )
00053 #define RE_Begin()
00054 #define RE_End()
00055 #define RE_SetLockedContext(render)
00056 #endif
00057
00058
00059 RE_API extern void REcheckForErrorsOnSwap();
00060 RE_API extern void REcheckValidContext();
00061 RE_API extern void REcheckNoErrors(const char *str);
00062 RE_API extern void REcheckInBegin();
00063 RE_API extern void REcheckNotInBegin();
00064 RE_API extern void REcheckInBeginWithoutContext();
00065 RE_API extern void REcheckNotInBeginWithoutContext();
00066 RE_API extern void REbegin();
00067 RE_API extern void REend();
00068 RE_API extern void REsetLockedContext(const RE_OGLRender * render);
00069
00070 #endif