pBuffer Stuff

This commit is contained in:
Mark Watkins 2011-06-18 13:51:07 +10:00
parent 6d07462664
commit 0f4a7cbf39
7 changed files with 26 additions and 26 deletions

View File

@ -29,14 +29,12 @@
<Option compiler="gcc" /> <Option compiler="gcc" />
<Option projectLinkerOptionsRelation="2" /> <Option projectLinkerOptionsRelation="2" />
<Compiler> <Compiler>
<Add option="-pg" />
<Add option="-g" /> <Add option="-g" />
<Add option="`wx-config --version=2.9 --cflags`" /> <Add option="`wx-config --version=2.9 --cflags`" />
<Add directory="../../src/libs" /> <Add directory="../../src/libs" />
<Add directory="../../src" /> <Add directory="../../src" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-pg" />
<Add option="`wx-config --version=2.9 --libs aui,xrc,qa,html,adv,gl,core,net,base`" /> <Add option="`wx-config --version=2.9 --libs aui,xrc,qa,html,adv,gl,core,net,base`" />
</Linker> </Linker>
</Target> </Target>

View File

@ -8309,7 +8309,7 @@
1308026543 D 1308026543 D
1308343669 /home/mark/projects/git/sleepyhead/src/version.h 1308368377 /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>
@ -11061,7 +11061,7 @@
<string.h> <string.h>
"freetype-gl/vector.h" "freetype-gl/vector.h"
1308311222 /home/mark/projects/git/sleepyhead/src/graphs/gl_pbuffer.h 1308368376 /home/mark/projects/git/sleepyhead/src/graphs/gl_pbuffer.h
<wx/log.h> <wx/log.h>
<GL/glew.h> <GL/glew.h>
<GL/wglew.h> <GL/wglew.h>
@ -11072,6 +11072,7 @@
<GL/gl.h> <GL/gl.h>
<GL/glx.h> <GL/glx.h>
<wx/bitmap.h> <wx/bitmap.h>
<wx/glcanvas.h>
1308337622 source:/home/mark/projects/git/sleepyhead/src/graphs/gl_pbuffer.cpp 1308337622 source:/home/mark/projects/git/sleepyhead/src/graphs/gl_pbuffer.cpp
"gl_pbuffer.h" "gl_pbuffer.h"

View File

@ -7,10 +7,10 @@
<File name="../../src/GUIFrame.h" open="0" top="0" tabpos="8"> <File name="../../src/GUIFrame.h" open="0" top="0" tabpos="8">
<Cursor position="3128" topLine="100" /> <Cursor position="3128" topLine="100" />
</File> </File>
<File name="../../src/SleepyHeadApp.cpp" open="0" top="0" tabpos="1"> <File name="../../src/SleepyHeadApp.cpp" open="1" top="0" tabpos="1">
<Cursor position="1078" topLine="44" /> <Cursor position="1078" topLine="44" />
</File> </File>
<File name="../../src/SleepyHeadMain.cpp" open="1" top="1" tabpos="1"> <File name="../../src/SleepyHeadMain.cpp" open="1" top="0" tabpos="1">
<Cursor position="24248" topLine="650" /> <Cursor position="24248" topLine="650" />
</File> </File>
<File name="../../src/SleepyHeadMain.h" open="1" top="0" tabpos="2"> <File name="../../src/SleepyHeadMain.h" open="1" top="0" tabpos="2">
@ -19,7 +19,7 @@
<File name="../../src/graphs/gl_pbuffer.cpp" open="1" top="0" tabpos="5"> <File name="../../src/graphs/gl_pbuffer.cpp" open="1" top="0" tabpos="5">
<Cursor position="3" topLine="0" /> <Cursor position="3" topLine="0" />
</File> </File>
<File name="../../src/graphs/gl_pbuffer.h" open="1" top="0" tabpos="6"> <File name="../../src/graphs/gl_pbuffer.h" open="1" top="1" tabpos="6">
<Cursor position="401" topLine="0" /> <Cursor position="401" topLine="0" />
</File> </File>
<File name="../../src/graphs/graph.cpp" open="1" top="0" tabpos="3"> <File name="../../src/graphs/graph.cpp" open="1" top="0" tabpos="3">

View File

