mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 23:33:48 +02:00
Merge pull request #139 from ey6es/master
Fix for font rendering on Linux.
This commit is contained in:
commit
9802940f8c
2 changed files with 7 additions and 0 deletions
|
@ -46,6 +46,7 @@ Cloud::Cloud(int num,
|
|||
void Cloud::render() {
|
||||
|
||||
float particleAttenuationQuadratic[] = { 0.0f, 0.0f, 2.0f };
|
||||
float particleAttenuationConstant[] = { 1.0f, 0.0f, 0.0f };
|
||||
|
||||
glEnable( GL_TEXTURE_2D );
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
|
@ -73,6 +74,10 @@ void Cloud::render() {
|
|||
glEnd();
|
||||
glDisable( GL_POINT_SPRITE_ARB );
|
||||
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) {
|
||||
|
|
|
@ -90,6 +90,7 @@ void render_vector(glm::vec3 * vec)
|
|||
// Draw marker dots for magnitude
|
||||
glEnd();
|
||||
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 );
|
||||
|
||||
|
@ -104,6 +105,7 @@ void render_vector(glm::vec3 * vec)
|
|||
glVertex3f(0,0,vec->z);
|
||||
glEnd();
|
||||
|
||||
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, particleAttenuationConstant );
|
||||
}
|
||||
|
||||
void render_world_box()
|
||||
|
|
Loading…
Reference in a new issue