1
0
Fork 0

Add support for point sprites.

This commit is contained in:
ehofman 2006-01-26 09:37:32 +00:00
parent f0996fa47d
commit 5441622a28
2 changed files with 9 additions and 1 deletions

View file

@ -91,6 +91,7 @@ float scene_farplane = 120000.0f;
glPointParameterfProc glPointParameterfPtr = 0;
glPointParameterfvProc glPointParameterfvPtr = 0;
bool glPointParameterIsSupported = false;
bool glPointSpriteIsSupported = false;
// fog constants. I'm a little nervous about putting actual code out
@ -226,7 +227,13 @@ FGRenderer::init( void ) {
glFrontFace ( GL_CCW );
// Just testing ...
glEnable(GL_POINT_SMOOTH);
if ( SGIsOpenGLExtensionSupported("GL_ARB_point_sprite") ||
SGIsOpenGLExtensionSupported("GL_NV_point_sprite") )
{
glEnable(GL_POINT_SPRITE);
glEnable(GL_POINT_SMOOTH);
glPointSpriteIsSupported = true;
}
glEnable(GL_LINE_SMOOTH);
// glEnable(GL_POLYGON_SMOOTH);
glHint(GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);

View file

@ -13,6 +13,7 @@ extern SGSky *thesky;
extern glPointParameterfProc glPointParameterfPtr;
extern glPointParameterfvProc glPointParameterfvPtr;
extern bool glPointParameterIsSupported;
extern bool glPointSpriteIsSupported;
class FGRenderer {