|
Oolite
|
import "OOOpenGL.h"import "OOLogging.h"import "OOMaths.h"import "OOMacroOpenGL.h"import "OOFunctionAttributes.h"import "OOOpenGLExtensionManager.h"
Include dependency graph for OOOpenGL.m:Go to the source code of this file.
Macros | |
| #define | COLOR_EQUAL(color, r, g, b, a) (color[0] == (r) && color[1] == (g) && color[2] == (b) && color[3] == (a)) |
| #define | COLOR_CASE(r, g, b, a, str) do { if (COLOR_EQUAL(color, (r), (g), (b), (a))) return (str); } while (0) |
| #define | DUMP_STATE_FLAG(x) OOLog(kOOLogOpenGLStateDump, @ #x ": %@", OOGLFlagToString(glIsEnabled(x))) |
| #define | DUMP_GET_FLAG(x) do { GLboolean flag; glGetBooleanv(x, &flag); OOLog(kOOLogOpenGLStateDump, @ #x ": %@", OOGLFlagToString(flag)); } while (0) |
| #define | CASE(x) case x: return @#x |
Functions | |
| BOOL | OOCheckOpenGLErrors (NSString *format,...) |
| void | OOGLWireframeModeOn (void) |
| void | OOGLWireframeModeOff (void) |
| void | GLDrawBallBillboard (GLfloat radius, GLfloat step, GLfloat z_distance) |
| static void | GLDrawOvalPoints (GLfloat x, GLfloat y, GLfloat z, NSSize siz, GLfloat step) |
| 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) |
| void | GLScaledLineWidth (GLfloat width) |
| void | GLScaledPointSize (GLfloat size) |
| GLfloat | GLGetDisplayScaleFactor (void) |
| void | GLSetDisplayScaleFactor (GLfloat factor) |
| static void | GLDumpLightState (unsigned lightIdx) |
| static void | GLDumpMaterialState (void) |
| static void | GLDumpCullingState (void) |
| static void | GLDumpFogState (void) |
| static void | GLDumpStateFlags (void) |
| void | LogOpenGLState (void) |
| NSString * | OOGLColorToString (GLfloat color[4]) |
| NSString * | OOGLEnumToString (GLenum value) |
| NSString * | OOGLFlagToString (bool value) |
Variables | |
| static NSString *const | kOOLogOpenGLStateDump = @"rendering.opengl.stateDump" |
| static GLfloat | sDisplayScaleFactor = 1.0f |
Definition at line 490 of file OOOpenGL.m.
| #define COLOR_CASE | ( | r, | |
| g, | |||
| b, | |||
| a, | |||
| str | |||
| ) | do { if (COLOR_EQUAL(color, (r), (g), (b), (a))) return (str); } while (0) |
| #define COLOR_EQUAL | ( | color, | |
| r, | |||
| g, | |||
| b, | |||
| a | |||
| ) | (color[0] == (r) && color[1] == (g) && color[2] == (b) && color[3] == (a)) |
| #define DUMP_GET_FLAG | ( | x | ) | do { GLboolean flag; glGetBooleanv(x, &flag); OOLog(kOOLogOpenGLStateDump, @ #x ": %@", OOGLFlagToString(flag)); } while (0) |
| #define DUMP_STATE_FLAG | ( | x | ) | OOLog(kOOLogOpenGLStateDump, @ #x ": %@", OOGLFlagToString(glIsEnabled(x))) |
| 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.
Here is the call graph for this function:| 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.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 136 of file OOOpenGL.m.
References M_PI, OO_ENTER_OPENGL, x, and y.
Referenced by GLDrawFilledOval(), and GLDrawOval().
Here is the caller graph for this function:| 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.
Here is the caller graph for this function:| 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.
Here is the caller graph for this function:
|
static |
Definition at line 403 of file OOOpenGL.m.
References kOOLogOpenGLStateDump, OO_ENTER_OPENGL, OOGL, OOGLEnumToString(), OOGLFlagToString(), OOLog, OOLogIndent(), and OOLogOutdent().
Referenced by LogOpenGLState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 427 of file OOOpenGL.m.
References kOOLogOpenGLStateDump, OO_ENTER_OPENGL, OOGL, OOGLColorToString(), OOGLEnumToString(), OOGLFlagToString(), OOLog, OOLogIndent(), and OOLogOutdent().
Referenced by LogOpenGLState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 310 of file OOOpenGL.m.
References kOOLogOpenGLStateDump, OO_ENTER_OPENGL, OOGL, OOGLColorToString(), OOGLFlagToString(), OOLog, OOLogIndent(), and OOLogOutdent().
Referenced by LogOpenGLState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 337 of file OOOpenGL.m.
References kOOLogOpenGLStateDump, OO_ENTER_OPENGL, OOGL, OOGLColorToString(), OOGLEnumToString(), OOGLFlagToString(), OOLog, OOLogIndent(), and OOLogOutdent().
Referenced by LogOpenGLState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 466 of file OOOpenGL.m.
References DUMP_GET_FLAG, DUMP_STATE_FLAG, kOOLogOpenGLStateDump, OO_ENTER_OPENGL, OOLog, OOLogIndent(), and OOLogOutdent().
Referenced by LogOpenGLState().
Here is the call graph for this function:
Here is the caller graph for this function:| 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().
Here is the caller graph for this function:| void GLScaledPointSize | ( | GLfloat | size | ) |
Definition at line 225 of file OOOpenGL.m.
References OO_ENTER_OPENGL, and sDisplayScaleFactor.
Referenced by OODebugDrawPoint().
Here is the caller graph for this function:| 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().
Here is the call graph for this function:
Here is the caller graph for this function:| 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().
Here is the call graph for this function:
Here is the caller graph for this function:| NSString * OOGLColorToString | ( | GLfloat | color[4] | ) |
Definition at line 291 of file OOOpenGL.m.
References COLOR_CASE.
Referenced by GLDumpFogState(), GLDumpLightState(), and GLDumpMaterialState().
Here is the caller graph for this function:| NSString * OOGLEnumToString | ( | GLenum | value | ) |
Definition at line 492 of file OOOpenGL.m.
References CASE.
Referenced by GLDumpCullingState(), GLDumpFogState(), GLDumpMaterialState(), and VerifyOpenGLStateInternal().
Here is the caller graph for this function:| NSString * OOGLFlagToString | ( | bool | value | ) |
Definition at line 563 of file OOOpenGL.m.
Referenced by GLDumpCullingState(), GLDumpFogState(), GLDumpLightState(), and GLDumpMaterialState().
Here is the caller graph for this function:| 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.
Here is the call graph for this function:
|
static |
Definition at line 33 of file OOOpenGL.m.
Referenced by GLDumpCullingState(), GLDumpFogState(), GLDumpLightState(), GLDumpMaterialState(), GLDumpStateFlags(), and LogOpenGLState().
|
static |
Definition at line 36 of file OOOpenGL.m.
Referenced by GLGetDisplayScaleFactor(), GLScaledLineWidth(), GLScaledPointSize(), and GLSetDisplayScaleFactor().