mirror of
https://github.com/glest/glest-source.git
synced 2025-08-14 20:34:01 +02:00
Full transparency support is now added
This commit is contained in:
@@ -48,7 +48,7 @@ namespace Shared {
|
||||
rendering = true;
|
||||
}
|
||||
|
||||
void TextRenderer2DGl::render(const string &text, float x, float y, bool centered, Vec3f *color) {
|
||||
void TextRenderer2DGl::render(const string &text, float x, float y, bool centered, Vec4f *color) {
|
||||
if (SystemFlags::VERBOSE_MODE_ENABLED) printf("**** RENDERING 2D text [%s]\n", text.c_str());
|
||||
|
||||
assert(rendering);
|
||||
@@ -57,7 +57,7 @@ namespace Shared {
|
||||
|
||||
if (color != NULL) {
|
||||
glPushAttrib(GL_CURRENT_BIT);
|
||||
glColor3fv(color->ptr());
|
||||
glColor4fv(color->ptr());
|
||||
}
|
||||
|
||||
string renderText = text;
|
||||
@@ -377,7 +377,7 @@ namespace Shared {
|
||||
//assertGl();
|
||||
}
|
||||
|
||||
void TextRenderer3DGl::render(const string &text, float x, float y, bool centered, Vec3f *color) {
|
||||
void TextRenderer3DGl::render(const string &text, float x, float y, bool centered, Vec4f *color) {
|
||||
assert(rendering);
|
||||
|
||||
if (text.empty() == false) {
|
||||
@@ -433,7 +433,7 @@ namespace Shared {
|
||||
//}
|
||||
}
|
||||
|
||||
void TextRenderer3DGl::internalRender(const string &text, float x, float y, bool centered, Vec3f *color) {
|
||||
void TextRenderer3DGl::internalRender(const string &text, float x, float y, bool centered, Vec4f *color) {
|
||||
//assert(rendering);
|
||||
|
||||
if (color != NULL) {
|
||||
@@ -442,7 +442,7 @@ namespace Shared {
|
||||
|
||||
//assertGl();
|
||||
|
||||
glColor3fv(color->ptr());
|
||||
glColor4fv(color->ptr());
|
||||
|
||||
//assertGl();
|
||||
}
|
||||
|
@@ -526,8 +526,8 @@ namespace Shared {
|
||||
particleSize = particleSystemNode->getAttribute("particleSize")->getFloatValue();
|
||||
// float speed;
|
||||
speed = particleSystemNode->getAttribute("speed")->getFloatValue();
|
||||
// Vec3f factionColor;
|
||||
factionColor = Vec3f::strToVec3(particleSystemNode->getAttribute("factionColor")->getValue());
|
||||
// Vec4f factionColor;
|
||||
factionColor = Vec4f::strToVec4(particleSystemNode->getAttribute("factionColor")->getValue());
|
||||
// bool teamcolorNoEnergy;
|
||||
teamcolorNoEnergy = particleSystemNode->getAttribute("teamcolorNoEnergy")->getIntValue() != 0;
|
||||
// bool teamcolorEnergy;
|
||||
@@ -627,7 +627,7 @@ namespace Shared {
|
||||
aliveParticleCount--;
|
||||
}
|
||||
|
||||
void ParticleSystem::setFactionColor(Vec3f factionColor) {
|
||||
void ParticleSystem::setFactionColor(Vec4f factionColor) {
|
||||
this->factionColor = factionColor;
|
||||
Vec3f tmpCol;
|
||||
|
||||
|
Reference in New Issue
Block a user