X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f48d169c4a57bd4ac2f44e42b9fd26a930bbdca0..3434b611aa252f457ffaaf77edd01831fa82f19f:/include/wx/msw/glcanvas.h diff --git a/include/wx/msw/glcanvas.h b/include/wx/msw/glcanvas.h index 534528d559..b8dab7af65 100644 --- a/include/wx/msw/glcanvas.h +++ b/include/wx/msw/glcanvas.h @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: glcanvas.h +// Name: wx/msw/glcanvas.h // Purpose: wxGLCanvas, for using OpenGL with wxWindows under Windows // Author: Julian Smart // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -16,16 +16,13 @@ #ifndef _WX_GLCANVAS_H_ #define _WX_GLCANVAS_H_ -#include - -#if wxUSE_GLCANVAS - -#include -#include +#include "wx/palette.h" +#include "wx/scrolwin.h" #include +#include "wx/msw/winundef.h" -#include "gl/gl.h" +#include //--------------------------------------------------------------------------- // Constants for attriblist @@ -61,15 +58,15 @@ class WXDLLEXPORT 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 */ ); ~wxGLContext(); void SetCurrent(); - void SetColour(const char *colour); + void SetColour(const wxChar *colour); void SwapBuffers(); @@ -83,21 +80,22 @@ public: wxWindow* m_window; }; -class WXDLLEXPORT wxGLCanvas: public wxScrolledWindow +class WXDLLEXPORT wxGLCanvas: public wxWindow { DECLARE_CLASS(wxGLCanvas) public: wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette); + 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 = "GLCanvas", + 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 = -1, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette ); + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxGLCanvasName, int *attribList = 0, const wxPalette& palette = wxNullPalette ); ~wxGLCanvas(); @@ -106,7 +104,7 @@ class WXDLLEXPORT wxGLCanvas: public wxScrolledWindow const wxPoint& pos, const wxSize& size, long style, const wxString& name); void SetCurrent(); - void SetColour(const char *colour); + void SetColour(const wxChar *colour); void SwapBuffers(); void OnSize(wxSizeEvent& event); @@ -128,11 +126,9 @@ protected: wxPalette m_palette; WXHDC m_hDC; -DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() }; -#endif - // wxUSE_GLCANVAS #endif // _WX_GLCANVAS_H_