36@interface OOCrosshairs (Private)
38- (void)setUpDataWithPoints:(NSArray*)points
41 overallAlpha:(GLfloat)alpha;
43- (void)setUpDataForOnePoint:(NSArray*)pointInfo
45 colorComps:(
float[4])colorComps
46 overallAlpha:(GLfloat)alpha
47 data:(GLfloat*)ioBuffer;
53- (id)initWithPoints:(NSArray*)points
56 overallAlpha:(GLfloat)alpha
58 if ((
self = [super init])) {
59 if (alpha > 0.0f && (color ==
nil || [color alphaComponent] != 0.0f)) {
80 OOGL(glPushAttrib(GL_ENABLE_BIT));
81 OOGL(glDisable(GL_LIGHTING));
82 OOGL(glDisable(GL_TEXTURE_2D));
86 OOGL(glVertexPointer(2, GL_FLOAT,
sizeof(GLfloat) * 6,
_data));
87 OOGL(glColorPointer(4, GL_FLOAT,
sizeof(GLfloat) * 6,
_data + 2));
89 OOGL(glEnableClientState(GL_VERTEX_ARRAY));
90 OOGL(glEnableClientState(GL_COLOR_ARRAY));
94 OOGL(glDisableClientState(GL_VERTEX_ARRAY));
95 OOGL(glDisableClientState(GL_COLOR_ARRAY));
105- (void)setUpDataWithPoints:(NSArray*)points
108 overallAlpha:(GLfloat)alpha
111 float colorComps[4] = { 0.0f, 1.0f, 0.0f, 1.0f };
112 GLfloat* data = NULL;
118 _data = malloc(
sizeof(GLfloat) * 12 * _count);
123 for (i = 0; i < _count; i++) {
133- (void)setUpDataForOnePoint:(NSArray*)pointInfo
135 colorComps:(
float[4])colorComps
136 overallAlpha:(GLfloat)alpha
137 data:(GLfloat*)ioBuffer
139 GLfloat x1, y1, a1, x2, y2, a2;
142 if ([pointInfo
count] >= 6) {
144 x1 = [
pointInfo oo_floatAtIndex:1] * scale;
145 y1 = [
pointInfo oo_floatAtIndex:2] * scale;
147 x2 = [
pointInfo oo_floatAtIndex:4] * scale;
148 y2 = [
pointInfo oo_floatAtIndex:5] * scale;
OOINLINE float OOClamp_0_1_f(float value) INLINE_CONST_FUNC
#define OO_ENTER_OPENGL()
void OOGLPushModelView(void)
void OOGLTranslateModelView(Vector vector)
OOMatrix OOGLPopModelView(void)
#define OOVerifyOpenGLState()
BOOL OOCheckOpenGLErrors(NSString *format,...)
#define OOSetOpenGLState(STATE)
OOINLINE Vector make_vector(OOScalar vx, OOScalar vy, OOScalar vz) INLINE_CONST_FUNC
void getRed:green:blue:alpha:(float *red,[green] float *green,[blue] float *blue,[alpha] float *alpha)
void setUpDataWithPoints:scale:color:overallAlpha:(NSArray *points, [scale] GLfloat scale, [color] OOColor *color, [overallAlpha] GLfloat alpha)
void setUpDataForOnePoint:scale:colorComps:overallAlpha:data:(NSArray *pointInfo, [scale] GLfloat scale, [colorComps] float[4] colorComps, [overallAlpha] GLfloat alpha, [data] GLfloat *ioBuffer)