Use delegating constructor

This commit is contained in:
Chris Thrasher 2024-05-28 06:28:48 +00:00 committed by Vittorio Romeo
parent 123270f7ad
commit 4fbd1d34b1

View File

@ -107,22 +107,8 @@ private:
namespace sf::priv namespace sf::priv
{ {
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
GlxContext::GlxContext(GlxContext* shared) GlxContext::GlxContext(GlxContext* shared) : GlxContext(shared, {}, {1, 1})
{ {
// Save the creation settings
m_settings = ContextSettings{};
// Open the connection with the X server
m_display = openDisplay();
// Make sure that extensions are initialized
ensureExtensionsInit(m_display.get(), DefaultScreen(m_display.get()));
// Create the rendering surface (window or pbuffer if supported)
createSurface(shared, {1, 1}, VideoMode::getDesktopMode().bitsPerPixel);
// Create the context
createContext(shared);
} }