OpenGL in MDI application

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2008
Posts: 6
Reputation: kashifbhatti is an unknown quantity at this point 
Solved Threads: 0
kashifbhatti kashifbhatti is offline Offline
Newbie Poster

OpenGL in MDI application

 
0
  #1
Sep 16th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: OpenGL in MDI application

 
0
  #2
Sep 16th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 6
Reputation: kashifbhatti is an unknown quantity at this point 
Solved Threads: 0
kashifbhatti kashifbhatti is offline Offline
Newbie Poster

Re: OpenGL in MDI application

 
0
  #3
Sep 16th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: OpenGL in MDI application

 
0
  #4
Sep 16th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 6
Reputation: kashifbhatti is an unknown quantity at this point 
Solved Threads: 0
kashifbhatti kashifbhatti is offline Offline
Newbie Poster

Re: OpenGL in MDI application

 
0
  #5
Sep 17th, 2008
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).
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: OpenGL in MDI application

 
0
  #6
Sep 17th, 2008
That is quite a lot, especially then if you multiply it up over multiple forms. What sort of FPS are you getting?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC