Hello community, here is the log from the commit of package sfml2 for openSUSE:Factory checked in at 2017-02-07 12:06:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sfml2 (Old) and /work/SRC/openSUSE:Factory/.sfml2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sfml2" Changes: -------- --- /work/SRC/openSUSE:Factory/sfml2/sfml2.changes 2016-11-14 20:13:41.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.sfml2.new/sfml2.changes 2017-02-07 12:06:06.287235198 +0100 @@ -1,0 +2,6 @@ +Wed Jan 25 14:57:07 UTC 2017 - [email protected] + +- Added fix-glx-extensions.patch from upstream to fix missing + multisampling. + +------------------------------------------------------------------- New: ---- fix-glx-extensions.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sfml2.spec ++++++ --- /var/tmp/diff_new_pack.B35sEj/_old 2017-02-07 12:06:07.123116936 +0100 +++ /var/tmp/diff_new_pack.B35sEj/_new 2017-02-07 12:06:07.127116371 +0100 @@ -1,7 +1,7 @@ # # spec file for package sfml2 # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ Url: http://www.sfml-dev.org/ Source0: https://github.com/SFML/SFML/archive/%{version}/SFML-%{version}.tar.gz Source1: baselibs.conf +# PATCH-FIX-UPSTREAM fix-glx-extensions.patch -- https://github.com/SFML/SFML/pull/1183 +Patch0: fix-glx-extensions.patch BuildRequires: cmake BuildRequires: dos2unix BuildRequires: doxygen @@ -93,6 +95,7 @@ %prep %setup -q -n SFML-%{version} +%patch0 -p1 dos2unix license.txt %build ++++++ fix-glx-extensions.patch ++++++ diff --git a/src/SFML/Window/Unix/GlxContext.cpp b/src/SFML/Window/Unix/GlxContext.cpp index 4efee9f..0f72e3f 100644 --- a/src/SFML/Window/Unix/GlxContext.cpp +++ b/src/SFML/Window/Unix/GlxContext.cpp @@ -105,10 +105,11 @@ m_ownsWindow(false) // Save the creation settings m_settings = ContextSettings(); - // Make sure that extensions are initialized if this is not the shared context - // The shared context is the context used to initialize the extensions - if (shared && shared->m_display) - ensureExtensionsInit(shared->m_display, DefaultScreen(shared->m_display)); + // Open the connection with the X server + m_display = OpenDisplay(); + + // Make sure that extensions are initialized + ensureExtensionsInit(m_display, DefaultScreen(m_display)); // Create the rendering surface (window or pbuffer if supported) createSurface(shared, 1, 1, VideoMode::getDesktopMode().bitsPerPixel); @@ -129,10 +130,11 @@ m_ownsWindow(false) // Save the creation settings m_settings = settings; - // Make sure that extensions are initialized if this is not the shared context - // The shared context is the context used to initialize the extensions - if (shared && shared->m_display) - ensureExtensionsInit(shared->m_display, DefaultScreen(shared->m_display)); + // Open the connection with the X server + m_display = OpenDisplay(); + + // Make sure that extensions are initialized + ensureExtensionsInit(m_display, DefaultScreen(m_display)); // Create the rendering surface from the owner window createSurface(static_cast< ::Window>(owner->getSystemHandle())); @@ -153,10 +155,11 @@ m_ownsWindow(false) // Save the creation settings m_settings = settings; - // Make sure that extensions are initialized if this is not the shared context - // The shared context is the context used to initialize the extensions - if (shared && shared->m_display) - ensureExtensionsInit(shared->m_display, DefaultScreen(shared->m_display)); + // Open the connection with the X server + m_display = OpenDisplay(); + + // Make sure that extensions are initialized + ensureExtensionsInit(m_display, DefaultScreen(m_display)); // Create the rendering surface (window or pbuffer if supported) createSurface(shared, width, height, VideoMode::getDesktopMode().bitsPerPixel); @@ -269,9 +272,6 @@ void GlxContext::display() //////////////////////////////////////////////////////////// void GlxContext::setVerticalSyncEnabled(bool enabled) { - // Make sure that extensions are initialized - ensureExtensionsInit(m_display, DefaultScreen(m_display)); - int result = 0; // Prioritize the EXT variant and fall back to MESA or SGI if needed @@ -310,6 +310,9 @@ void GlxContext::setVerticalSyncEnabled(bool enabled) //////////////////////////////////////////////////////////// XVisualInfo GlxContext::selectBestVisual(::Display* display, unsigned int bitsPerPixel, const ContextSettings& settings) { + // Make sure that extensions are initialized + ensureExtensionsInit(display, DefaultScreen(display)); + // Retrieve all the visuals int count; XVisualInfo* visuals = XGetVisualInfo(display, 0, NULL, &count); @@ -450,8 +453,6 @@ void GlxContext::updateSettingsFromWindow() //////////////////////////////////////////////////////////// void GlxContext::createSurface(GlxContext* shared, unsigned int width, unsigned int height, unsigned int bitsPerPixel) { - m_display = OpenDisplay(); - // Choose the visual according to the context settings XVisualInfo visualInfo = selectBestVisual(m_display, bitsPerPixel, m_settings); @@ -545,8 +546,6 @@ void GlxContext::createSurface(GlxContext* shared, unsigned int width, unsigned //////////////////////////////////////////////////////////// void GlxContext::createSurface(::Window window) { - m_display = OpenDisplay(); - // A window already exists, so just use it m_window = window;
