added missing _T()s; deTABified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: glcanvas.cpp
|
// Name: gtk/glcanvas.cpp
|
||||||
// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWindows and GTK
|
// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWindows and GTK
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 17/08/98
|
// Created: 17/08/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Robert Roebling
|
// Copyright: (c) Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
@@ -24,7 +24,8 @@
|
|||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C"
|
||||||
|
{
|
||||||
#include "gtk/gtk.h"
|
#include "gtk/gtk.h"
|
||||||
#include "gdk/gdk.h"
|
#include "gdk/gdk.h"
|
||||||
#include "gdk/gdkx.h"
|
#include "gdk/gdkx.h"
|
||||||
@@ -59,11 +60,11 @@ wxGLContext::wxGLContext( bool WXUNUSED(isRGB), wxWindow *win, const wxPalette&
|
|||||||
wxGLCanvas *gc = (wxGLCanvas*) win;
|
wxGLCanvas *gc = (wxGLCanvas*) win;
|
||||||
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
||||||
|
|
||||||
wxCHECK_RET( vi, "invalid visual for OpenGl" );
|
wxCHECK_RET( vi, _T("invalid visual for OpenGl") );
|
||||||
|
|
||||||
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, None, GL_TRUE );
|
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, None, GL_TRUE );
|
||||||
|
|
||||||
wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
|
wxCHECK_RET( m_glContext, _T("Couldn't create OpenGl context") );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLContext::wxGLContext(
|
wxGLContext::wxGLContext(
|
||||||
@@ -78,14 +79,16 @@ wxGLContext::wxGLContext(
|
|||||||
wxGLCanvas *gc = (wxGLCanvas*) win;
|
wxGLCanvas *gc = (wxGLCanvas*) win;
|
||||||
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
||||||
|
|
||||||
wxCHECK_RET( vi, "invalid visual for OpenGl" );
|
wxCHECK_RET( vi, _T("invalid visual for OpenGl") );
|
||||||
|
|
||||||
if( other != 0 )
|
m_glContext = glXCreateContext( GDK_DISPLAY(), vi,
|
||||||
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, other->m_glContext, GL_TRUE );
|
other ? other->m_glContext : None,
|
||||||
else
|
GL_TRUE );
|
||||||
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, None, GL_TRUE );
|
|
||||||
|
|
||||||
wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
|
if ( !m_glContext )
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("Couldn't create OpenGl context") );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLContext::~wxGLContext()
|
wxGLContext::~wxGLContext()
|
||||||
@@ -245,9 +248,9 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
wxGLCanvas::wxGLCanvas( wxWindow *parent, wxWindowID id,
|
wxGLCanvas::wxGLCanvas( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette )
|
const wxPalette& palette )
|
||||||
{
|
{
|
||||||
Create( parent, NULL, NULL, id, pos, size, style, name, attribList, palette );
|
Create( parent, NULL, NULL, id, pos, size, style, name, attribList, palette );
|
||||||
}
|
}
|
||||||
@@ -256,9 +259,9 @@ wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
|||||||
const wxGLContext *shared,
|
const wxGLContext *shared,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette )
|
const wxPalette& palette )
|
||||||
{
|
{
|
||||||
Create( parent, shared, NULL, id, pos, size, style, name, attribList, palette );
|
Create( parent, shared, NULL, id, pos, size, style, name, attribList, palette );
|
||||||
}
|
}
|
||||||
@@ -267,9 +270,9 @@ wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
|||||||
const wxGLCanvas *shared,
|
const wxGLCanvas *shared,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette )
|
const wxPalette& palette )
|
||||||
{
|
{
|
||||||
Create( parent, NULL, shared, id, pos, size, style, name, attribList, palette );
|
Create( parent, NULL, shared, id, pos, size, style, name, attribList, palette );
|
||||||
}
|
}
|
||||||
@@ -279,9 +282,9 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
const wxGLCanvas *shared_context_of,
|
const wxGLCanvas *shared_context_of,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette)
|
const wxPalette& palette)
|
||||||
{
|
{
|
||||||
m_sharedContext = (wxGLContext*)shared; // const_cast
|
m_sharedContext = (wxGLContext*)shared; // const_cast
|
||||||
m_sharedContextOf = (wxGLCanvas*)shared_context_of; // const_cast
|
m_sharedContextOf = (wxGLCanvas*)shared_context_of; // const_cast
|
||||||
@@ -292,16 +295,19 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
m_nativeSizeEvent = TRUE;
|
m_nativeSizeEvent = TRUE;
|
||||||
|
|
||||||
XVisualInfo *vi = NULL;
|
XVisualInfo *vi = NULL;
|
||||||
if (wxTheApp->m_glVisualInfo != NULL) {
|
if (wxTheApp->m_glVisualInfo != NULL)
|
||||||
|
{
|
||||||
vi = (XVisualInfo *) wxTheApp->m_glVisualInfo;
|
vi = (XVisualInfo *) wxTheApp->m_glVisualInfo;
|
||||||
m_canFreeVi = FALSE; // owned by wxTheApp - don't free upon destruction
|
m_canFreeVi = FALSE; // owned by wxTheApp - don't free upon destruction
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
vi = (XVisualInfo *) ChooseGLVisual(attribList);
|
vi = (XVisualInfo *) ChooseGLVisual(attribList);
|
||||||
m_canFreeVi = TRUE;
|
m_canFreeVi = TRUE;
|
||||||
}
|
}
|
||||||
m_vi = vi; // save for later use
|
m_vi = vi; // save for later use
|
||||||
|
|
||||||
wxCHECK_MSG( m_vi, FALSE, "required visual couldn't be found" );
|
wxCHECK_MSG( m_vi, FALSE, _T("required visual couldn't be found") );
|
||||||
|
|
||||||
GdkVisual *visual = gdkx_visual_get( vi->visualid );
|
GdkVisual *visual = gdkx_visual_get( vi->visualid );
|
||||||
GdkColormap *colormap = gdk_colormap_new( gdkx_visual_get(vi->visualid), TRUE );
|
GdkColormap *colormap = gdk_colormap_new( gdkx_visual_get(vi->visualid), TRUE );
|
||||||
@@ -365,7 +371,7 @@ void* wxGLCanvas::ChooseGLVisual(int *attribList)
|
|||||||
data[10] = GLX_ALPHA_SIZE; data[11] = 0;
|
data[10] = GLX_ALPHA_SIZE; data[11] = 0;
|
||||||
data[12] = None;
|
data[12] = None;
|
||||||
|
|
||||||
attribList = (int*) data;
|
attribList = (int*) data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -421,7 +427,8 @@ void* wxGLCanvas::ChooseGLVisual(int *attribList)
|
|||||||
|
|
||||||
void wxGLCanvas::SwapBuffers()
|
void wxGLCanvas::SwapBuffers()
|
||||||
{
|
{
|
||||||
if (m_glContext) m_glContext->SwapBuffers();
|
if (m_glContext)
|
||||||
|
m_glContext->SwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||||
@@ -430,12 +437,14 @@ void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void wxGLCanvas::SetCurrent()
|
void wxGLCanvas::SetCurrent()
|
||||||
{
|
{
|
||||||
if (m_glContext) m_glContext->SetCurrent();
|
if (m_glContext)
|
||||||
|
m_glContext->SetCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::SetColour( const char *colour )
|
void wxGLCanvas::SetColour( const char *colour )
|
||||||
{
|
{
|
||||||
if (m_glContext) m_glContext->SetColour( colour );
|
if (m_glContext)
|
||||||
|
m_glContext->SetColour( colour );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::OnInternalIdle()
|
void wxGLCanvas::OnInternalIdle()
|
||||||
@@ -463,14 +472,18 @@ IMPLEMENT_CLASS(wxGLApp, wxApp)
|
|||||||
|
|
||||||
wxGLApp::~wxGLApp()
|
wxGLApp::~wxGLApp()
|
||||||
{
|
{
|
||||||
if (m_glVisualInfo) XFree(m_glVisualInfo);
|
if (m_glVisualInfo)
|
||||||
|
XFree(m_glVisualInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGLApp::InitGLVisual(int *attribList)
|
bool wxGLApp::InitGLVisual(int *attribList)
|
||||||
{
|
{
|
||||||
if (m_glVisualInfo) XFree(m_glVisualInfo);
|
if (m_glVisualInfo)
|
||||||
|
XFree(m_glVisualInfo);
|
||||||
|
|
||||||
m_glVisualInfo = wxGLCanvas::ChooseGLVisual(attribList);
|
m_glVisualInfo = wxGLCanvas::ChooseGLVisual(attribList);
|
||||||
return (m_glVisualInfo != NULL);
|
|
||||||
|
return m_glVisualInfo != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: glcanvas.cpp
|
// Name: gtk/glcanvas.cpp
|
||||||
// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWindows and GTK
|
// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWindows and GTK
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 17/08/98
|
// Created: 17/08/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Robert Roebling
|
// Copyright: (c) Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
@@ -24,7 +24,8 @@
|
|||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C"
|
||||||
|
{
|
||||||
#include "gtk/gtk.h"
|
#include "gtk/gtk.h"
|
||||||
#include "gdk/gdk.h"
|
#include "gdk/gdk.h"
|
||||||
#include "gdk/gdkx.h"
|
#include "gdk/gdkx.h"
|
||||||
@@ -59,11 +60,11 @@ wxGLContext::wxGLContext( bool WXUNUSED(isRGB), wxWindow *win, const wxPalette&
|
|||||||
wxGLCanvas *gc = (wxGLCanvas*) win;
|
wxGLCanvas *gc = (wxGLCanvas*) win;
|
||||||
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
||||||
|
|
||||||
wxCHECK_RET( vi, "invalid visual for OpenGl" );
|
wxCHECK_RET( vi, _T("invalid visual for OpenGl") );
|
||||||
|
|
||||||
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, None, GL_TRUE );
|
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, None, GL_TRUE );
|
||||||
|
|
||||||
wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
|
wxCHECK_RET( m_glContext, _T("Couldn't create OpenGl context") );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLContext::wxGLContext(
|
wxGLContext::wxGLContext(
|
||||||
@@ -78,14 +79,16 @@ wxGLContext::wxGLContext(
|
|||||||
wxGLCanvas *gc = (wxGLCanvas*) win;
|
wxGLCanvas *gc = (wxGLCanvas*) win;
|
||||||
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
||||||
|
|
||||||
wxCHECK_RET( vi, "invalid visual for OpenGl" );
|
wxCHECK_RET( vi, _T("invalid visual for OpenGl") );
|
||||||
|
|
||||||
if( other != 0 )
|
m_glContext = glXCreateContext( GDK_DISPLAY(), vi,
|
||||||
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, other->m_glContext, GL_TRUE );
|
other ? other->m_glContext : None,
|
||||||
else
|
GL_TRUE );
|
||||||
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, None, GL_TRUE );
|
|
||||||
|
|
||||||
wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
|
if ( !m_glContext )
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("Couldn't create OpenGl context") );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLContext::~wxGLContext()
|
wxGLContext::~wxGLContext()
|
||||||
@@ -245,9 +248,9 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
wxGLCanvas::wxGLCanvas( wxWindow *parent, wxWindowID id,
|
wxGLCanvas::wxGLCanvas( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette )
|
const wxPalette& palette )
|
||||||
{
|
{
|
||||||
Create( parent, NULL, NULL, id, pos, size, style, name, attribList, palette );
|
Create( parent, NULL, NULL, id, pos, size, style, name, attribList, palette );
|
||||||
}
|
}
|
||||||
@@ -256,9 +259,9 @@ wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
|||||||
const wxGLContext *shared,
|
const wxGLContext *shared,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette )
|
const wxPalette& palette )
|
||||||
{
|
{
|
||||||
Create( parent, shared, NULL, id, pos, size, style, name, attribList, palette );
|
Create( parent, shared, NULL, id, pos, size, style, name, attribList, palette );
|
||||||
}
|
}
|
||||||
@@ -267,9 +270,9 @@ wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
|||||||
const wxGLCanvas *shared,
|
const wxGLCanvas *shared,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette )
|
const wxPalette& palette )
|
||||||
{
|
{
|
||||||
Create( parent, NULL, shared, id, pos, size, style, name, attribList, palette );
|
Create( parent, NULL, shared, id, pos, size, style, name, attribList, palette );
|
||||||
}
|
}
|
||||||
@@ -279,9 +282,9 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
const wxGLCanvas *shared_context_of,
|
const wxGLCanvas *shared_context_of,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette)
|
const wxPalette& palette)
|
||||||
{
|
{
|
||||||
m_sharedContext = (wxGLContext*)shared; // const_cast
|
m_sharedContext = (wxGLContext*)shared; // const_cast
|
||||||
m_sharedContextOf = (wxGLCanvas*)shared_context_of; // const_cast
|
m_sharedContextOf = (wxGLCanvas*)shared_context_of; // const_cast
|
||||||
@@ -292,16 +295,19 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
m_nativeSizeEvent = TRUE;
|
m_nativeSizeEvent = TRUE;
|
||||||
|
|
||||||
XVisualInfo *vi = NULL;
|
XVisualInfo *vi = NULL;
|
||||||
if (wxTheApp->m_glVisualInfo != NULL) {
|
if (wxTheApp->m_glVisualInfo != NULL)
|
||||||
|
{
|
||||||
vi = (XVisualInfo *) wxTheApp->m_glVisualInfo;
|
vi = (XVisualInfo *) wxTheApp->m_glVisualInfo;
|
||||||
m_canFreeVi = FALSE; // owned by wxTheApp - don't free upon destruction
|
m_canFreeVi = FALSE; // owned by wxTheApp - don't free upon destruction
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
vi = (XVisualInfo *) ChooseGLVisual(attribList);
|
vi = (XVisualInfo *) ChooseGLVisual(attribList);
|
||||||
m_canFreeVi = TRUE;
|
m_canFreeVi = TRUE;
|
||||||
}
|
}
|
||||||
m_vi = vi; // save for later use
|
m_vi = vi; // save for later use
|
||||||
|
|
||||||
wxCHECK_MSG( m_vi, FALSE, "required visual couldn't be found" );
|
wxCHECK_MSG( m_vi, FALSE, _T("required visual couldn't be found") );
|
||||||
|
|
||||||
GdkVisual *visual = gdkx_visual_get( vi->visualid );
|
GdkVisual *visual = gdkx_visual_get( vi->visualid );
|
||||||
GdkColormap *colormap = gdk_colormap_new( gdkx_visual_get(vi->visualid), TRUE );
|
GdkColormap *colormap = gdk_colormap_new( gdkx_visual_get(vi->visualid), TRUE );
|
||||||
@@ -365,7 +371,7 @@ void* wxGLCanvas::ChooseGLVisual(int *attribList)
|
|||||||
data[10] = GLX_ALPHA_SIZE; data[11] = 0;
|
data[10] = GLX_ALPHA_SIZE; data[11] = 0;
|
||||||
data[12] = None;
|
data[12] = None;
|
||||||
|
|
||||||
attribList = (int*) data;
|
attribList = (int*) data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -421,7 +427,8 @@ void* wxGLCanvas::ChooseGLVisual(int *attribList)
|
|||||||
|
|
||||||
void wxGLCanvas::SwapBuffers()
|
void wxGLCanvas::SwapBuffers()
|
||||||
{
|
{
|
||||||
if (m_glContext) m_glContext->SwapBuffers();
|
if (m_glContext)
|
||||||
|
m_glContext->SwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||||
@@ -430,12 +437,14 @@ void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void wxGLCanvas::SetCurrent()
|
void wxGLCanvas::SetCurrent()
|
||||||
{
|
{
|
||||||
if (m_glContext) m_glContext->SetCurrent();
|
if (m_glContext)
|
||||||
|
m_glContext->SetCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::SetColour( const char *colour )
|
void wxGLCanvas::SetColour( const char *colour )
|
||||||
{
|
{
|
||||||
if (m_glContext) m_glContext->SetColour( colour );
|
if (m_glContext)
|
||||||
|
m_glContext->SetColour( colour );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::OnInternalIdle()
|
void wxGLCanvas::OnInternalIdle()
|
||||||
@@ -463,14 +472,18 @@ IMPLEMENT_CLASS(wxGLApp, wxApp)
|
|||||||
|
|
||||||
wxGLApp::~wxGLApp()
|
wxGLApp::~wxGLApp()
|
||||||
{
|
{
|
||||||
if (m_glVisualInfo) XFree(m_glVisualInfo);
|
if (m_glVisualInfo)
|
||||||
|
XFree(m_glVisualInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGLApp::InitGLVisual(int *attribList)
|
bool wxGLApp::InitGLVisual(int *attribList)
|
||||||
{
|
{
|
||||||
if (m_glVisualInfo) XFree(m_glVisualInfo);
|
if (m_glVisualInfo)
|
||||||
|
XFree(m_glVisualInfo);
|
||||||
|
|
||||||
m_glVisualInfo = wxGLCanvas::ChooseGLVisual(attribList);
|
m_glVisualInfo = wxGLCanvas::ChooseGLVisual(attribList);
|
||||||
return (m_glVisualInfo != NULL);
|
|
||||||
|
return m_glVisualInfo != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user