glcanvas.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/x11/glcanvas.h
  3. // Purpose: wxGLCanvas, for using OpenGL with wxWidgets 2.0 for Motif.
  4. // Uses the GLX extension.
  5. // Author: Julian Smart and Wolfram Gloger
  6. // Modified by:
  7. // Created: 1995, 1999
  8. // Copyright: (c) Julian Smart, Wolfram Gloger
  9. // Licence: wxWindows licence
  10. /////////////////////////////////////////////////////////////////////////////
  11. #ifndef _WX_GLCANVAS_H_
  12. #define _WX_GLCANVAS_H_
  13. #include "wx/unix/glx11.h"
  14. class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasX11
  15. {
  16. public:
  17. wxGLCanvas(wxWindow *parent,
  18. wxWindowID id = wxID_ANY,
  19. const int *attribList = NULL,
  20. const wxPoint& pos = wxDefaultPosition,
  21. const wxSize& size = wxDefaultSize,
  22. long style = 0,
  23. const wxString& name = wxGLCanvasName,
  24. const wxPalette& palette = wxNullPalette);
  25. bool Create(wxWindow *parent,
  26. wxWindowID id = wxID_ANY,
  27. const wxPoint& pos = wxDefaultPosition,
  28. const wxSize& size = wxDefaultSize,
  29. long style = 0,
  30. const wxString& name = wxGLCanvasName,
  31. const int *attribList = NULL,
  32. const wxPalette& palette = wxNullPalette);
  33. // implement wxGLCanvasX11 methods
  34. // --------------------------------
  35. virtual Window GetXWindow() const;
  36. protected:
  37. virtual int GetColourIndex(const wxColour& col);
  38. DECLARE_CLASS(wxGLCanvas)
  39. };
  40. #endif // _WX_GLCANVAS_H_