Oolite 1.91.0.7646-241128-10e222e
|
Go to the source code of this file.
Classes | |
struct | OOGLVector |
Macros | |
#define | NULL_SHADER ((GLhandleARB)0) |
#define | OO_GL_STATE_VERIFICATION 1 |
#define | OOSetOpenGLState(STATE) |
#define | OOVerifyOpenGLState() |
#define | OO_CHECK_GL_HEAVY 0 |
#define | OOGL(statement) |
#define | CheckOpenGLErrorsHeavy(...) |
#define | OOGLBEGIN glBegin |
#define | OOGLEND glEnd |
Enumerations | |
enum | OOShaderSetting { SHADERS_NOT_SUPPORTED = 0 , SHADERS_OFF = 1 , SHADERS_SIMPLE = 2 , SHADERS_FULL = 3 } |
enum | OOOpenGLStateID { OPENGL_STATE_OPAQUE , OPENGL_STATE_TRANSLUCENT_PASS , OPENGL_STATE_ADDITIVE_BLENDING , OPENGL_STATE_OVERLAY , OPENGL_STATE_INTERNAL_USE_ONLY } |
enum | { kOOShaderSettingDefault = SHADERS_NOT_SUPPORTED } |
Functions | |
void | OOSetOpenGLState_ (OOOpenGLStateID state, const char *function, unsigned line) |
void | OOVerifyOpenGLState_ (const char *function, unsigned line) |
void | OOResetGLStateVerifier (void) |
BOOL | OOCheckOpenGLErrors (NSString *format,...) |
void | LogOpenGLState (void) |
void | GLScaledLineWidth (GLfloat width) |
void | GLScaledPointSize (GLfloat size) |
GLfloat | GLGetDisplayScaleFactor (void) |
void | GLSetDisplayScaleFactor (GLfloat factor) |
void | OOGLWireframeModeOn (void) |
void | OOGLWireframeModeOff (void) |
void | GLDrawBallBillboard (GLfloat radius, GLfloat step, GLfloat z_distance) |
void | GLDrawOval (GLfloat x, GLfloat y, GLfloat z, NSSize siz, GLfloat step) |
void | GLDrawFilledOval (GLfloat x, GLfloat y, GLfloat z, NSSize siz, GLfloat step) |
void | GLDrawPoints (OOGLVector *points, int n) |
void | GLDrawFilledPoints (OOGLVector *points, int n) |
void | GLDrawQuadStrip (OOGLVector *points, int n) |
OOShaderSetting | OOShaderSettingFromString (NSString *string) |
NSString * | OOStringFromShaderSetting (OOShaderSetting setting) |
NSString * | OODisplayStringFromShaderSetting (OOShaderSetting setting) |
NSString * | OOGLColorToString (GLfloat color[4]) |
NSString * | OOGLEnumToString (GLenum value) |
NSString * | OOGLFlagToString (bool value) |
#define CheckOpenGLErrorsHeavy | ( | ... | ) |
Definition at line 252 of file OOOpenGL.h.
#define NULL_SHADER ((GLhandleARB)0) |
Definition at line 44 of file OOOpenGL.h.
#define OO_CHECK_GL_HEAVY 0 |
Definition at line 230 of file OOOpenGL.h.
#define OO_GL_STATE_VERIFICATION 1 |
Definition at line 51 of file OOOpenGL.h.
#define OOGL | ( | statement | ) |
Definition at line 251 of file OOOpenGL.h.
Referenced by ApplyColor(), HeadUpDisplay(Private)::drawAegis:, HeadUpDisplay::drawHighlight, HeadUpDisplay::drawScannerGrid, GetCurrentOpenGLState(), GetState_DEPTH_WRITEMASK(), GetState_TEXTURE_ENV_MODE(), HeadUpDisplay::GLDrawNonlinearCascadeWeapon, GLDumpCullingState(), GLDumpFogState(), GLDumpLightState(), GLDumpMaterialState(), GLUniformMatrix3(), OODebugBeginWireframe(), OODebugDrawPoint(), OODebugEndWireframe(), HeadUpDisplay::OODrawHilightedPlanetInfo, HeadUpDisplay::OODrawHilightedString, HeadUpDisplay::OODrawPlanetInfo, OOGLWireframeModeOff(), OOGLWireframeModeOn(), HeadUpDisplay::OOStartDrawingStrings, HeadUpDisplay::OOStopDrawingStrings, SetState_CULL_FACE_MODE(), and SwitchOpenGLStateInternal().
#define OOGLBEGIN glBegin |
Definition at line 253 of file OOOpenGL.h.
Referenced by NSString(OODisplayEncoding)::cStringUsingOoliteEncoding, HeadUpDisplay::drawHighlight, HeadUpDisplay::drawScannerGrid, WormholeEntity::DrawWormholeCorona, GLDrawFilledOval(), GLDrawFilledPoints(), GLDrawOval(), GLDrawPoints(), GLDrawQuadStrip(), HeadUpDisplay::hudDrawBarAt, HeadUpDisplay::hudDrawIndicatorAt, HeadUpDisplay::hudDrawMarkerAt, HeadUpDisplay::hudDrawReticleOnTarget, HeadUpDisplay::hudDrawSurroundAt, HeadUpDisplay::hudDrawWaypoint, OODebugDrawBasis(), OODebugDrawColoredBoundingBoxBetween(), OODebugDrawColoredLine(), OODebugDrawPoint(), HeadUpDisplay::OODrawPlanetInfo, and HeadUpDisplay::OOStartDrawingStrings.
#define OOGLEND glEnd |
Definition at line 254 of file OOOpenGL.h.
Referenced by NSString(OODisplayEncoding)::cStringUsingOoliteEncoding, HeadUpDisplay::drawHighlight, HeadUpDisplay::drawScannerGrid, WormholeEntity::DrawWormholeCorona, GLDrawFilledOval(), GLDrawFilledPoints(), GLDrawOval(), GLDrawPoints(), GLDrawQuadStrip(), HeadUpDisplay::hudDrawBarAt, HeadUpDisplay::hudDrawIndicatorAt, HeadUpDisplay::hudDrawMarkerAt, HeadUpDisplay::hudDrawReticleOnTarget, HeadUpDisplay::hudDrawSurroundAt, HeadUpDisplay::hudDrawWaypoint, OODebugDrawBasis(), OODebugDrawColoredBoundingBoxBetween(), OODebugDrawColoredLine(), OODebugDrawPoint(), HeadUpDisplay::OODrawPlanetInfo, and HeadUpDisplay::OOStopDrawingStrings.
#define OOSetOpenGLState | ( | STATE | ) |
Definition at line 135 of file OOOpenGL.h.
Referenced by HeadUpDisplay::drawScannerGrid, HeadUpDisplay::OODrawHilightedPlanetInfo, HeadUpDisplay::OODrawHilightedString, HeadUpDisplay::OODrawPlanetInfo, and HeadUpDisplay::OOStartDrawingStrings.
#define OOVerifyOpenGLState | ( | ) |
Definition at line 136 of file OOOpenGL.h.
Referenced by HeadUpDisplay::drawScannerGrid, HeadUpDisplay::OODrawHilightedPlanetInfo, HeadUpDisplay::OODrawHilightedString, HeadUpDisplay::OODrawPlanetInfo, and HeadUpDisplay::OOStopDrawingStrings.
anonymous enum |
enum OOOpenGLStateID |
Enumerator | |
---|---|
OPENGL_STATE_OPAQUE | |
OPENGL_STATE_TRANSLUCENT_PASS | |
OPENGL_STATE_ADDITIVE_BLENDING | |
OPENGL_STATE_OVERLAY | |
OPENGL_STATE_INTERNAL_USE_ONLY |
Definition at line 121 of file OOOpenGL.h.
enum OOShaderSetting |
Enumerator | |
---|---|
SHADERS_NOT_SUPPORTED | |
SHADERS_OFF | |
SHADERS_SIMPLE | |
SHADERS_FULL |
Definition at line 34 of file OOOpenGL.h.
void GLDrawBallBillboard | ( | GLfloat | radius, |
GLfloat | step, | ||
GLfloat | z_distance ) |
Definition at line 111 of file OOOpenGL.m.
References EXPECT_NOT, M_PI, and OO_ENTER_OPENGL.
void GLDrawFilledOval | ( | GLfloat | x, |
GLfloat | y, | ||
GLfloat | z, | ||
NSSize | siz, | ||
GLfloat | step ) |
Definition at line 165 of file OOOpenGL.m.
References GLDrawOvalPoints(), OO_ENTER_OPENGL, OOGLBEGIN, OOGLEND, x, and y.
void GLDrawFilledPoints | ( | OOGLVector * | points, |
int | n ) |
Definition at line 188 of file OOOpenGL.m.
References OO_ENTER_OPENGL, OOGLBEGIN, OOGLEND, OOGLVector::x, OOGLVector::y, and OOGLVector::z.
void GLDrawOval | ( | GLfloat | x, |
GLfloat | y, | ||
GLfloat | z, | ||
NSSize | siz, | ||
GLfloat | step ) |
Definition at line 155 of file OOOpenGL.m.
References GLDrawOvalPoints(), OO_ENTER_OPENGL, OOGLBEGIN, OOGLEND, x, and y.
Referenced by HeadUpDisplay::drawScannerGrid.
void GLDrawPoints | ( | OOGLVector * | points, |
int | n ) |
Definition at line 174 of file OOOpenGL.m.
References OO_ENTER_OPENGL, OOGLBEGIN, OOGLEND, OOGLVector::x, OOGLVector::y, and OOGLVector::z.
Referenced by HeadUpDisplay::GLDrawNonlinearCascadeWeapon.
void GLDrawQuadStrip | ( | OOGLVector * | points, |
int | n ) |
Definition at line 203 of file OOOpenGL.m.
References OO_ENTER_OPENGL, OOGLBEGIN, OOGLEND, OOGLVector::x, OOGLVector::y, and OOGLVector::z.
Referenced by HeadUpDisplay::GLDrawNonlinearCascadeWeapon.
GLfloat GLGetDisplayScaleFactor | ( | void | ) |
void GLScaledLineWidth | ( | GLfloat | width | ) |
Definition at line 218 of file OOOpenGL.m.
References OO_ENTER_OPENGL, and sDisplayScaleFactor.
Referenced by HeadUpDisplay::drawScannerGrid, OODebugBeginWireframe(), and OOGLWireframeModeOn().
void GLScaledPointSize | ( | GLfloat | size | ) |
Definition at line 225 of file OOOpenGL.m.
References OO_ENTER_OPENGL, and sDisplayScaleFactor.
Referenced by OODebugDrawPoint().
void GLSetDisplayScaleFactor | ( | GLfloat | factor | ) |
Definition at line 238 of file OOOpenGL.m.
References sDisplayScaleFactor.
void LogOpenGLState | ( | void | ) |
Definition at line 256 of file OOOpenGL.m.
References GLDumpCullingState(), GLDumpFogState(), GLDumpLightState(), GLDumpMaterialState(), GLDumpStateFlags(), kOOLogOpenGLStateDump, OO_ENTER_OPENGL, OOCheckOpenGLErrors(), OOLog, OOLogIndent(), OOLogOutdent(), and OOLogWillDisplayMessagesInClass().
Referenced by OOCheckOpenGLErrors().
BOOL OOCheckOpenGLErrors | ( | NSString * | format, |
... ) |
Definition at line 39 of file OOOpenGL.m.
References kOOLogOpenGLError, LogOpenGLState(), nil, OO_ENTER_OPENGL, OOLog, OOLogIndent(), OOLogOutdent(), and OOLogWillDisplayMessagesInClass().
Referenced by Octree(Private)::drawOctreeCollisionFromLocation:loc:scale:, and LogOpenGLState().
NSString * OODisplayStringFromShaderSetting | ( | OOShaderSetting | setting | ) |
Definition at line 467 of file OOConstToString.m.
References DESC, SHADERS_FULL, SHADERS_NOT_SUPPORTED, SHADERS_OFF, and SHADERS_SIMPLE.
NSString * OOGLColorToString | ( | GLfloat | color[4] | ) |
Definition at line 291 of file OOOpenGL.m.
References COLOR_CASE.
Referenced by GLDumpFogState(), GLDumpLightState(), and GLDumpMaterialState().
NSString * OOGLEnumToString | ( | GLenum | value | ) |
Definition at line 492 of file OOOpenGL.m.
References CASE.
Referenced by GLDumpCullingState(), GLDumpFogState(), GLDumpMaterialState(), and VerifyOpenGLStateInternal().
NSString * OOGLFlagToString | ( | bool | value | ) |
Definition at line 563 of file OOOpenGL.m.
Referenced by GLDumpCullingState(), GLDumpFogState(), GLDumpLightState(), and GLDumpMaterialState().
void OOGLWireframeModeOff | ( | void | ) |
Definition at line 103 of file OOOpenGL.m.
References OO_ENTER_OPENGL, and OOGL.
void OOGLWireframeModeOn | ( | void | ) |
Definition at line 87 of file OOOpenGL.m.
References GLScaledLineWidth(), OO_ENTER_OPENGL, and OOGL.
void OOResetGLStateVerifier | ( | void | ) |
Definition at line 462 of file OOOpenGLStateManager.m.
References OPENGL_STATE_INTERNAL_USE_ONLY, and sCurrentStateID.
void OOSetOpenGLState_ | ( | OOOpenGLStateID | state, |
const char * | function, | ||
unsigned | line ) |
Definition at line 253 of file OOOpenGLStateManager.m.
References kStandardStates, OOGLNoteCurrentFunction(), OPENGL_STATE_INTERNAL_USE_ONLY, sCurrentStateID, SetFunctionTracking(), SwitchOpenGLStateInternal(), and VerifyOpenGLStateInternal().
OOShaderSetting OOShaderSettingFromString | ( | NSString * | string | ) |
Definition at line 495 of file OOConstToString.m.
References kOOShaderSettingDefault, REVERSE_CASE, SHADERS_FULL, SHADERS_NOT_SUPPORTED, SHADERS_OFF, and SHADERS_SIMPLE.
NSString * OOStringFromShaderSetting | ( | OOShaderSetting | setting | ) |
Definition at line 481 of file OOConstToString.m.
References CASE, SHADERS_FULL, SHADERS_NOT_SUPPORTED, SHADERS_OFF, and SHADERS_SIMPLE.
void OOVerifyOpenGLState_ | ( | const char * | function, |
unsigned | line ) |
Definition at line 272 of file OOOpenGLStateManager.m.
References OOGLNoteCurrentFunction(), SetFunctionTracking(), and VerifyOpenGLStateInternal().