- self.thisown = 0
- def __del__(self,glcanvasc=glcanvasc):
- if self.thisown == 1 :
- glcanvasc.delete_wxGLContext(self)
- def SetCurrent(self, *_args, **_kwargs):
- val = apply(glcanvasc.wxGLContext_SetCurrent,(self,) + _args, _kwargs)
- return val
- def SetColour(self, *_args, **_kwargs):
- val = apply(glcanvasc.wxGLContext_SetColour,(self,) + _args, _kwargs)
- return val
- def SwapBuffers(self, *_args, **_kwargs):
- val = apply(glcanvasc.wxGLContext_SwapBuffers,(self,) + _args, _kwargs)
- return val
- def SetupPixelFormat(self, *_args, **_kwargs):
- val = apply(glcanvasc.wxGLContext_SetupPixelFormat,(self,) + _args, _kwargs)
- return val
- def SetupPalette(self, *_args, **_kwargs):
- val = apply(glcanvasc.wxGLContext_SetupPalette,(self,) + _args, _kwargs)
- return val
- def CreateDefaultPalette(self, *_args, **_kwargs):
- val = apply(glcanvasc.wxGLContext_CreateDefaultPalette,(self,) + _args, _kwargs)
- if val: val = wxPalettePtr(val) ; val.thisown = 1
- return val
- def GetPalette(self, *_args, **_kwargs):
- val = apply(glcanvasc.wxGLContext_GetPalette,(self,) + _args, _kwargs)
- if val: val = wxPalettePtr(val)
- return val
- def GetWindow(self, *_args, **_kwargs):
- val = apply(glcanvasc.wxGLContext_GetWindow,(self,) + _args, _kwargs)
- return val
+ if not hasattr(self,"thisown"): self.thisown = 0
+ self.__class__ = GLContext
+_glcanvas.GLContext_swigregister(GLContextPtr)
+cvar = _glcanvas.cvar
+GLCanvasNameStr = cvar.GLCanvasNameStr
+
+WX_GL_RGBA = _glcanvas.WX_GL_RGBA
+WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE
+WX_GL_LEVEL = _glcanvas.WX_GL_LEVEL
+WX_GL_DOUBLEBUFFER = _glcanvas.WX_GL_DOUBLEBUFFER
+WX_GL_STEREO = _glcanvas.WX_GL_STEREO
+WX_GL_AUX_BUFFERS = _glcanvas.WX_GL_AUX_BUFFERS
+WX_GL_MIN_RED = _glcanvas.WX_GL_MIN_RED
+WX_GL_MIN_GREEN = _glcanvas.WX_GL_MIN_GREEN
+WX_GL_MIN_BLUE = _glcanvas.WX_GL_MIN_BLUE
+WX_GL_MIN_ALPHA = _glcanvas.WX_GL_MIN_ALPHA
+WX_GL_DEPTH_SIZE = _glcanvas.WX_GL_DEPTH_SIZE
+WX_GL_STENCIL_SIZE = _glcanvas.WX_GL_STENCIL_SIZE
+WX_GL_MIN_ACCUM_RED = _glcanvas.WX_GL_MIN_ACCUM_RED
+WX_GL_MIN_ACCUM_GREEN = _glcanvas.WX_GL_MIN_ACCUM_GREEN
+WX_GL_MIN_ACCUM_BLUE = _glcanvas.WX_GL_MIN_ACCUM_BLUE
+WX_GL_MIN_ACCUM_ALPHA = _glcanvas.WX_GL_MIN_ACCUM_ALPHA
+class GLCanvas(_core.Window):