mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 04:00:44 +00:00
Windows OpenGL port Complete
It helps to actually remember to call glewInit() on MSW :)
This commit is contained in:
parent
aed08178d4
commit
d13a5d40fa
@ -8309,7 +8309,7 @@
|
|||||||
|
|
||||||
1308026543 D
|
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
|
1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed
|
||||||
<wx/dcbuffer.h>
|
<wx/dcbuffer.h>
|
||||||
@ -8361,7 +8361,7 @@
|
|||||||
"sleeplib/profiles.h"
|
"sleeplib/profiles.h"
|
||||||
"sleeplib/machine_loader.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/font-manager.h"
|
||||||
"freetype-gl/texture-font.h"
|
"freetype-gl/texture-font.h"
|
||||||
"graph.h"
|
"graph.h"
|
||||||
@ -11046,7 +11046,7 @@
|
|||||||
<GL/glew.h>
|
<GL/glew.h>
|
||||||
"texture-glyph.h"
|
"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
|
||||||
<assert.h>
|
<assert.h>
|
||||||
<string.h>
|
<string.h>
|
||||||
<stdlib.h>
|
<stdlib.h>
|
||||||
@ -11067,7 +11067,7 @@
|
|||||||
<AGL/agl.h>
|
<AGL/agl.h>
|
||||||
<GL/glx.h>
|
<GL/glx.h>
|
||||||
|
|
||||||
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"
|
"gl_pbuffer.h"
|
||||||
<wx/utils.h>
|
<wx/utils.h>
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ pBufferWGL::pBufferWGL(int width, int height)
|
|||||||
|
|
||||||
// compare w & h to m_width & m_height.
|
// compare w & h to m_width & m_height.
|
||||||
|
|
||||||
wglMakeCurrent(hdc,hGlRc);
|
/* wglMakeCurrent(hdc,hGlRc);
|
||||||
|
|
||||||
glEnable(GL_TEXTURE_2D); // Enable Texture Mapping
|
glEnable(GL_TEXTURE_2D); // Enable Texture Mapping
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
@ -146,7 +146,7 @@ pBufferWGL::pBufferWGL(int width, int height)
|
|||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
|
||||||
glClearColor(0,0,0,1);
|
glClearColor(0,0,0,1);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT); */
|
||||||
|
|
||||||
|
|
||||||
// switch back to the screen context
|
// switch back to the screen context
|
||||||
@ -174,7 +174,9 @@ void pBufferWGL::UseBuffer(bool b)
|
|||||||
|
|
||||||
bool pBufferWGL::InitGLStuff()
|
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;
|
char *ext = NULL;
|
||||||
|
|
||||||
if (wglGetExtensionsStringARB)
|
if (wglGetExtensionsStringARB)
|
||||||
@ -188,11 +190,11 @@ bool pBufferWGL::InitGLStuff()
|
|||||||
wxLogError(wxT("WGL_ARB_pbuffer extension was not found"));
|
wxLogError(wxT("WGL_ARB_pbuffer extension was not found"));
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC)wglGetProcAddress("wglCreatePbufferARB");
|
//wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC)wglGetProcAddress("wglCreatePbufferARB");
|
||||||
wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC)wglGetProcAddress("wglGetPbufferDCARB");
|
//wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC)wglGetProcAddress("wglGetPbufferDCARB");
|
||||||
wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC)wglGetProcAddress("wglReleasePbufferDCARB");
|
//wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC)wglGetProcAddress("wglReleasePbufferDCARB");
|
||||||
wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC)wglGetProcAddress("wglDestroyPbufferARB");
|
//wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC)wglGetProcAddress("wglDestroyPbufferARB");
|
||||||
wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC)wglGetProcAddress("wglQueryPbufferARB");
|
//wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC)wglGetProcAddress("wglQueryPbufferARB");
|
||||||
|
|
||||||
if (!wglCreatePbufferARB || !wglGetPbufferDCARB || !wglReleasePbufferDCARB ||
|
if (!wglCreatePbufferARB || !wglGetPbufferDCARB || !wglReleasePbufferDCARB ||
|
||||||
!wglDestroyPbufferARB || !wglQueryPbufferARB) {
|
!wglDestroyPbufferARB || !wglQueryPbufferARB) {
|
||||||
|
@ -64,6 +64,10 @@ TextMarkup *markup=NULL;
|
|||||||
// Must be called from a thread inside the application.
|
// Must be called from a thread inside the application.
|
||||||
void GraphInit()
|
void GraphInit()
|
||||||
{
|
{
|
||||||
|
#if defined(__WXMSW__)
|
||||||
|
glewInit(); // Dont forget this nasty little sucker.. :)
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!gfont_init) {
|
if (!gfont_init) {
|
||||||
font_manager=new FontManager();
|
font_manager=new FontManager();
|
||||||
vbuffer=new VertexBuffer((char *)"v3i:t2f:c4f");
|
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 );
|
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
||||||
glEnable( GL_TEXTURE_2D );
|
glEnable( GL_TEXTURE_2D );
|
||||||
glColor4f(1,1,1,1);
|
glColor4f(1,1,1,1);
|
||||||
#if !defined(__WXMSW__)
|
|
||||||
vbuffer->Render(GL_TRIANGLES, (char *)"vtc" );
|
vbuffer->Render(GL_TRIANGLES, (char *)"vtc" );
|
||||||
#endif
|
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,11 @@ VertexBuffer::~VertexBuffer()
|
|||||||
|
|
||||||
void VertexBuffer::Upload()
|
void VertexBuffer::Upload()
|
||||||
{
|
{
|
||||||
|
if (!glGenBuffers) {
|
||||||
|
printf("WHAT???");
|
||||||
|
assert(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!vertices_id) {
|
if (!vertices_id) {
|
||||||
glGenBuffers(1, &vertices_id);
|
glGenBuffers(1, &vertices_id);
|
||||||
}
|
}
|
||||||
|
@ -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 = 5910;
|
static const long _BUILD = 5918;
|
||||||
static const long _REVISION = 15610;
|
static const long _REVISION = 15644;
|
||||||
|
|
||||||
//Miscellaneous Version Types
|
//Miscellaneous Version Types
|
||||||
static const long _BUILDS_COUNT = 6353;
|
static const long _BUILDS_COUNT = 6363;
|
||||||
#define _RC_FILEVERSION 0,7,5910,15610
|
#define _RC_FILEVERSION 0,7,5918,15644
|
||||||
#define _RC_FILEVERSION_STRING "0, 7, 5910, 15610\0"
|
#define _RC_FILEVERSION_STRING "0, 7, 5918, 15644\0"
|
||||||
static const char _FULLVERSION_STRING[] = "0.7.5910.15610";
|
static const char _FULLVERSION_STRING[] = "0.7.5918.15644";
|
||||||
|
|
||||||
//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