mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
CallbackGraphicsWindow on Linux, but there are issues
This commit is contained in:
parent
191863995a
commit
ce8af6bc29
@ -120,6 +120,15 @@ else:
|
|||||||
gsg = kw['gsg']
|
gsg = kw['gsg']
|
||||||
del 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()
|
base.startWx()
|
||||||
wxgl.GLCanvas.__init__(self, *args, **kw)
|
wxgl.GLCanvas.__init__(self, *args, **kw)
|
||||||
|
|
||||||
@ -259,7 +268,7 @@ else:
|
|||||||
|
|
||||||
# Choose the best implementation of WxPandaWindow for the platform.
|
# Choose the best implementation of WxPandaWindow for the platform.
|
||||||
WxPandaWindow = None
|
WxPandaWindow = None
|
||||||
if platform.system() == 'Darwin':
|
if platform.system() == 'Darwin': # or platform.system() == 'Linux':
|
||||||
WxPandaWindow = OpenGLPandaWindow
|
WxPandaWindow = OpenGLPandaWindow
|
||||||
|
|
||||||
if not WxPandaWindow:
|
if not WxPandaWindow:
|
||||||
|
@ -205,3 +205,17 @@ make_output(const string &name,
|
|||||||
// Nothing else left to try.
|
// Nothing else left to try.
|
||||||
return NULL;
|
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,
|
GraphicsOutput *host,
|
||||||
int retry,
|
int retry,
|
||||||
bool &precertify);
|
bool &precertify);
|
||||||
|
virtual PT(GraphicsStateGuardian) make_callback_gsg(GraphicsEngine *engine);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TypeHandle get_class_type() {
|
static TypeHandle get_class_type() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user