MFC-MDI OpenGL example wanted...

MFC-MDI OpenGL example wanted...

Post by Andy Bushnel » Tue, 09 Mar 1999 04:00:00



I had another thought on my previous posting (below)

If anyone had a MFC/MDI example with Open GL then maybe that would clear
up if i'm setting OpenGL up wrong in my application. To recap: I have
multiple OpenGL views - each with different projections (perspective,
ortho, frustum etc.) and sometimes when I start the app - one of the
views (being drawn into a splitter window pane - isn't!). I don't know
where the OpenGL rendering calls for that view are going - but they're
going somewhere.

Thanks in advance

Andy

<<<<<<<<<<<  pervious message <<<<<<<<<<<<<<<<<
hi,

I am experiencing some wierdness trying to implement multiple OpenGL
views in an MFC application. I think its to do with OpenGL setup and how

each OpenGL view manages the rendering context (?) I have an SDI app
with the following setup...

MainFrame
    \
    contains a (vertical) SplitterWnd
        \
        left pane is MFC stuff
        right pane is for OpenGL stuff
            \
            Right pane contains a nested Splitter window  (2 cols & 2
rows)
                \
                Each Pane contains a CView derived class that sets up &
does OpenGL

The problem is that "sometimes" one of my panes doesn't draw anything (I

see the old desktop real-estate !). Each Pane is a separate OpenGL class

- each does the typical RC and DC stuff that you find in many books /
articles. I release the RC after using it (in the Size/Draw methods) -
each pane - calls wglMakeCurrent() before & wglMakeCurrent(NULL,NULL);
after. Although I have a fair idea of what to do for OpenGL setup under
Windows - i'm not an expert & haven;t tried multi-OGL before...

Any ideas?  A simple application with multiple OpenGL windows would be
very helpfull.

I am using a PII w/Diamond Viper/TNT board under Win98 with Diamond
drivers.

Tx

Andy

 
 
 

MFC-MDI OpenGL example wanted...

Post by Chris Morle » Wed, 10 Mar 1999 04:00:00



> I had another thought on my previous posting (below)

> If anyone had a MFC/MDI example with Open GL then maybe that would clear
> up if i'm setting OpenGL up wrong in my application. To recap: I have
> multiple OpenGL views - each with different projections (perspective,
> ortho, frustum etc.) and sometimes when I start the app - one of the
> views (being drawn into a splitter window pane - isn't!). I don't know
> where the OpenGL rendering calls for that view are going - but they're
> going somewhere.

Look at www.codeguru.com/opengl I remember an MDI sample. You
could also try www.opengl.com, but I don't recall one there.
--
Chris Morley


 
 
 

MFC-MDI OpenGL example wanted...

Post by Uwe Kotyczk » Thu, 11 Mar 1999 04:00:00


I think I already posted this. So again, have a look at my demo
http://www.minet.uni-jena.de/~kotyczka/opengl.html

Regards, Uwe.

Andy Bushnell schrieb:

Quote:> I had another thought on my previous posting (below)

> If anyone had a MFC/MDI example with Open GL then maybe that would clear
> up if i'm setting OpenGL up wrong in my application. To recap: I have
> multiple OpenGL views - each with different projections (perspective,
> ortho, frustum etc.) and sometimes when I start the app - one of the
> views (being drawn into a splitter window pane - isn't!). I don't know
> where the OpenGL rendering calls for that view are going - but they're
> going somewhere.

 
 
 

1. Need help: OpenGL in MFC MDI Application

Hi all!

I spent a whole day searching the web for tutorials on how to animate simple
objects in multiple child windows in a MDI application created with MFC.
Let's take an example of rotating objects in each child window.  Each child
window's view will call OnDraw which calls the function to draw the OpenGL
objects.  How do I make them all work concurrently or at least make it seem
like it is?  I know that a child window's call to a draw function cannot
stay in a loop or else the others will freeze right?

Any help would be very appreciated... links to tutorials would be nice too.
I tried NeHe tutorials already and found nothing for child windows.

Regards,

Lee

2. deeppaint 3d

3. opengl crash on nt2000 VC 6.0 MFC MDI app using spliiterWnds

4. How do you get DirectShow code to compile???

5. OpenGL & multithreaded MFC/MDI

6. UMass Lowell Visualization Colloquium - Feb 14

7. MFC: MDI 4 wndws with OpenGL HOWTO

8. Lightning help

9. mdlviewer source released (MFC MDI OpenGL app)

10. MFC MDI OpenGL Question

11. OpenGL, MFC, MDI

12. A MDI OpenGL view class (MFC on Win95/NT)

13. For David DNA (Reg: MFC MDI and OpenGL)