PDA

View Full Version : Problem with multiple views



bishop
08-24-2001, 05:45 AM
I have built a 4 views application with MFC using splitters and I have several bugs with it. I was wondering if someone could help me.

First, is it true that you can't use the same display list when you are using multiple view? If so, is there a way to go around that because only my fourth view has the model displayed.

Second, my shading and texture does appear only on the fourth view also. (My guess is it's the current graphic context).

markl
08-24-2001, 07:48 AM
Hi bishop,

use wglShareLists() and it should work.

Greetings
Patrick

bishop
08-24-2001, 09:46 AM
Hi Patrick,

Thanks for your help... Just to be sure, should I do something like that:
1. Get all my HGLRC
2. Share graphic context for each HGLRC with wglShareLists:
wglShareLists(context1, context2) ;
wglShareLists(context1, context3) ;
wglShareLists(context1, context4) ;

Thanks,

Luc

jxruan
08-24-2001, 11:23 AM
For every view, You'd better create a rendering context. Then use wglMakeCurrent(,)to orient the output of openGL.

One thing of texture I want to mention is you'd better add glFinish() after drawing a texture. Otherwise, you may find that different textures using the same pixel buffer.


Originally posted by bishop:

I have built a 4 views application with MFC using splitters and I have several bugs with it. I was wondering if someone could help me.

First, is it true that you can't use the same display list when you are using multiple view? If so, is there a way to go around that because only my fourth view has the model displayed.

Second, my shading and texture does appear only on the fourth view also. (My guess is it's the current graphic context).



[This message has been edited by jxruan (edited 08-24-2001).]

bishop
08-27-2001, 04:32 AM
Hi everyone,

Thanks for your help! I was able to import my Display lists in my four view. However, I still don't have my shading + texture in my first three view. Is there another function in WGL to do that as well? (Light sharing? Material prop sharing?). I have tried to put a glFinish() after applying my texture, but without success!

Thank you very much,

Luc