This commit is contained in:
parent
22b0891598
commit
6341b76a86
6 changed files with 18 additions and 17 deletions
|
|
@ -129,16 +129,17 @@ static int wcreate(MwWidget handle) {
|
|||
SetPixelFormat(o->dc, pf, &pfd);
|
||||
|
||||
o->lib = MwDynamicOpen("opengl32.dll");
|
||||
if(!o->lib){
|
||||
printf("Could not load OpenGL widget under WGL!\n"); \
|
||||
if(!o->lib) {
|
||||
printf("Could not load OpenGL widget under WGL!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define WGL_FUNC(x) o->x = MwDynamicSymbol(o->lib, #x); \
|
||||
if(o->x == NULL){ \
|
||||
printf("Could not load OpenGL widget under WGL! " #x " missing.\n"); \
|
||||
return 1; \
|
||||
}
|
||||
#define WGL_FUNC(x) \
|
||||
o->x = MwDynamicSymbol(o->lib, #x); \
|
||||
if(o->x == NULL) { \
|
||||
printf("Could not load OpenGL widget under WGL! " #x " missing.\n"); \
|
||||
return 1; \
|
||||
}
|
||||
|
||||
WGL_FUNC(wglCreateContext);
|
||||
WGL_FUNC(wglMakeCurrent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue