CallbackGraphicsWindow on Linux, but there are issues

This commit is contained in:
David Rose 2012-01-10 01:09:48 +00:00
parent 191863995a
commit ce8af6bc29
3 changed files with 26 additions and 2 deletions

View File

@ -119,10 +119,19 @@ else:
if 'gsg' in kw:
gsg = kw['gsg']
del kw['gsg']
attribList = kw.get('attribList', None)
if attribList is None:
attribList = [
wxgl.WX_GL_RGBA, True,
wxgl.WX_GL_LEVEL, 0,
wxgl.WX_GL_DOUBLEBUFFER, True,
]
kw['attribList'] = attribList
base.startWx()
wxgl.GLCanvas.__init__(self, *args, **kw)
# Can't share the GSG when a new wxgl.GLContext is created
# automatically.
gsg = None
@ -259,7 +268,7 @@ else:
# Choose the best implementation of WxPandaWindow for the platform.
WxPandaWindow = None
if platform.system() == 'Darwin':
if platform.system() == 'Darwin': # or platform.system() == 'Linux':
WxPandaWindow = OpenGLPandaWindow
if not WxPandaWindow:

View File

@ -205,3 +205,17 @@ make_output(const string &name,
// Nothing else left to try.
return NULL;
}
////////////////////////////////////////////////////////////////////
// Function: glxGraphicsPipe::make_callback_gsg
// Access: Protected, Virtual
// Description: This is called when make_output() is used to create a
// CallbackGraphicsWindow. If the GraphicsPipe can
// construct a GSG that's not associated with any
// particular window object, do so now, assuming the
// correct graphics context has been set up externally.
////////////////////////////////////////////////////////////////////
PT(GraphicsStateGuardian) glxGraphicsPipe::
make_callback_gsg(GraphicsEngine *engine) {
return new glxGraphicsStateGuardian(engine, this, NULL);
}

View File

@ -95,6 +95,7 @@ protected:
GraphicsOutput *host,
int retry,
bool &precertify);
virtual PT(GraphicsStateGuardian) make_callback_gsg(GraphicsEngine *engine);
public:
static TypeHandle get_class_type() {