Archived

This topic is now archived and is closed to further replies.

Tarindel

Debugging Nehe's IPicture Code

Recommended Posts

I''m in the process of writing a program that utilizes Nehe''s IPicture code (in VC++ 6.0)... Ever since I started using the IPicture code, when I debug my program, I crash out with an "Unhandled exception in Game1.exe (NVOPENGL.DLL): 0xC00001D: Illegal Instruction." I opened the workspace provided with Nehe''s IPicture code and ran it in debug mode. It did the same thing (except replace "Game1.exe" with "Nehe_IPicture.exe" in the error message)... Any ideas about what might be causing this and how to prevent it? Thanks in advance. Tarindel

Share this post


Link to post
Share on other sites
It occurs when the following two step sequence happens:

1) The line "HRESULT hr = OleLoadPicturePath(...)" in BuildTexture() is called.
2) It hits the first GL drawing/transformation command. This is where it actually crashes. If line #1 is not called (function is forced to an early return before that line), #2 does not crash.

In my program, #2 is a gluLookAt(). In Nehe's IPicture example, it's the first glTransform() in Draw().

As a side note, I made sure pPicture->Release() was called when I early returned BuildTexture().

I'm running Windows 98.

PS: if I call BuildTexture() before I even create my GL Window, it still crashes out with the same problem. So it doesn't appear to be a problem with the GL window/context getting roasted somehow...

[edited by - Tarindel on October 22, 2003 10:32:35 AM]

Share this post


Link to post
Share on other sites