@ -30,7 +30,7 @@ long roundup2(long v)
pBuffer::pBuffer() pBuffer::pBuffer()
{ {
} }
pBuffer::pBuffer(int width, int height) pBuffer::pBuffer(int width, int height,wxGLCanvas * gc)
:m_width(width),m_height(height) :m_width(width),m_height(height)
{ {
} }
@ -56,7 +56,7 @@ wxBitmap *pBuffer::Snapshot(int width, int height)
} }
FBO::FBO(int width, int height) FBO::FBO(int width, int height,wxGLCanvas * gc)
:pBuffer() :pBuffer()
{ {
//wxGLContext a((wxGLCanvas *)NULL,(wxGLContext *)NULL); //wxGLContext a((wxGLCanvas *)NULL,(wxGLContext *)NULL);
@ -173,7 +173,7 @@ wxBitmap *FBO::Snapshot(int width,int height)
#endif #endif
pBufferWGL::pBufferWGL(int width, int height) pBufferWGL::pBufferWGL(int width, int height,wxGLCanvas * gc)
:m_texture(0) :m_texture(0)
{ {
@ -368,7 +368,7 @@ bool pBufferWGL::InitGLStuff()
GLXContext real_shared_context=NULL; GLXContext real_shared_context=NULL;
pBufferGLX::pBufferGLX(int width, int height) pBufferGLX::pBufferGLX(int width, int height,wxGLCanvas * gc)
:pBuffer() :pBuffer()
{ {
@ -461,7 +461,7 @@ void pBufferGLX::UseBuffer(bool b)
} }
#elif defined(__DARWIN__) || defined(__WXMAC__) #elif defined(__DARWIN__) || defined(__WXMAC__)
pBufferAGL::pBufferAGL(int width, int height) pBufferAGL::pBufferAGL(int width, int height,wxGLCanvas * gc)
:pBuffer() :pBuffer()
{ {
m_width=width; m_width=width;

View File

@ -43,6 +43,7 @@ License: GPL
#define MAX(a,b) (((a)<(b)) ? (b) : (a)); #define MAX(a,b) (((a)<(b)) ? (b) : (a));
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/glcanvas.h>
long roundup2(long v); long roundup2(long v);
@ -56,7 +57,7 @@ public:
class pBuffer { class pBuffer {
public: public:
pBuffer(); pBuffer();
pBuffer(int width, int height); pBuffer(int width, int height,wxGLCanvas * gc);
virtual ~pBuffer(); virtual ~pBuffer();
virtual void UseBuffer(bool b) {}; virtual void UseBuffer(bool b) {};
int Width() { return m_width; }; int Width() { return m_width; };
@ -70,7 +71,7 @@ protected:
class FBO:public pBuffer class FBO:public pBuffer
{ {
public: public:
FBO(int width, int height); FBO(int width, int height,wxGLCanvas * gc);
virtual ~FBO(); virtual ~FBO();
virtual void UseBuffer(bool b); virtual void UseBuffer(bool b);
virtual wxBitmap *Snapshot(int width, int height); virtual wxBitmap *Snapshot(int width, int height);
@ -87,7 +88,7 @@ protected:
class pBufferWGL:public pBuffer class pBufferWGL:public pBuffer
{ {
public: public:
pBufferWGL(int width, int height); pBufferWGL(int width, int height,wxGLCanvas * gc);
virtual ~pBufferWGL(); virtual ~pBufferWGL();
virtual void UseBuffer(bool b); virtual void UseBuffer(bool b);
protected: protected:
@ -112,7 +113,7 @@ extern GLXContext real_shared_context;
class pBufferGLX:public pBuffer class pBufferGLX:public pBuffer
{ {
public: public:
pBufferGLX(int width, int height); pBufferGLX(int width, int height,wxGLCanvas * gc);
virtual ~pBufferGLX(); virtual ~pBufferGLX();
virtual void UseBuffer(bool b); virtual void UseBuffer(bool b);
protected: protected:
@ -127,7 +128,7 @@ protected:
class pBufferAGL:public pBuffer class pBufferAGL:public pBuffer
{ {
public: public:
pBufferAGL(int width, int height); pBufferAGL(int width, int height,wxGLCanvas * gc);
virtual ~pBufferAGL(); virtual ~pBufferAGL();
virtual void UseBuffer(bool b); virtual void UseBuffer(bool b);
protected: protected:

View File

@ -1017,13 +1017,13 @@ wxBitmap * gGraphWindow::RenderBitmap(int width,int height)
if (!pbuffer) { if (!pbuffer) {
try { try {
#if defined(__WXMSW__) #if defined(__WXMSW__)
pbuffer=new pBufferWGL(width,height); pbuffer=new pBufferWGL(width,height,this);
#elif defined(__WXMAC__) || defined(__WXDARWIN__) #elif defined(__WXMAC__) || defined(__WXDARWIN__)
// Do nothing and load the FBO // Do nothing and load the FBO
throw GLException(wxT("Macintrash")); throw GLException(wxT("Macintrash"));
//pbuffer=new pBufferAGL(width,height); //pbuffer=new pBufferAGL(width,height);
#elif defined(__UNIX__) #elif defined(__UNIX__)
pbuffer=new pBufferGLX(width,height); pbuffer=new pBufferGLX(width,height,this);
#endif #endif
} catch(GLException e) { } catch(GLException e) {
@ -1039,7 +1039,7 @@ wxBitmap * gGraphWindow::RenderBitmap(int width,int height)
// Trickier than it sounds, and I didn't want to kludge // Trickier than it sounds, and I didn't want to kludge
wxSize res=wxGetDisplaySize(); // Not entirely sure if this is the limit.. wxSize res=wxGetDisplaySize(); // Not entirely sure if this is the limit..
pbuffer=new FBO(res.GetWidth(),res.GetHeight()); pbuffer=new FBO(res.GetWidth(),res.GetHeight(),this);
} catch(GLException e) { } catch(GLException e) {
wxLogError(wxT("No offscreen rendering capabilities detected on this machine.")); wxLogError(wxT("No offscreen rendering capabilities detected on this machine."));
pbuffer=NULL; pbuffer=NULL;

View File

@ -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 = 6645; static const long _BUILD = 6650;
static const long _REVISION = 19581; static const long _REVISION = 19612;
//Miscellaneous Version Types //Miscellaneous Version Types
static const long _BUILDS_COUNT = 8090; static const long _BUILDS_COUNT = 8104;
#define _RC_FILEVERSION 0,7,6645,19581 #define _RC_FILEVERSION 0,7,6650,19612
#define _RC_FILEVERSION_STRING "0, 7, 6645, 19581\0" #define _RC_FILEVERSION_STRING "0, 7, 6650, 19612\0"
static const char _FULLVERSION_STRING[] = "0.7.6645.19581"; static const char _FULLVERSION_STRING[] = "0.7.6650.19612";
//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;