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

@@ -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();
}

View File

@@ -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;