0

Hi all,

I want to have a MDI application with OpenGL enabled on child forms. additionally each form can have controls than OpenGL. I have tried Nehe's lessons but all of them have used an infinite loop to call glDraw function which can not be done in MDI application as there may be multiple forms opened simultaneously. I need a replacement of OnDraw function of CView class in VC++. I have tried to overried OnPaint event of Form but it is not usefull as image disappears if you resize window etc.

2
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by LizR
0

You can do it as an infinite loop you would just need to call a function to do te drawing on each of the relevant forms in the loop.

0

I have already tried and found of no use, as i mentioned my original post that when form is resized or restored from minimized state then all drawings disappear and i have to wait for a couple of seconds. But when i coded same thing using CView in VC++ it was perfect.

0

That doesnt sound normal. As long as your form calls invalidate it should paint, and as part of your paint it should draw the openGL part.. I dont see ayn reason that wouldnt work.

0

I have called Form.Invalidate/Refresh from each event of the Form to repaint the form, but it is not doing so well. I think reason may be the number of triangles i am drawing (whcih is more than 300 thousands).

0

That is quite a lot, especially then if you multiply it up over multiple forms. What sort of FPS are you getting?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.