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:
parent
503cc54a93
commit
5831d99fc0
1 changed files with 14 additions and 16 deletions
|
@ -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");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue