1
0
Fork 0

Always check for if glPointParameterIsSupported, even if we haven't asked

for point light distance attenuation, because we may want to toggle this
on via the rendering options gui.
This commit is contained in:
curt 2006-07-20 03:43:07 +00:00
parent 503cc54a93
commit 5831d99fc0

View file

@ -681,22 +681,20 @@ static void fgIdleFunction ( void ) {
#endif
// get the address of our OpenGL extensions
if ( fgGetBool("/sim/rendering/distance-attenuation") ) {
if (SGIsOpenGLExtensionSupported("GL_EXT_point_parameters") ) {
glPointParameterIsSupported = true;
glPointParameterfPtr = (glPointParameterfProc)
SGLookupFunction("glPointParameterfEXT");
glPointParameterfvPtr = (glPointParameterfvProc)
SGLookupFunction("glPointParameterfvEXT");
} else if ( SGIsOpenGLExtensionSupported("GL_ARB_point_parameters") ) {
glPointParameterIsSupported = true;
glPointParameterfPtr = (glPointParameterfProc)
SGLookupFunction("glPointParameterfARB");
glPointParameterfvPtr = (glPointParameterfvProc)
SGLookupFunction("glPointParameterfvARB");
} else
glPointParameterIsSupported = false;
if (SGIsOpenGLExtensionSupported("GL_EXT_point_parameters") ) {
glPointParameterIsSupported = true;
glPointParameterfPtr = (glPointParameterfProc)
SGLookupFunction("glPointParameterfEXT");
glPointParameterfvPtr = (glPointParameterfvProc)
SGLookupFunction("glPointParameterfvEXT");
} else if ( SGIsOpenGLExtensionSupported("GL_ARB_point_parameters") ) {
glPointParameterIsSupported = true;
glPointParameterfPtr = (glPointParameterfProc)
SGLookupFunction("glPointParameterfARB");
glPointParameterfvPtr = (glPointParameterfvProc)
SGLookupFunction("glPointParameterfvARB");
} else {
glPointParameterIsSupported = false;
}
fgSplashProgress("reading airport & navigation data");