From 8085e722913605514ba8e9531a19e57408184be8 Mon Sep 17 00:00:00 2001 From: jtsiomb Date: Wed, 18 Sep 2019 10:45:42 +0000 Subject: [PATCH 1/4] Version bump in cmake, that should have been done for 3.2.0. Changed SO_MINOR due to introduction of the new ucall entry points git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1852 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freeglut/freeglut/CMakeLists.txt b/freeglut/freeglut/CMakeLists.txt index e324a02..0c10a56 100644 --- a/freeglut/freeglut/CMakeLists.txt +++ b/freeglut/freeglut/CMakeLists.txt @@ -18,7 +18,7 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) # setup version numbers # TODO: Update these for each release! set(VERSION_MAJOR 3) -set(VERSION_MINOR 0) +set(VERSION_MINOR 2) set(VERSION_PATCH 0) 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) 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 # FREEGLUT_BUILD_SHARED_LIBS is already a standard CMake variable, but we need to From 31606f4f88d2be22ca385e8a239c33d83f29a0e9 Mon Sep 17 00:00:00 2001 From: jtsiomb Date: Wed, 18 Sep 2019 11:53:32 +0000 Subject: [PATCH 2/4] Fixed failure to install glut.h header file when FREEGLUT_REPLACE_GLUT is enabled (bug #250) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1853 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freeglut/freeglut/CMakeLists.txt b/freeglut/freeglut/CMakeLists.txt index 0c10a56..690f0ec 100644 --- a/freeglut/freeglut/CMakeLists.txt +++ b/freeglut/freeglut/CMakeLists.txt @@ -73,7 +73,7 @@ SET(FREEGLUT_HEADERS include/GL/freeglut_std.h ) IF(FREEGLUT_REPLACE_GLUT) - LIST(APPEND FREEGLUT_SRCS + LIST(APPEND FREEGLUT_HEADERS include/GL/glut.h ) ENDIF() From ff0bded3eab699158da769d593c6c19f566b6529 Mon Sep 17 00:00:00 2001 From: jtsiomb Date: Wed, 18 Sep 2019 11:58:31 +0000 Subject: [PATCH 3/4] fixed bug #251: freeglut cmake modules installation would disregard CMAKE_INSTALL_LIBDIR git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1854 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freeglut/freeglut/CMakeLists.txt b/freeglut/freeglut/CMakeLists.txt index 690f0ec..dd2709e 100644 --- a/freeglut/freeglut/CMakeLists.txt +++ b/freeglut/freeglut/CMakeLists.txt @@ -622,7 +622,7 @@ CONFIGURE_FILE(FreeGLUTConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/FreeGLUT/FreeGLUTConfig.cmake" @ONLY ) -SET(ConfigPackageLocation lib/cmake/FreeGLUT) +SET(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/FreeGLUT) INSTALL(EXPORT FreeGLUTTargets FILE FreeGLUTTargets.cmake NAMESPACE FreeGLUT:: From dda17d2506a5555118096f7c5dad37b8f9304cb8 Mon Sep 17 00:00:00 2001 From: jtsiomb Date: Wed, 25 Sep 2019 10:08:07 +0000 Subject: [PATCH 4/4] Fixed bug #252: menu windows are drawn with immediate mode and the fixed function pipeline, and therefore we must make sure the context created for them is not a core profile context. Previously if the user requested a core profile context, this would apply to menu windows too, and they would appear black. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1855 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/fg_internal.h | 2 +- freeglut/freeglut/src/fg_window.c | 10 ++++++++-- freeglut/freeglut/src/mswin/fg_window_mswin.c | 2 +- freeglut/freeglut/src/x11/fg_window_x11_glx.c | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/freeglut/freeglut/src/fg_internal.h b/freeglut/freeglut/src/fg_internal.h index 238f8de..2131f4a 100644 --- a/freeglut/freeglut/src/fg_internal.h +++ b/freeglut/freeglut/src/fg_internal.h @@ -1166,7 +1166,7 @@ SFG_Proc fgPlatformGetProcAddress( const char *procName ); #define ATTRIB_VAL(a,v) {ATTRIB(a); ATTRIB(v);} int fghMapBit( int mask, int from, int to ); -int fghIsLegacyContextRequested( void ); +int fghIsLegacyContextRequested( SFG_Window *win ); void fghContextCreationError( void ); int fghNumberOfAuxBuffersRequested( void ); diff --git a/freeglut/freeglut/src/fg_window.c b/freeglut/freeglut/src/fg_window.c index 366bbf3..6efff54 100644 --- a/freeglut/freeglut/src/fg_window.c +++ b/freeglut/freeglut/src/fg_window.c @@ -62,9 +62,15 @@ extern void fgPlatformGlutSetIconTitle( const char* title ); /* -- 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 ) diff --git a/freeglut/freeglut/src/mswin/fg_window_mswin.c b/freeglut/freeglut/src/mswin/fg_window_mswin.c index 69a698d..f622630 100644 --- a/freeglut/freeglut/src/mswin/fg_window_mswin.c +++ b/freeglut/freeglut/src/mswin/fg_window_mswin.c @@ -145,7 +145,7 @@ void fgNewWGLCreateContext( SFG_Window* window ) PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB; /* If nothing fancy has been required, leave the context as it is */ - if ( fghIsLegacyContextRequested() ) + if ( fghIsLegacyContextRequested(window) ) { return; } diff --git a/freeglut/freeglut/src/x11/fg_window_x11_glx.c b/freeglut/freeglut/src/x11/fg_window_x11_glx.c index bbabb75..eccf1d1 100644 --- a/freeglut/freeglut/src/x11/fg_window_x11_glx.c +++ b/freeglut/freeglut/src/x11/fg_window_x11_glx.c @@ -220,14 +220,14 @@ GLXContext fghCreateNewContext( SFG_Window* window ) CreateContextAttribsProc createContextAttribs = (CreateContextAttribsProc) fgPlatformGetProcAddress( "glXCreateContextAttribsARB" ); /* 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" ); fgState.MajorVersion = 2; fgState.MinorVersion = 1; } /* 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 ); if ( context == NULL ) {