Switched some effect entities over to macro GL under OS X.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4355 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
91fd4a9c6e
commit
fdd4e8b447
@ -47,7 +47,6 @@ static NSString * kOOLogKeyDown = @"input.keyMapping.keyPress.keyDown";
|
||||
@interface MyOpenGLView(Internal)
|
||||
|
||||
- (int) translateKeyCode:(int)input;
|
||||
- (void) performLateSetup;
|
||||
|
||||
- (void) recenterVirtualJoystick;
|
||||
|
||||
|
@ -26,6 +26,7 @@ MA 02110-1301, USA.
|
||||
#import "OOLaserShotEntity.h"
|
||||
#import "Universe.h"
|
||||
#import "ShipEntity.h"
|
||||
#import "OOMacroOpenGL.h"
|
||||
|
||||
|
||||
#define kLaserDuration (0.175) // seconds
|
||||
@ -176,6 +177,8 @@ static const GLfloat kLaserVertices[] =
|
||||
{
|
||||
if (!translucent || [UNIVERSE breakPatternHide]) return;
|
||||
|
||||
OO_ENTER_OPENGL();
|
||||
|
||||
OOGL(glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT));
|
||||
|
||||
OOGL(glDisable(GL_CULL_FACE)); // face culling
|
||||
|
@ -28,6 +28,7 @@ MA 02110-1301, USA.
|
||||
#import "OOTexture.h"
|
||||
#import "PlayerEntity.h"
|
||||
#import "OOLightParticleEntity.h"
|
||||
#import "OOMacroOpenGL.h"
|
||||
|
||||
|
||||
// Testing toy: cause particle systems to stop after half a second.
|
||||
@ -126,19 +127,21 @@ MA 02110-1301, USA.
|
||||
}
|
||||
|
||||
|
||||
OOINLINE void DrawQuadForView(GLfloat x, GLfloat y, GLfloat z, GLfloat sz)
|
||||
{
|
||||
glTexCoord2f(0.0, 1.0); glVertex3f(x-sz, y-sz, z);
|
||||
glTexCoord2f(1.0, 1.0); glVertex3f(x+sz, y-sz, z);
|
||||
glTexCoord2f(1.0, 0.0); glVertex3f(x+sz, y+sz, z);
|
||||
glTexCoord2f(0.0, 0.0); glVertex3f(x-sz, y+sz, z);
|
||||
}
|
||||
#define DrawQuadForView(x, y, z, sz) \
|
||||
do { \
|
||||
glTexCoord2f(0.0, 1.0); glVertex3f(x-sz, y-sz, z); \
|
||||
glTexCoord2f(1.0, 1.0); glVertex3f(x+sz, y-sz, z); \
|
||||
glTexCoord2f(1.0, 0.0); glVertex3f(x+sz, y+sz, z); \
|
||||
glTexCoord2f(0.0, 0.0); glVertex3f(x-sz, y+sz, z); \
|
||||
} while (0)
|
||||
|
||||
|
||||
- (void) drawEntity:(BOOL)immediate :(BOOL)translucent
|
||||
{
|
||||
if (!translucent || [UNIVERSE breakPatternHide]) return;
|
||||
|
||||
OO_ENTER_OPENGL();
|
||||
|
||||
OOGL(glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT));
|
||||
|
||||
OOGL(glEnable(GL_TEXTURE_2D));
|
||||
|
@ -26,6 +26,7 @@ MA 02110-1301, USA.
|
||||
#import "OOQuiriumCascadeEntity.h"
|
||||
#import "PlayerEntity.h"
|
||||
#import "Universe.h"
|
||||
#import "OOMacroOpenGL.h"
|
||||
|
||||
|
||||
#define kQuiriumCascadeDuration (20.0) // seconds
|
||||
@ -121,6 +122,8 @@ MA 02110-1301, USA.
|
||||
{
|
||||
if (!translucent || [UNIVERSE breakPatternHide]) return;
|
||||
|
||||
OO_ENTER_OPENGL();
|
||||
|
||||
OOGL(glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT));
|
||||
|
||||
OOGL(glDisable(GL_CULL_FACE));
|
||||
|
@ -25,6 +25,7 @@ MA 02110-1301, USA.
|
||||
|
||||
#import "OORingEffectEntity.h"
|
||||
#import "Universe.h"
|
||||
#import "OOMacroOpenGL.h"
|
||||
|
||||
|
||||
#define kRingDuration (2.0f) // seconds
|
||||
@ -135,6 +136,8 @@ static NSPoint sCircleVerts[kCircleSegments]; // holds vector coordinates for a
|
||||
{
|
||||
if (!translucent || [UNIVERSE breakPatternHide]) return;
|
||||
|
||||
OO_ENTER_OPENGL();
|
||||
|
||||
OOGL(glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT));
|
||||
|
||||
GLfloat alpha = OOClamp_0_1_f((kRingDuration - _timePassed) / kRingAttack);
|
||||
|
@ -24,10 +24,10 @@ MA 02110-1301, USA.
|
||||
|
||||
#import "OOSunEntity.h"
|
||||
#import "OOOpenGLExtensionManager.h"
|
||||
#import "OOMacroOpenGL.h"
|
||||
|
||||
#import "Universe.h"
|
||||
#import "AI.h"
|
||||
#import "TextureStore.h"
|
||||
#import "MyOpenGLView.h"
|
||||
#import "ShipEntityAI.h"
|
||||
#import "OOColor.h"
|
||||
@ -67,6 +67,8 @@ MA 02110-1301, USA.
|
||||
{
|
||||
if (sun_color == nil) return NO;
|
||||
|
||||
OO_ENTER_OPENGL();
|
||||
|
||||
OOCGFloat hue, sat, bri, alf;
|
||||
OOColor *color;
|
||||
|
||||
@ -313,6 +315,7 @@ MA 02110-1301, USA.
|
||||
if (subdivideLevel > 4)
|
||||
subdivideLevel = 4;
|
||||
}
|
||||
OO_ENTER_OPENGL();
|
||||
|
||||
OOGL(glPushAttrib(GL_ENABLE_BIT));
|
||||
OOGL(glDisable(GL_CULL_FACE));
|
||||
@ -419,6 +422,8 @@ MA 02110-1301, USA.
|
||||
pt0=(1.0 - corona_stage) * corona_blending;
|
||||
pt1=corona_stage * corona_blending;
|
||||
|
||||
OO_ENTER_OPENGL();
|
||||
|
||||
OOGL(glShadeModel(GL_SMOOTH));
|
||||
OOGLBEGIN(GL_TRIANGLE_STRIP);
|
||||
for (i = 0; i < 360; i += step)
|
||||
|
@ -108,7 +108,6 @@ MA 02110-1301, USA.
|
||||
|
||||
|
||||
#import "OOCache.h"
|
||||
#import "OOCacheManager.h"
|
||||
#import "OOStringParsing.h"
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user