mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-19 04:00:45 +00:00
Linux wx2.9 RenderPixmap fix
This commit is contained in:
parent
c7aeb5bc57
commit
70b7030b6f
@ -8312,7 +8312,7 @@
|
|||||||
|
|
||||||
1308026543 D
|
1308026543 D
|
||||||
|
|
||||||
1308080044 /home/mark/projects/git/sleepyhead/src/version.h
|
1308081125 /home/mark/projects/git/sleepyhead/src/version.h
|
||||||
|
|
||||||
1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed
|
1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed
|
||||||
<wx/dcbuffer.h>
|
<wx/dcbuffer.h>
|
||||||
@ -8364,7 +8364,7 @@
|
|||||||
"sleeplib/profiles.h"
|
"sleeplib/profiles.h"
|
||||||
"sleeplib/machine_loader.h"
|
"sleeplib/machine_loader.h"
|
||||||
|
|
||||||
1308073105 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
|
1308080954 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
|
||||||
<wx/dcbuffer.h>
|
<wx/dcbuffer.h>
|
||||||
<wx/settings.h>
|
<wx/settings.h>
|
||||||
<wx/graphics.h>
|
<wx/graphics.h>
|
||||||
|
@ -940,6 +940,8 @@ wxBitmap * gGraphWindow::RenderBitmap(int width,int height)
|
|||||||
display=wxGetX11Display();
|
display=wxGetX11Display();
|
||||||
fbc = GetGLXFBConfig();
|
fbc = GetGLXFBConfig();
|
||||||
fbc = &fbc[0];
|
fbc = &fbc[0];
|
||||||
|
GLXPbuffer pBuffer=glXCreatePbuffer(display, fbc[0], attrib );
|
||||||
|
|
||||||
#else
|
#else
|
||||||
display=(Display *)wxGetDisplay();
|
display=(Display *)wxGetDisplay();
|
||||||
int doubleBufferAttributess[] = {
|
int doubleBufferAttributess[] = {
|
||||||
@ -952,6 +954,7 @@ wxBitmap * gGraphWindow::RenderBitmap(int width,int height)
|
|||||||
None
|
None
|
||||||
};
|
};
|
||||||
fbc=glXChooseFBConfig(display, DefaultScreen(display), doubleBufferAttributess, &ret);
|
fbc=glXChooseFBConfig(display, DefaultScreen(display), doubleBufferAttributess, &ret);
|
||||||
|
GLXPbuffer pBuffer=glXCreatePbuffer(display, *fbc, attrib );
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// have to setup a GLXFBConfig structure for wx2.8 because wx2.8 is crap.
|
// have to setup a GLXFBConfig structure for wx2.8 because wx2.8 is crap.
|
||||||
@ -959,7 +962,6 @@ wxBitmap * gGraphWindow::RenderBitmap(int width,int height)
|
|||||||
// return &wxNullBitmap;
|
// return &wxNullBitmap;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GLXPbuffer pBuffer=glXCreatePbuffer(display, *fbc, attrib );
|
|
||||||
if (pBuffer == 0) {
|
if (pBuffer == 0) {
|
||||||
wxLogError(wxT("pBuffer not availble"));
|
wxLogError(wxT("pBuffer not availble"));
|
||||||
}
|
}
|
||||||
@ -981,9 +983,10 @@ wxBitmap * gGraphWindow::RenderBitmap(int width,int height)
|
|||||||
wxLogError(wxT("CX not availble"));
|
wxLogError(wxT("CX not availble"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
#if !wxCHECK_VERSION(2,9,0)
|
||||||
XFree(fbc);
|
XFree(fbc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (glXMakeCurrent(display,pBuffer,cx)!=True) {
|
if (glXMakeCurrent(display,pBuffer,cx)!=True) {
|
||||||
wxLogError(wxT("Couldn't make buffer current"));
|
wxLogError(wxT("Couldn't make buffer current"));
|
||||||
}
|
}
|
||||||
@ -1016,8 +1019,10 @@ wxBitmap * gGraphWindow::RenderBitmap(int width,int height)
|
|||||||
wglDeleteContext(hGlRc);
|
wglDeleteContext(hGlRc);
|
||||||
wglReleasePbufferDCARB(hBuffer, hdc);
|
wglReleasePbufferDCARB(hBuffer, hdc);
|
||||||
wglDestroyPbufferARB(hBuffer);
|
wglDestroyPbufferARB(hBuffer);
|
||||||
#elif !defined(__WXMAC__) && defined (__UNIX__)
|
#elif defined(__DARWIN__) || defined (__WXMAC__)
|
||||||
if (gx) glXDestroyContext(display,gx);
|
|
||||||
|
#elif !defined(__WXMAC__) && defined (__UNIX__) // Linux
|
||||||
|
if (gx) glXDestroyContext(display,gx); // Destroy the context only if we created it..
|
||||||
glXDestroyPbuffer(display, pBuffer);
|
glXDestroyPbuffer(display, pBuffer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,14 +16,14 @@ namespace AutoVersion{
|
|||||||
//Standard Version Type
|
//Standard Version Type
|
||||||
static const long _MAJOR = 0;
|
static const long _MAJOR = 0;
|
||||||
static const long _MINOR = 7;
|
static const long _MINOR = 7;
|
||||||
static const long _BUILD = 5740;
|
static const long _BUILD = 5742;
|
||||||
static const long _REVISION = 14700;
|
static const long _REVISION = 14712;
|
||||||
|
|
||||||
//Miscellaneous Version Types
|
//Miscellaneous Version Types
|
||||||
static const long _BUILDS_COUNT = 6058;
|
static const long _BUILDS_COUNT = 6072;
|
||||||
#define _RC_FILEVERSION 0,7,5740,14700
|
#define _RC_FILEVERSION 0,7,5742,14712
|
||||||
#define _RC_FILEVERSION_STRING "0, 7, 5740, 14700\0"
|
#define _RC_FILEVERSION_STRING "0, 7, 5742, 14712\0"
|
||||||
static const char _FULLVERSION_STRING[] = "0.7.5740.14700";
|
static const char _FULLVERSION_STRING[] = "0.7.5742.14712";
|
||||||
|
|
||||||
//These values are to keep track of your versioning state, don't modify them.
|
//These values are to keep track of your versioning state, don't modify them.
|
||||||
static const long _BUILD_HISTORY = 0;
|
static const long _BUILD_HISTORY = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user