From 5441622a28a2bad6b817e2c8d6c0673593d0ce50 Mon Sep 17 00:00:00 2001 From: ehofman Date: Thu, 26 Jan 2006 09:37:32 +0000 Subject: [PATCH] Add support for point sprites. --- src/Main/renderer.cxx | 9 ++++++++- src/Main/renderer.hxx | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index b2aa80f21..37a74def7 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -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); diff --git a/src/Main/renderer.hxx b/src/Main/renderer.hxx index de33b114a..c638a35a3 100644 --- a/src/Main/renderer.hxx +++ b/src/Main/renderer.hxx @@ -13,6 +13,7 @@ extern SGSky *thesky; extern glPointParameterfProc glPointParameterfPtr; extern glPointParameterfvProc glPointParameterfvPtr; extern bool glPointParameterIsSupported; +extern bool glPointSpriteIsSupported; class FGRenderer {