GL ES 1.0 PC Emulation cann't work on the MFC appl

 I've just downloaded the latest version of the OpenGL ES 1.x SDK (OGLES_WINDOWS_X86EMULATION_2.10). I'm using WinXP and Microsoft Visual Studio 2008.

I created a win32 application and a MFC application to draw a simple triangle with the libs and dlls,but the results are so different.That win32 application did very well and showed the correct result while the MFC application kept giving me this "Unhandled exception at 0x7c9873be in test27.exe: 0xE06D7363: Microsoft C++ Exception." error when i tried to run the project.(test27 is my project's name),I tried a lot but i still cann't get over of it.

So did anyone get this befor?Can you help me?

Thanks in advance!

Hi tietingting,

We’ve not tried using MFC with our emulation libraries before, but as MFC is just a wrapper library, there shouldn’t be any real issues using it. Have you actually started using the mfc code to interact with the OpenGL ES libraries, or is it just a straight code copy?

Also, the error you’re having, at what point is it actually crashing?



Hi Tobias,

I am so glad to recieve your reply! 
After setting the additional include directories of the header files and additional libraries directoriesof the OpenGL ES libraries I use the mfc code to render the scene I want.I am sure that I've used the libraries correctly and I think there is something wrong with the  dynamic link libraries so that my mfc application crashed with the "Unhandled exception" error.And every time I ran the application it crashed befor it went to my breakpoints at the file test27.cpp.

I am looking forward to your reply!Smile

Hi Tietingting,

You could try setting a breakpoint on the main function.

If that breakpoint hits, you can singlestep until the point where it goes wrong.
If it doesn’t hit, then you could try and make a test project which does nothing (the hello world mfc app), and run that.
If that works, just link the 3d libraries but don’t call 'm yet…and see if that works.
I think this way you can pinpoint where it goes wrong.

Hi Tietingting,

Yes what reinier has said is exactly the approach you should be taking - if it’s not getting to the main function then it’s worth adding all the libraries back in one at a time until you get the crash.

If it’s really crashing before any code is hit then it points to a problem with either the libraries or how they are setup, in which case I can suggest some other things to try.



Hi Tobias,

I already trid the way reinier said and it really crashed before any code was hit.And I actually added all the libraries at one time as I said last time.

I still doubt there is something wrong with the dynamic link libraries.If you have any suggestions please let me know.

Thanks a lot!

Hey Tobias,

so the next thing to try is to remove any external linked library (one by one).
Since the app is crashing before it starts you don’t need it anyway.

Hopefully you can pinpoint which external library is causing the crash.

If you still can’t even start the app after you don’t link any libraries, then it might be an idea to just start all over.
Make a new project, test if it works. One by one add external libs…and keep on testing.
finally add the code and keep on testing…

Hi Reinier,

I assume you meant to say that to Tietingting?


Yes it’s starting to sound like there might be something more fundamentally wrong - does it still crash if you remove all references to our libraries?



>Hi Reinier, 
>I assume you meant to say that to Tietingting?

indeed  LOL