Fixed wxUniv+OpenGL compilation for MSW; Cosmetic cleanup.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2003-11-14 12:59:03 +00:00
parent e11f46363f
commit 0b3fcc0a59

View File

@@ -58,20 +58,25 @@ class WXDLLIMPEXP_GL wxGLContext: public wxObject
{
public:
wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette = wxNullPalette);
wxGLContext(
bool isRGB, wxGLCanvas *win,
wxGLContext( bool isRGB, wxGLCanvas *win,
const wxPalette& WXUNUSED(palette),
const wxGLContext *other /* for sharing display lists */
);
const wxGLContext *other /* for sharing display lists */ );
~wxGLContext();
void SetCurrent();
void SetColour(const wxChar *colour);
void SwapBuffers();
inline wxWindow* GetWindow() const { return m_window; }
inline WXHDC GetHDC() const { return m_hDC; }
inline HGLRC GetGLRC() const { return m_glContext; }
public:
@@ -84,43 +89,64 @@ class WXDLLIMPEXP_GL wxGLCanvas: public wxWindow
{
DECLARE_CLASS(wxGLCanvas)
public:
wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
wxGLCanvas(wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxGLCanvasName, int *attribList = 0, const wxPalette& palette = wxNullPalette);
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxString&
name = wxGLCanvasName,
int *attribList = (int*) NULL, const wxPalette& palette = wxNullPalette );
const wxString& name = wxGLCanvasName, int *attribList = 0,
const wxPalette& palette = wxNullPalette);
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxGLCanvasName, int *attribList = 0, const wxPalette& palette = wxNullPalette );
wxGLCanvas(wxWindow *parent,
const wxGLContext *shared = (wxGLContext *) NULL,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
int *attribList = (int *) NULL,
const wxPalette& palette = wxNullPalette);
wxGLCanvas(wxWindow *parent,
const wxGLCanvas *shared = (wxGLCanvas *)NULL,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
int *attribList = 0,
const wxPalette& palette = wxNullPalette);
~wxGLCanvas();
// Replaces wxWindow::Create functionality, since we need to use a different window class
// Replaces wxWindow::Create functionality, since
// we need to use a different window class
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, long style, const wxString& name);
const wxPoint& pos, const wxSize& size,
long style, const wxString& name);
void SetCurrent();
#ifdef __WXUNIVERSAL__
virtual bool SetCurrent(bool doit = true){ return wxWindow::SetCurrent(doit); };
virtual bool SetCurrent(bool doit) { return wxWindow::SetCurrent(doit); };
#endif
void SetColour(const wxChar *colour);
void SwapBuffers();
void OnSize(wxSizeEvent& event);
void OnQueryNewPalette(wxQueryNewPaletteEvent& event);
void OnPaletteChanged(wxPaletteChangedEvent& event);
inline wxGLContext* GetContext() const { return m_glContext; }
inline WXHDC GetHDC() const { return m_hDC; }
void SetupPixelFormat(int *attribList = (int *) NULL);
void SetupPalette(const wxPalette& palette);
wxPalette CreateDefaultPalette();
inline wxPalette* GetPalette() const { return (wxPalette *) &m_palette; }