diff --git a/Projects/CodeBlocks/SleepyHead.depend b/Projects/CodeBlocks/SleepyHead.depend index 42b4eadb..37a38856 100644 --- a/Projects/CodeBlocks/SleepyHead.depend +++ b/Projects/CodeBlocks/SleepyHead.depend @@ -8309,7 +8309,7 @@ 1308026543 D -1308106147 /home/mark/projects/git/sleepyhead/src/version.h +1308108253 /home/mark/projects/git/sleepyhead/src/version.h 1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed @@ -8361,7 +8361,7 @@ "sleeplib/profiles.h" "sleeplib/machine_loader.h" -1308104848 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp +1308106542 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp "freetype-gl/font-manager.h" "freetype-gl/texture-font.h" "graph.h" @@ -11046,7 +11046,7 @@ "texture-glyph.h" -1308032101 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/vertex-buffer.cpp +1308107127 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/vertex-buffer.cpp @@ -11067,7 +11067,7 @@ -1308100135 source:/home/mark/projects/git/sleepyhead/src/graphs/gl_pbuffer.cpp +1308106486 source:/home/mark/projects/git/sleepyhead/src/graphs/gl_pbuffer.cpp "gl_pbuffer.h" diff --git a/src/graphs/gl_pbuffer.cpp b/src/graphs/gl_pbuffer.cpp index 98eabede..ec05fc52 100644 --- a/src/graphs/gl_pbuffer.cpp +++ b/src/graphs/gl_pbuffer.cpp @@ -133,7 +133,7 @@ pBufferWGL::pBufferWGL(int width, int height) // compare w & h to m_width & m_height. - wglMakeCurrent(hdc,hGlRc); + /* wglMakeCurrent(hdc,hGlRc); glEnable(GL_TEXTURE_2D); // Enable Texture Mapping glEnable(GL_BLEND); @@ -146,7 +146,7 @@ pBufferWGL::pBufferWGL(int width, int height) glLoadIdentity(); glClearColor(0,0,0,1); - glClear(GL_COLOR_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT); */ // switch back to the screen context @@ -174,7 +174,9 @@ void pBufferWGL::UseBuffer(bool b) bool pBufferWGL::InitGLStuff() { - wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); + + // Technically don't need this wrangling with glewInit being actually called now.... + //wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); char *ext = NULL; if (wglGetExtensionsStringARB) @@ -188,11 +190,11 @@ bool pBufferWGL::InitGLStuff() wxLogError(wxT("WGL_ARB_pbuffer extension was not found")); return false; } else { - wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC)wglGetProcAddress("wglCreatePbufferARB"); - wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC)wglGetProcAddress("wglGetPbufferDCARB"); - wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC)wglGetProcAddress("wglReleasePbufferDCARB"); - wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC)wglGetProcAddress("wglDestroyPbufferARB"); - wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC)wglGetProcAddress("wglQueryPbufferARB"); + //wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC)wglGetProcAddress("wglCreatePbufferARB"); + //wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC)wglGetProcAddress("wglGetPbufferDCARB"); + //wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC)wglGetProcAddress("wglReleasePbufferDCARB"); + //wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC)wglGetProcAddress("wglDestroyPbufferARB"); + //wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC)wglGetProcAddress("wglQueryPbufferARB"); if (!wglCreatePbufferARB || !wglGetPbufferDCARB || !wglReleasePbufferDCARB || !wglDestroyPbufferARB || !wglQueryPbufferARB) { diff --git a/src/graphs/graph.cpp b/src/graphs/graph.cpp index fb82881c..971d4848 100644 --- a/src/graphs/graph.cpp +++ b/src/graphs/graph.cpp @@ -64,6 +64,10 @@ TextMarkup *markup=NULL; // Must be called from a thread inside the application. void GraphInit() { + #if defined(__WXMSW__) + glewInit(); // Dont forget this nasty little sucker.. :) + #endif + if (!gfont_init) { font_manager=new FontManager(); vbuffer=new VertexBuffer((char *)"v3i:t2f:c4f"); @@ -134,9 +138,7 @@ void DrawText2(wxString text, float x, float y,TextureFont *font) glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); glEnable( GL_TEXTURE_2D ); glColor4f(1,1,1,1); - #if !defined(__WXMSW__) vbuffer->Render(GL_TRIANGLES, (char *)"vtc" ); - #endif glDisable(GL_BLEND); } diff --git a/src/libs/freetype-gl/vertex-buffer.cpp b/src/libs/freetype-gl/vertex-buffer.cpp index 5648928a..ad081be8 100644 --- a/src/libs/freetype-gl/vertex-buffer.cpp +++ b/src/libs/freetype-gl/vertex-buffer.cpp @@ -107,6 +107,11 @@ VertexBuffer::~VertexBuffer() void VertexBuffer::Upload() { + if (!glGenBuffers) { + printf("WHAT???"); + assert(false); + return; + } if (!vertices_id) { glGenBuffers(1, &vertices_id); } diff --git a/src/version.h b/src/version.h index 607038e9..a23446d7 100644 --- a/src/version.h +++ b/src/version.h @@ -16,14 +16,14 @@ namespace AutoVersion{ //Standard Version Type static const long _MAJOR = 0; static const long _MINOR = 7; - static const long _BUILD = 5910; - static const long _REVISION = 15610; + static const long _BUILD = 5918; + static const long _REVISION = 15644; //Miscellaneous Version Types - static const long _BUILDS_COUNT = 6353; - #define _RC_FILEVERSION 0,7,5910,15610 - #define _RC_FILEVERSION_STRING "0, 7, 5910, 15610\0" - static const char _FULLVERSION_STRING[] = "0.7.5910.15610"; + static const long _BUILDS_COUNT = 6363; + #define _RC_FILEVERSION 0,7,5918,15644 + #define _RC_FILEVERSION_STRING "0, 7, 5918, 15644\0" + static const char _FULLVERSION_STRING[] = "0.7.5918.15644"; //These values are to keep track of your versioning state, don't modify them. static const long _BUILD_HISTORY = 0;