mirror of
https://github.com/glest/glest-source.git
synced 2025-08-23 08:22:50 +02:00
Fixed glow
This commit is contained in:
@@ -281,13 +281,13 @@ namespace Shared {
|
|||||||
glEnable(GL_CULL_FACE);
|
glEnable(GL_CULL_FACE);
|
||||||
}
|
}
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
|
|
||||||
//glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Vec4f(1.0f, 1.0f, 1.0f, alpha).ptr());
|
//glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Vec4f(1.0f, 1.0f, 1.0f, alpha).ptr());
|
||||||
if (renderMode == rmNormal && mesh->getGlow() == true) {
|
if (renderMode == rmNormal && mesh->getGlow() == true) {
|
||||||
// glow on
|
// glow on
|
||||||
glDisable(GL_LIGHTING);
|
glBlendFunc(GL_ONE, GL_ONE);
|
||||||
}
|
} else
|
||||||
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
||||||
if (this->colorPickingMode == false) {
|
if (this->colorPickingMode == false) {
|
||||||
//set color
|
//set color
|
||||||
@@ -429,11 +429,9 @@ namespace Shared {
|
|||||||
|
|
||||||
glDrawRangeElements(GL_TRIANGLES, 0, vertexCount - 1, indexCount, GL_UNSIGNED_INT, mesh->getIndices());
|
glDrawRangeElements(GL_TRIANGLES, 0, vertexCount - 1, indexCount, GL_UNSIGNED_INT, mesh->getIndices());
|
||||||
}
|
}
|
||||||
|
|
||||||
// glow
|
// glow
|
||||||
if (renderMode == rmNormal && mesh->getGlow() == true) {
|
if (renderMode == rmNormal && mesh->getGlow() == true) {
|
||||||
// glow off
|
// glow off
|
||||||
glEnable(GL_LIGHTING);
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
}
|
}
|
||||||
//assertions
|
//assertions
|
||||||
|
Reference in New Issue
Block a user