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