Render my demo in MFC Window

zjl19870808
Posts: 21
Joined: Tue Nov 03, 2009 8:33 am

Render my demo in MFC Window

Post by zjl19870808 »

Hi , I am a student using BULLET, I found that the BULLET window is created by glut(OpenGl), now I want my Demo to show in the MFC window. I mean that I want my "boxes", my "cylinder" and my "constraint" in BULLET to show in MFC window.

PPS: I have added BULLET in a MFC project(a SDI project), I called MyDemo::clientMoveAndDisplay() and MyDemo::displayCallback in MyView::OnPaint(), MyDemo is a class inherited from DemoApplication in BULLET and MyView is a class inherited from CView in MFC. But I got an exception when the program ran into glutSwapBuffers() in funtion clientMoveAndDisplay() and displayCallback(). Then I delete glutSwapBuffers() and added SwapBuffers(dc) in OnPaint(). But the result is that I got nothing in my MFC window.

so, Is there anybody who can give me some advices, your suggestions will be greatly appreciated. Thank you very much!

Jet