Exploding WGL Code
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
Exploding WGL Code
- Code: Select all
void GetWGLExtensions (void)
{
const char *(*wglGetExtensionsStringARB) (HDC hdc);
const char *(*wglGetExtensionsStringEXT) ();
if (wglGetExtensionsStringARB = (void *) wglGetProcAddress ("wglGetExtensionsStringARB"))
wgl_extensions = wglGetExtensionsStringARB (maindc);
else if (wglGetExtensionsStringEXT = (void *) wglGetProcAddress ("wglGetExtensionsStringEXT"))
wgl_extensions = wglGetExtensionsStringEXT ();
else
wgl_extensions = "";
}
I ran into this messing around with my current project.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Exploding WGL Code
prototype with undefined argument list!! EEK!
no idea what would be crashing in that code though.
if in doubt, printf/OutputDebugStringA are your friends, when it crashes only with non-debug builds anyway.
make sure you're not editing the string somehow? :s
no idea what would be crashing in that code though.
if in doubt, printf/OutputDebugStringA are your friends, when it crashes only with non-debug builds anyway.
make sure you're not editing the string somehow? :s
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Re: Exploding WGL Code
It doesn't edit the string any where.
But I was a bit surprised that different optimizations would cause it crash or not crash. A slightly unfun mystery.
I ended up inserted about 40 "MessageBox" pop-ups and when it stopped at #17, I had it located but surprised to see that it was this.
Oh well, I found the crash point and it didn't take so long.
But I was a bit surprised that different optimizations would cause it crash or not crash. A slightly unfun mystery.
Oh well, I found the crash point and it didn't take so long.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Exploding WGL Code
GLEW - because life's too short to load GL extensions by hand.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
Re: Exploding WGL Code
As mh says easiest way to get around all this 
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest