mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
CallbackGraphicsWindow on Linux, but there are issues
This commit is contained in:
parent
191863995a
commit
ce8af6bc29
@ -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:
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user