Problem with multiple views

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).

Hi bishop,

use wglShareLists() and it should work.

Greetings
Patrick

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

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:
[b]
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). [/b]

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

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