Full transparency support is now added

This commit is contained in:
mathusummut
2018-06-21 19:57:44 +02:00
parent 3e8f8f7dd5
commit c15488a212
45 changed files with 299 additions and 1225 deletions

View File

@@ -41,7 +41,7 @@ namespace Shared {
virtual ~TextRenderer2DGl();
virtual void begin(Font2D *font);
virtual void render(const string &text, float x, float y, bool centered = false, Vec3f *color = NULL);
virtual void render(const string &text, float x, float y, bool centered = false, Vec4f *color = NULL);
virtual void end();
};
@@ -55,7 +55,7 @@ namespace Shared {
bool rendering;
int currentFTGLErrorCount;
void internalRender(const string &text, float x, float y, bool centered, Vec3f *color);
void internalRender(const string &text, float x, float y, bool centered, Vec4f *color);
void specialFTGLErrorCheckWorkaround(string text);
public:
@@ -63,7 +63,7 @@ namespace Shared {
virtual ~TextRenderer3DGl();
virtual void begin(Font3D *font);
virtual void render(const string &text, float x, float y, bool centered = false, Vec3f *color = NULL);
virtual void render(const string &text, float x, float y, bool centered = false, Vec4f *color = NULL);
virtual void end();
};

View File

@@ -339,7 +339,6 @@ namespace Shared {
recycleUniqueColor();
}
//static const int COLOR_COMPONENTS = 3;
static const int COLOR_COMPONENTS = 4;
static void init(int bufferSize);
static void beginPicking();

View File

@@ -185,7 +185,7 @@ namespace Shared {
float speed;
float speedUpRelative;
float speedUpConstant;
Vec3f factionColor;
Vec4f factionColor;
bool teamcolorNoEnergy;
bool teamcolorEnergy;
int alternations;
@@ -268,7 +268,7 @@ namespace Shared {
void setParticleSystemStartDelay(int delay) {
this->particleSystemStartDelay = delay;
}
virtual void setFactionColor(Vec3f factionColor);
virtual void setFactionColor(Vec4f factionColor);
static BlendMode strToBlendMode(const string &str);
//misc

View File

@@ -28,7 +28,7 @@ namespace Shared {
class TextRenderer {
public:
virtual void render(const string &text, float x, float y, bool centered = false, Vec3f *color = NULL) = 0;
virtual void render(const string &text, float x, float y, bool centered = false, Vec4f *color = NULL) = 0;
virtual void end() = 0;
virtual ~TextRenderer() {

View File

@@ -745,7 +745,7 @@ namespace Shared {
x += v.x;
y += v.y;
z += v.z;
w += w.z;
w += v.w;
return *this;
}
@@ -753,7 +753,7 @@ namespace Shared {
x -= v.x;
y -= v.y;
z -= v.z;
w -= w.z;
w -= v.w;
return *this;
}
inline bool operator <(const Vec4<T> &v) const {