2001-10-26 20:08:14 -04:00
|
|
|
# This file was created automatically by SWIG.
|
2003-11-12 16:34:20 -05:00
|
|
|
# Don't modify this file, modify the SWIG interface instead.
|
2001-10-26 20:08:14 -04:00
|
|
|
|
2004-05-15 12:26:50 -04:00
|
|
|
"""
|
|
|
|
`GLCanvas` provides an OpenGL Context on a `wx.Window`.
|
|
|
|
"""
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
import _glcanvas
|
2001-10-26 20:08:14 -04:00
|
|
|
|
2004-12-23 16:46:51 -05:00
|
|
|
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
|
|
|
|
if (name == "this"):
|
|
|
|
if isinstance(value, class_type):
|
|
|
|
self.__dict__[name] = value.this
|
|
|
|
if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
|
|
|
|
del value.thisown
|
|
|
|
return
|
|
|
|
method = class_type.__swig_setmethods__.get(name,None)
|
|
|
|
if method: return method(self,value)
|
|
|
|
if (not static) or hasattr(self,name) or (name == "thisown"):
|
|
|
|
self.__dict__[name] = value
|
|
|
|
else:
|
|
|
|
raise AttributeError("You cannot add attributes to %s" % self)
|
|
|
|
|
|
|
|
def _swig_setattr(self,class_type,name,value):
|
|
|
|
return _swig_setattr_nondynamic(self,class_type,name,value,0)
|
|
|
|
|
|
|
|
def _swig_getattr(self,class_type,name):
|
|
|
|
method = class_type.__swig_getmethods__.get(name,None)
|
|
|
|
if method: return method(self)
|
|
|
|
raise AttributeError,name
|
|
|
|
|
|
|
|
import types
|
|
|
|
try:
|
|
|
|
_object = types.ObjectType
|
|
|
|
_newclass = 1
|
|
|
|
except AttributeError:
|
|
|
|
class _object : pass
|
|
|
|
_newclass = 0
|
|
|
|
del types
|
|
|
|
|
|
|
|
|
|
|
|
def _swig_setattr_nondynamic_method(set):
|
|
|
|
def set_attr(self,name,value):
|
|
|
|
if hasattr(self,name) or (name in ("this", "thisown")):
|
|
|
|
set(self,name,value)
|
|
|
|
else:
|
|
|
|
raise AttributeError("You cannot add attributes to %s" % self)
|
|
|
|
return set_attr
|
|
|
|
|
|
|
|
|
2004-04-25 03:03:15 -04:00
|
|
|
import _core
|
|
|
|
wx = _core
|
2004-05-01 23:32:57 -04:00
|
|
|
__docfilter__ = wx.__DocFilter(globals())
|
2004-04-25 03:03:15 -04:00
|
|
|
class GLContext(_core.Object):
|
2004-12-23 16:46:51 -05:00
|
|
|
"""Proxy of C++ GLContext class"""
|
2003-11-19 13:38:16 -05:00
|
|
|
def __repr__(self):
|
|
|
|
return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
2003-11-12 16:34:20 -05:00
|
|
|
def __init__(self, *args, **kwargs):
|
2003-11-26 20:17:54 -05:00
|
|
|
"""
|
2004-04-24 20:47:48 -04:00
|
|
|
__init__(self, bool isRGB, GLCanvas win, wxPalette palette=wxNullPalette,
|
2003-11-26 20:17:54 -05:00
|
|
|
GLContext other=None) -> GLContext
|
|
|
|
"""
|
2003-11-12 16:34:20 -05:00
|
|
|
newobj = _glcanvas.new_GLContext(*args, **kwargs)
|
|
|
|
self.this = newobj.this
|
|
|
|
self.thisown = 1
|
|
|
|
del newobj.thisown
|
|
|
|
def __del__(self, destroy=_glcanvas.delete_GLContext):
|
2004-04-24 20:47:48 -04:00
|
|
|
"""__del__(self)"""
|
2003-11-12 16:34:20 -05:00
|
|
|
try:
|
|
|
|
if self.thisown: destroy(self)
|
|
|
|
except: pass
|
2003-11-19 13:38:16 -05:00
|
|
|
|
|
|
|
def SetCurrent(*args, **kwargs):
|
2004-04-24 20:47:48 -04:00
|
|
|
"""SetCurrent(self)"""
|
2003-11-19 13:38:16 -05:00
|
|
|
return _glcanvas.GLContext_SetCurrent(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetColour(*args, **kwargs):
|
2004-04-24 20:47:48 -04:00
|
|
|
"""SetColour(self, String colour)"""
|
2003-11-19 13:38:16 -05:00
|
|
|
return _glcanvas.GLContext_SetColour(*args, **kwargs)
|
|
|
|
|
|
|
|
def SwapBuffers(*args, **kwargs):
|
2004-04-24 20:47:48 -04:00
|
|
|
"""SwapBuffers(self)"""
|
2003-11-19 13:38:16 -05:00
|
|
|
return _glcanvas.GLContext_SwapBuffers(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetWindow(*args, **kwargs):
|
2004-04-24 20:47:48 -04:00
|
|
|
"""GetWindow(self) -> Window"""
|
2003-11-19 13:38:16 -05:00
|
|
|
return _glcanvas.GLContext_GetWindow(*args, **kwargs)
|
|
|
|
|
2001-10-26 20:08:14 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class GLContextPtr(GLContext):
|
|
|
|
def __init__(self, this):
|
2001-10-26 20:08:14 -04:00
|
|
|
self.this = this
|
2003-11-12 16:34:20 -05:00
|
|
|
if not hasattr(self,"thisown"): self.thisown = 0
|
|
|
|
self.__class__ = GLContext
|
|
|
|
_glcanvas.GLContext_swigregister(GLContextPtr)
|
2003-12-20 15:03:09 -05:00
|
|
|
cvar = _glcanvas.cvar
|
|
|
|
GLCanvasNameStr = cvar.GLCanvasNameStr
|
2003-11-12 16:34:20 -05:00
|
|
|
|
|
|
|
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
|
2004-04-25 03:03:15 -04:00
|
|
|
class GLCanvas(_core.Window):
|
2004-12-23 16:46:51 -05:00
|
|
|
"""Proxy of C++ GLCanvas class"""
|
2003-11-19 13:38:16 -05:00
|
|
|
def __repr__(self):
|
|
|
|
return "<%s.%s; proxy of C++ wxGLCanvas instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
2003-11-12 16:34:20 -05:00
|
|
|
def __init__(self, *args, **kwargs):
|
2003-11-26 20:17:54 -05:00
|
|
|
"""
|
2004-04-24 20:47:48 -04:00
|
|
|
__init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
|
2003-12-20 15:03:09 -05:00
|
|
|
Size size=DefaultSize, long style=0, String name=GLCanvasNameStr,
|
|
|
|
int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
|
2003-11-26 20:17:54 -05:00
|
|
|
"""
|
2003-11-12 16:34:20 -05:00
|
|
|
newobj = _glcanvas.new_GLCanvas(*args, **kwargs)
|
|
|
|
self.this = newobj.this
|
2001-10-26 20:08:14 -04:00
|
|
|
self.thisown = 1
|
2003-11-12 16:34:20 -05:00
|
|
|
del newobj.thisown
|
2001-10-26 20:08:14 -04:00
|
|
|
self._setOORInfo(self)
|
2003-11-19 13:38:16 -05:00
|
|
|
|
|
|
|
def SetCurrent(*args, **kwargs):
|
2004-04-24 20:47:48 -04:00
|
|
|
"""SetCurrent(self)"""
|
2003-11-19 13:38:16 -05:00
|
|
|
return _glcanvas.GLCanvas_SetCurrent(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetColour(*args, **kwargs):
|
2004-04-24 20:47:48 -04:00
|
|
|
"""SetColour(self, String colour)"""
|
2003-11-19 13:38:16 -05:00
|
|
|
return _glcanvas.GLCanvas_SetColour(*args, **kwargs)
|
|
|
|
|
|
|
|
def SwapBuffers(*args, **kwargs):
|
2004-04-24 20:47:48 -04:00
|
|
|
"""SwapBuffers(self)"""
|
2003-11-19 13:38:16 -05:00
|
|
|
return _glcanvas.GLCanvas_SwapBuffers(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetContext(*args, **kwargs):
|
2004-04-24 20:47:48 -04:00
|
|
|
"""GetContext(self) -> GLContext"""
|
2003-11-19 13:38:16 -05:00
|
|
|
return _glcanvas.GLCanvas_GetContext(*args, **kwargs)
|
|
|
|
|
2001-10-26 20:08:14 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class GLCanvasPtr(GLCanvas):
|
|
|
|
def __init__(self, this):
|
|
|
|
self.this = this
|
|
|
|
if not hasattr(self,"thisown"): self.thisown = 0
|
|
|
|
self.__class__ = GLCanvas
|
|
|
|
_glcanvas.GLCanvas_swigregister(GLCanvasPtr)
|
2001-10-26 20:08:14 -04:00
|
|
|
|
2004-01-26 21:38:53 -05:00
|
|
|
def GLCanvasWithContext(*args, **kwargs):
|
2003-11-26 20:17:54 -05:00
|
|
|
"""
|
2004-01-26 21:38:53 -05:00
|
|
|
GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition,
|
2003-11-26 20:17:54 -05:00
|
|
|
Size size=DefaultSize,
|
2003-12-20 15:03:09 -05:00
|
|
|
long style=0, String name=GLCanvasNameStr,
|
2003-11-26 20:17:54 -05:00
|
|
|
int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
|
|
|
|
"""
|
2004-01-26 21:38:53 -05:00
|
|
|
val = _glcanvas.new_GLCanvasWithContext(*args, **kwargs)
|
2001-10-26 20:08:14 -04:00
|
|
|
val.thisown = 1
|
2003-11-12 16:34:20 -05:00
|
|
|
val._setOORInfo(val)
|
2001-10-26 20:08:14 -04:00
|
|
|
return val
|
|
|
|
|
|
|
|
|