summaryrefslogtreecommitdiff
path: root/src/SFML/Window/Unix/GlxContext.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SFML/Window/Unix/GlxContext.hpp')
-rw-r--r--src/SFML/Window/Unix/GlxContext.hpp40
1 files changed, 36 insertions, 4 deletions
diff --git a/src/SFML/Window/Unix/GlxContext.hpp b/src/SFML/Window/Unix/GlxContext.hpp
index e1ad899..4a9444f 100644
--- a/src/SFML/Window/Unix/GlxContext.hpp
+++ b/src/SFML/Window/Unix/GlxContext.hpp
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+// Copyright (C) 2007-2016 Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
@@ -133,14 +133,45 @@ public:
private:
////////////////////////////////////////////////////////////
- /// \brief Create the context
+ /// \brief Update the context visual settings from XVisualInfo
+ ///
+ /// \param visualInfo XVisualInfo to update settings from
+ ///
+ ////////////////////////////////////////////////////////////
+ void updateSettingsFromVisualInfo(XVisualInfo* visualInfo);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Update the context visual settings from the window
+ ///
+ ////////////////////////////////////////////////////////////
+ void updateSettingsFromWindow();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Create the context's drawing surface
///
/// \param shared Context to share the new one with (can be NULL)
+ /// \param width Back buffer width, in pixels
+ /// \param height Back buffer height, in pixels
/// \param bitsPerPixel Pixel depth, in bits per pixel
- /// \param settings Creation parameters
///
////////////////////////////////////////////////////////////
- void createContext(GlxContext* shared, unsigned int bitsPerPixel, const ContextSettings& settings);
+ void createSurface(GlxContext* shared, unsigned int width, unsigned int height, unsigned int bitsPerPixel);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Create the context's drawing surface from an existing window
+ ///
+ /// \param window Window ID of the owning window
+ ///
+ ////////////////////////////////////////////////////////////
+ void createSurface(::Window window);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Create the context
+ ///
+ /// \param shared Context to share the new one with (can be NULL)
+ ///
+ ////////////////////////////////////////////////////////////
+ void createContext(GlxContext* shared);
////////////////////////////////////////////////////////////
// Member data
@@ -149,6 +180,7 @@ private:
::Window m_window; ///< Window to which the context is attached
xcb_connection_t* m_connection; ///< Pointer to the xcb connection
GLXContext m_context; ///< OpenGL context
+ GLXPbuffer m_pbuffer; ///< GLX pbuffer ID if one was created
bool m_ownsWindow; ///< Do we own the window associated to the context?
};