Introduced OSG_GL*_FEATURES macros defined in include/GL that are set to 0 or 1 according to what the assocoated version of GL is compiled against.
Removed EXT postfix of FrameBufferObject functions, and added support for checking non EXT versions frame buffer object GL functions. Introduced usage of OSG_GL*_FEATURES to avoid some #if #else #endif code blocks. Using a submissions from Paul Martz as a guide added perliminary GL3 support to a range of OSG classes
This commit is contained in:
@@ -147,9 +147,11 @@ void TextureRectangle::setImage(Image* image)
|
||||
|
||||
void TextureRectangle::apply(State& state) const
|
||||
{
|
||||
static bool s_rectangleSupported = isGLExtensionSupported(state.getContextID(),"GL_ARB_texture_rectangle")
|
||||
|| isGLExtensionSupported(state.getContextID(),"GL_EXT_texture_rectangle")
|
||||
|| isGLExtensionSupported(state.getContextID(),"GL_NV_texture_rectangle");
|
||||
static bool s_rectangleSupported =
|
||||
OSG_GL3_FEATURES ||
|
||||
isGLExtensionSupported(state.getContextID(),"GL_ARB_texture_rectangle") ||
|
||||
isGLExtensionSupported(state.getContextID(),"GL_EXT_texture_rectangle") ||
|
||||
isGLExtensionSupported(state.getContextID(),"GL_NV_texture_rectangle");
|
||||
|
||||
if (!s_rectangleSupported)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user