35#import "MyOpenGLView.h"
38#define PARTICLE_DISTANCE_SCALE_LOW 12.0
39#define PARTICLE_DISTANCE_SCALE_HIGH 36.0
45@interface OOLightParticleEntity (Private)
54- (id) initWithDiameter:(
float)diameter
56 if ((
self = [super
init]))
81- (void) setDiameter:(
float)diameter
93- (void) setColor:(
OOColor *)color alpha:(GLfloat)alpha
100- (void) drawSubEntityImmediate:(
bool)immediate translucent:(
bool)translucent
102 if (!translucent)
return;
115 while (father !=
nil && father != last && father !=
NO_TARGET)
138- (void) drawImmediate:(
bool)immediate translucent:(
bool)translucent
140 if (!translucent)
return;
159 OOGL(glPushAttrib(GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT));
160 OOGL(glEnable(GL_BLEND));
161 OOGL(glBlendFunc(GL_SRC_ALPHA, GL_ONE));
163 OOGL(glEnable(GL_TEXTURE_2D));
164 OOGL(glDepthMask(GL_FALSE));
167 distanceAttenuation = 1.0 - distanceAttenuation;
169 OOGL(glColor4fv(components));
171 OOGL(glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, components));
172 OOGL(glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND));
174 OOViewID viewDir = [UNIVERSE viewDirection];
189 case VIEW_GUI_DISPLAY:
190 glTexCoord2f(0.0, 1.0);
193 glTexCoord2f(1.0, 1.0);
196 glTexCoord2f(1.0, 0.0);
199 glTexCoord2f(0.0, 0.0);
204 glTexCoord2f(0.0, 1.0);
207 glTexCoord2f(1.0, 1.0);
210 glTexCoord2f(1.0, 0.0);
213 glTexCoord2f(0.0, 0.0);
218 glTexCoord2f(0.0, 1.0);
221 glTexCoord2f(1.0, 1.0);
224 glTexCoord2f(1.0, 0.0);
227 glTexCoord2f(0.0, 0.0);
232 glTexCoord2f(0.0, 1.0);
235 glTexCoord2f(1.0, 1.0);
238 glTexCoord2f(1.0, 0.0);
241 glTexCoord2f(0.0, 0.0);
251 glTexCoord2f(0.0, 1.0);
252 glVertex3f(-vi.x -vj.x -vk.x, -vi.y -vj.y -vk.y, -vi.z -vj.z -vk.z);
253 glTexCoord2f(1.0, 1.0);
254 glVertex3f(+vi.x -vj.x -vk.x, +vi.y -vj.y -vk.y, +vi.z -vj.z -vk.z);
255 glTexCoord2f(1.0, 0.0);
256 glVertex3f(+vi.x +vj.x -vk.x, +vi.y +vj.y -vk.y, +vi.z +vj.z -vk.z);
257 glTexCoord2f(0.0, 0.0);
258 glVertex3f(-vi.x +vj.x -vk.x, -vi.y +vj.y -vk.y, -vi.z +vj.z -vk.z);
263 glTexCoord2f(0.0, 1.0);
266 glTexCoord2f(1.0, 1.0);
269 glTexCoord2f(1.0, 0.0);
272 glTexCoord2f(0.0, 0.0);
278 OOGL(glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE));
297 options:kOOTextureMinFilterMipMap | kOOTextureMagFilterLinear | kOOTextureAlphaMask
#define NO_DRAW_DISTANCE_FACTOR
static OOTexture * sBlobTexture
#define PARTICLE_DISTANCE_SCALE_HIGH
#define PARTICLE_DISTANCE_SCALE_LOW
#define OO_ENTER_OPENGL()
HPVector OOHPVectorMultiplyMatrix(HPVector v, OOMatrix m)
void OOGLLoadModelView(OOMatrix matrix)
void OOGLPushModelView(void)
void OOGLTranslateModelView(Vector vector)
void OOGLMultModelView(OOMatrix matrix)
OOMatrix OOGLPopModelView(void)
@ OPENGL_STATE_ADDITIVE_BLENDING
#define OOVerifyOpenGLState()
#define OOSetOpenGLState(STATE)
void resetGraphicsState()
unsigned isImmuneToBreakPatternHide
void setScanClass:(OOScanClass sClass)
GLfloat cam_zero_distance
void setStatus:(OOEntityStatus stat)
OOMatrix drawRotationMatrix()
void getRed:green:blue:alpha:(float *red,[green] float *green,[blue] float *blue,[alpha] float *alpha)
void registerClient:(id< OOGraphicsResetClient > client)
OOGraphicsResetManager * sharedManager()
OOTexture * defaultParticleTexture()
void setColor:(OOColor *color)
void resetGraphicsState()
void drawImmediate:translucent:(bool immediate, [translucent] bool translucent)
GLfloat _colorComponents[4]
id textureWithName:inFolder:options:anisotropy:lodBias:(NSString *name,[inFolder] NSString *directory,[options] OOTextureFlags options,[anisotropy] GLfloat anisotropy,[lodBias] GLfloat lodBias)
Vector customViewRightVector
Vector customViewUpVector
Vector customViewForwardVector