Merge remote-tracking branch 'svn/trunk' into git_master
This commit is contained in:
commit
54f8610a1a
@ -18,7 +18,7 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
|||||||
# setup version numbers
|
# setup version numbers
|
||||||
# TODO: Update these for each release!
|
# TODO: Update these for each release!
|
||||||
set(VERSION_MAJOR 3)
|
set(VERSION_MAJOR 3)
|
||||||
set(VERSION_MINOR 0)
|
set(VERSION_MINOR 2)
|
||||||
set(VERSION_PATCH 0)
|
set(VERSION_PATCH 0)
|
||||||
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ CONFIGURE_FILE(src/fg_version.h.in src/fg_version.h)
|
|||||||
|
|
||||||
# shared lib version numbers (change before release)
|
# shared lib version numbers (change before release)
|
||||||
set(SO_MAJOR 3) # increment on backwards incompatible API/ABI changes
|
set(SO_MAJOR 3) # increment on backwards incompatible API/ABI changes
|
||||||
set(SO_MINOR 10) # increment on backwards compatible or internal changes
|
set(SO_MINOR 11) # increment on backwards compatible or internal changes
|
||||||
set(SO_REV 0) # if nothing else changed increment this
|
set(SO_REV 0) # if nothing else changed increment this
|
||||||
|
|
||||||
# FREEGLUT_BUILD_SHARED_LIBS is already a standard CMake variable, but we need to
|
# FREEGLUT_BUILD_SHARED_LIBS is already a standard CMake variable, but we need to
|
||||||
@ -73,7 +73,7 @@ SET(FREEGLUT_HEADERS
|
|||||||
include/GL/freeglut_std.h
|
include/GL/freeglut_std.h
|
||||||
)
|
)
|
||||||
IF(FREEGLUT_REPLACE_GLUT)
|
IF(FREEGLUT_REPLACE_GLUT)
|
||||||
LIST(APPEND FREEGLUT_SRCS
|
LIST(APPEND FREEGLUT_HEADERS
|
||||||
include/GL/glut.h
|
include/GL/glut.h
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
@ -622,7 +622,7 @@ CONFIGURE_FILE(FreeGLUTConfig.cmake.in
|
|||||||
"${CMAKE_CURRENT_BINARY_DIR}/FreeGLUT/FreeGLUTConfig.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/FreeGLUT/FreeGLUTConfig.cmake"
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
SET(ConfigPackageLocation lib/cmake/FreeGLUT)
|
SET(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/FreeGLUT)
|
||||||
INSTALL(EXPORT FreeGLUTTargets
|
INSTALL(EXPORT FreeGLUTTargets
|
||||||
FILE FreeGLUTTargets.cmake
|
FILE FreeGLUTTargets.cmake
|
||||||
NAMESPACE FreeGLUT::
|
NAMESPACE FreeGLUT::
|
||||||
|
@ -1166,7 +1166,7 @@ SFG_Proc fgPlatformGetProcAddress( const char *procName );
|
|||||||
#define ATTRIB_VAL(a,v) {ATTRIB(a); ATTRIB(v);}
|
#define ATTRIB_VAL(a,v) {ATTRIB(a); ATTRIB(v);}
|
||||||
|
|
||||||
int fghMapBit( int mask, int from, int to );
|
int fghMapBit( int mask, int from, int to );
|
||||||
int fghIsLegacyContextRequested( void );
|
int fghIsLegacyContextRequested( SFG_Window *win );
|
||||||
void fghContextCreationError( void );
|
void fghContextCreationError( void );
|
||||||
int fghNumberOfAuxBuffersRequested( void );
|
int fghNumberOfAuxBuffersRequested( void );
|
||||||
|
|
||||||
|
@ -62,9 +62,15 @@ extern void fgPlatformGlutSetIconTitle( const char* title );
|
|||||||
|
|
||||||
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
|
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
|
||||||
|
|
||||||
int fghIsLegacyContextRequested( void )
|
int fghIsLegacyContextRequested( SFG_Window *win )
|
||||||
{
|
{
|
||||||
return fgState.MajorVersion < 2 || (fgState.MajorVersion == 2 && fgState.MinorVersion <= 1);
|
int vmajor = fgState.MajorVersion;
|
||||||
|
int vminor = fgState.MinorVersion;
|
||||||
|
/* XXX: menu windows are drawn with the fixed function pipeline, therefore
|
||||||
|
* the context created for them can't be a modern core-profile context.
|
||||||
|
* Force the traditional context creation for menu windows.
|
||||||
|
*/
|
||||||
|
return vmajor < 2 || (vmajor == 2 && vminor <= 1) || win->IsMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fghNumberOfAuxBuffersRequested( void )
|
int fghNumberOfAuxBuffersRequested( void )
|
||||||
|
@ -145,7 +145,7 @@ void fgNewWGLCreateContext( SFG_Window* window )
|
|||||||
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB;
|
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB;
|
||||||
|
|
||||||
/* If nothing fancy has been required, leave the context as it is */
|
/* If nothing fancy has been required, leave the context as it is */
|
||||||
if ( fghIsLegacyContextRequested() )
|
if ( fghIsLegacyContextRequested(window) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -220,14 +220,14 @@ GLXContext fghCreateNewContext( SFG_Window* window )
|
|||||||
CreateContextAttribsProc createContextAttribs = (CreateContextAttribsProc) fgPlatformGetProcAddress( "glXCreateContextAttribsARB" );
|
CreateContextAttribsProc createContextAttribs = (CreateContextAttribsProc) fgPlatformGetProcAddress( "glXCreateContextAttribsARB" );
|
||||||
|
|
||||||
/* glXCreateContextAttribsARB not found, yet the user has requested the new context creation */
|
/* glXCreateContextAttribsARB not found, yet the user has requested the new context creation */
|
||||||
if ( !createContextAttribs && !fghIsLegacyContextRequested() ) {
|
if ( !createContextAttribs && !fghIsLegacyContextRequested(window) ) {
|
||||||
fgWarning( "OpenGL >2.1 context requested but glXCreateContextAttribsARB is not available! Falling back to legacy context creation" );
|
fgWarning( "OpenGL >2.1 context requested but glXCreateContextAttribsARB is not available! Falling back to legacy context creation" );
|
||||||
fgState.MajorVersion = 2;
|
fgState.MajorVersion = 2;
|
||||||
fgState.MinorVersion = 1;
|
fgState.MinorVersion = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If nothing fancy has been required, simply use the old context creation GLX API entry */
|
/* If nothing fancy has been required, simply use the old context creation GLX API entry */
|
||||||
if ( fghIsLegacyContextRequested() || !createContextAttribs )
|
if ( fghIsLegacyContextRequested(window) || !createContextAttribs )
|
||||||
{
|
{
|
||||||
context = glXCreateNewContext( dpy, config, render_type, share_list, direct );
|
context = glXCreateNewContext( dpy, config, render_type, share_list, direct );
|
||||||
if ( context == NULL ) {
|
if ( context == NULL ) {
|
||||||
|
Reference in New Issue
Block a user