made SetCurrent() and SwapBuffers() return boolean status indicator instead of void (slightly modified patch 1844090)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -66,7 +66,7 @@ public:
|
||||
*/
|
||||
|
||||
// set this context as the current one
|
||||
virtual void SetCurrent(const wxGLCanvas& win) const = 0;
|
||||
virtual bool SetCurrent(const wxGLCanvas& win) const = 0;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -99,10 +99,10 @@ public:
|
||||
// ----------
|
||||
|
||||
// set the given context associated with this window as the current one
|
||||
void SetCurrent(const wxGLContext& context) const;
|
||||
bool SetCurrent(const wxGLContext& context) const;
|
||||
|
||||
// flush the back buffer (if we have it)
|
||||
virtual void SwapBuffers() = 0;
|
||||
virtual bool SwapBuffers() = 0;
|
||||
|
||||
|
||||
// accessors
|
||||
|
@@ -28,7 +28,7 @@ public:
|
||||
wxGLContext(wxGLCanvas *win, const wxGLContext* other = NULL);
|
||||
virtual ~wxGLContext();
|
||||
|
||||
virtual void SetCurrent(const wxGLCanvas& win) const;
|
||||
virtual bool SetCurrent(const wxGLCanvas& win) const;
|
||||
|
||||
HGLRC GetGLRC() const { return m_glContext; }
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
virtual ~wxGLCanvas();
|
||||
|
||||
// implement wxGLCanvasBase methods
|
||||
virtual void SwapBuffers();
|
||||
virtual bool SwapBuffers();
|
||||
|
||||
|
||||
// MSW-specific helpers
|
||||
|
@@ -23,11 +23,11 @@ public:
|
||||
wxGLContext(wxGLCanvas *win, const wxGLContext *other = NULL);
|
||||
virtual ~wxGLContext();
|
||||
|
||||
virtual void SetCurrent(const wxGLCanvas& win) const;
|
||||
virtual bool SetCurrent(const wxGLCanvas& win) const;
|
||||
|
||||
private:
|
||||
// attach context to the drawable or unset it (if NULL)
|
||||
static void MakeCurrent(GLXDrawable drawable, GLXContext context);
|
||||
static bool MakeCurrent(GLXDrawable drawable, GLXContext context);
|
||||
|
||||
GLXContext m_glContext;
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
// implement wxGLCanvasBase methods
|
||||
// --------------------------------
|
||||
|
||||
virtual void SwapBuffers();
|
||||
virtual bool SwapBuffers();
|
||||
|
||||
|
||||
// X11-specific methods
|
||||
|
Reference in New Issue
Block a user