00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GLTELEPORTER_H
00019 #define GLTELEPORTER_H
00020
00021 #include "constants.h"
00022 #include "glshape.h"
00023
00028 class GLTeleporter : public GLShape {
00029 private:
00030 static const int MAX_STARS = 20;
00031 float star[MAX_STARS][2];
00032 float starColor[MAX_STARS][3];
00033 float starAngle[MAX_STARS];
00034 float starSpeed[MAX_STARS];
00035
00036 static const int MAX_RINGS = 20;
00037 float ring[MAX_RINGS];
00038 float delta[MAX_RINGS];
00039 GLuint flameTex;
00040
00041 public:
00046 GLTeleporter(GLuint texture[], GLuint flameTex,
00047 int width, int depth, int height,
00048 char *name, int descriptionGroup,
00049 Uint32 color, Uint8 shapePalIndex=0);
00050
00051 ~GLTeleporter();
00052
00053 void draw();
00054
00055 inline bool drawFirst() { return false; }
00056 inline bool drawLater() { return true; }
00057 inline void setupBlending() { glBlendFunc(GL_SRC_ALPHA, GL_ONE); }
00058
00059 protected:
00060 void commonInit(GLuint flameTex);
00061
00062 };
00063
00064 #endif