fix some stuff

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@654 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-09 12:13:46 +00:00
parent ddd5e30de8
commit 2f5539048b
9 changed files with 14 additions and 19 deletions

View File

@@ -2,7 +2,6 @@
#include <Mw/Milsko.h>
#include <Mw/Widget/OpenGL.h>
typedef void(GLAPIENTRY* MWglColor3f)(GLfloat red, GLfloat green, GLfloat blue);
#ifdef _WIN32
typedef HGLRC(WINAPI* MWwglCreateContext)(HDC);
typedef BOOL(WINAPI* MWwglMakeCurrent)(HDC, HGLRC);
@@ -19,7 +18,6 @@ typedef struct opengl {
MWwglMakeCurrent wglMakeCurrent;
MWwglDeleteContext wglDeleteContext;
MWwglGetProcAddress wglGetProcAddress;
MWglColor3f glColor3f;
} opengl_t;
#else
typedef XVisualInfo* (*MWglXChooseVisual)(Display* dpy, int screen, int* attribList);
@@ -41,7 +39,6 @@ typedef struct opengl {
MWglXMakeCurrent glXMakeCurrent;
MWglXSwapBuffers glXSwapBuffers;
MWglXGetProcAddress glXGetProcAddress;
MWglColor3f glColor3f;
} opengl_t;
#endif
@@ -69,7 +66,6 @@ static int create(MwWidget handle) {
o->wglMakeCurrent = (MWwglMakeCurrent)(void*)GetProcAddress(o->lib, "wglMakeCurrent");
o->wglDeleteContext = (MWwglDeleteContext)(void*)GetProcAddress(o->lib, "wglDeleteContext");
o->wglGetProcAddress = (MWwglGetProcAddress)(void*)GetProcAddress(o->lib, "wglGetProcAddress");
o->glColor3f = (MWglColor3f)(void*)GetProcAddress(o->lib, "glColor3f");
o->gl = o->wglCreateContext(o->dc);
#else
@@ -95,7 +91,6 @@ static int create(MwWidget handle) {
o->glXMakeCurrent = (MWglXMakeCurrent)dlsym(o->lib, "glXMakeCurrent");
o->glXSwapBuffers = (MWglXSwapBuffers)dlsym(o->lib, "glXSwapBuffers");
o->glXGetProcAddress = (MWglXGetProcAddress)dlsym(o->lib, "glXGetProcAddress");
o->glColor3f = (MWglColor3f)dlsym(o->lib, "glColor3f");
/* XXX: fix this */
o->visual = o->glXChooseVisual(handle->lowlevel->display, DefaultScreen(handle->lowlevel->display), attribs);