Fix wxGLCanvas compilation with wxUSE_PALETTE==0.
This fixes compilation problems with the minimal build of wxGTK and will make removing palette support in the future simpler. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -113,7 +113,9 @@ public:
|
|||||||
// check if the given attributes are supported without creating a canvas
|
// check if the given attributes are supported without creating a canvas
|
||||||
static bool IsDisplaySupported(const int *attribList);
|
static bool IsDisplaySupported(const int *attribList);
|
||||||
|
|
||||||
|
#if wxUSE_PALETTE
|
||||||
const wxPalette *GetPalette() const { return &m_palette; }
|
const wxPalette *GetPalette() const { return &m_palette; }
|
||||||
|
#endif // wxUSE_PALETTE
|
||||||
|
|
||||||
// miscellaneous helper functions
|
// miscellaneous helper functions
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
@@ -149,16 +151,18 @@ protected:
|
|||||||
// (currently only implemented in wxX11 and wxMotif ports)
|
// (currently only implemented in wxX11 and wxMotif ports)
|
||||||
virtual int GetColourIndex(const wxColour& WXUNUSED(col)) { return -1; }
|
virtual int GetColourIndex(const wxColour& WXUNUSED(col)) { return -1; }
|
||||||
|
|
||||||
// create default palette if we're not using RGBA mode
|
|
||||||
// (not supported in most ports)
|
|
||||||
virtual wxPalette CreateDefaultPalette() { return wxNullPalette; }
|
|
||||||
|
|
||||||
// check if the given extension name is present in the space-separated list
|
// check if the given extension name is present in the space-separated list
|
||||||
// of extensions supported by the current implementation such as returned
|
// of extensions supported by the current implementation such as returned
|
||||||
// by glXQueryExtensionsString() or glGetString(GL_EXTENSIONS)
|
// by glXQueryExtensionsString() or glGetString(GL_EXTENSIONS)
|
||||||
static bool IsExtensionInList(const char *list, const char *extension);
|
static bool IsExtensionInList(const char *list, const char *extension);
|
||||||
|
|
||||||
|
#if wxUSE_PALETTE
|
||||||
|
// create default palette if we're not using RGBA mode
|
||||||
|
// (not supported in most ports)
|
||||||
|
virtual wxPalette CreateDefaultPalette() { return wxNullPalette; }
|
||||||
|
|
||||||
wxPalette m_palette;
|
wxPalette m_palette;
|
||||||
|
#endif // wxUSE_PALETTE
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2_8
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
wxGLContext *m_glContext;
|
wxGLContext *m_glContext;
|
||||||
|
@@ -203,9 +203,12 @@ bool wxGLCanvas::Create(wxWindow *parent,
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
const int *attribList,
|
const int *attribList,
|
||||||
const wxPalette& WXUNUSED_UNLESS_DEBUG(palette))
|
const wxPalette& palette)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_PALETTE
|
||||||
wxASSERT_MSG( !palette.IsOk(), wxT("palettes not supported") );
|
wxASSERT_MSG( !palette.IsOk(), wxT("palettes not supported") );
|
||||||
|
#endif // wxUSE_PALETTE
|
||||||
|
wxUnusedVar(palette); // Unused when wxDEBUG_LEVEL==0
|
||||||
|
|
||||||
m_exposed = false;
|
m_exposed = false;
|
||||||
m_noExpose = true;
|
m_noExpose = true;
|
||||||
|
Reference in New Issue
Block a user