mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 15:29:05 +02:00
To fix font rendering on Linux (which uses points), we need to restore the
default point size attenuation settings.
This commit is contained in:
parent
63a581dae4
commit
e02aaa39f7
2 changed files with 7 additions and 0 deletions
|
@ -46,6 +46,7 @@ Cloud::Cloud(int num,
|
||||||
void Cloud::render() {
|
void Cloud::render() {
|
||||||
|
|
||||||
float particleAttenuationQuadratic[] = { 0.0f, 0.0f, 2.0f };
|
float particleAttenuationQuadratic[] = { 0.0f, 0.0f, 2.0f };
|
||||||
|
float particleAttenuationConstant[] = { 1.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
glEnable( GL_TEXTURE_2D );
|
glEnable( GL_TEXTURE_2D );
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||||
|
@ -73,6 +74,10 @@ void Cloud::render() {
|
||||||
glEnd();
|
glEnd();
|
||||||
glDisable( GL_POINT_SPRITE_ARB );
|
glDisable( GL_POINT_SPRITE_ARB );
|
||||||
glDisable( GL_TEXTURE_2D );
|
glDisable( GL_TEXTURE_2D );
|
||||||
|
|
||||||
|
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, particleAttenuationConstant );
|
||||||
|
glPointParameterfARB( GL_POINT_SIZE_MAX_ARB, 1.0f );
|
||||||
|
glPointParameterfARB( GL_POINT_SIZE_MIN_ARB, 0.0f );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cloud::simulate (float deltaTime) {
|
void Cloud::simulate (float deltaTime) {
|
||||||
|
|
|
@ -90,6 +90,7 @@ void render_vector(glm::vec3 * vec)
|
||||||
// Draw marker dots for magnitude
|
// Draw marker dots for magnitude
|
||||||
glEnd();
|
glEnd();
|
||||||
float particleAttenuationQuadratic[] = { 0.0f, 0.0f, 2.0f }; // larger Z = smaller particles
|
float particleAttenuationQuadratic[] = { 0.0f, 0.0f, 2.0f }; // larger Z = smaller particles
|
||||||
|
float particleAttenuationConstant[] = { 1.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, particleAttenuationQuadratic );
|
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, particleAttenuationQuadratic );
|
||||||
|
|
||||||
|
@ -104,6 +105,7 @@ void render_vector(glm::vec3 * vec)
|
||||||
glVertex3f(0,0,vec->z);
|
glVertex3f(0,0,vec->z);
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
|
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, particleAttenuationConstant );
|
||||||
}
|
}
|
||||||
|
|
||||||
void render_world_box()
|
void render_world_box()
|
||||||
|
|
Loading…
Reference in a new issue