PDA

View Full Version : Multiple Rendering Windows (MFC)



GoatNat
04-13-2001, 06:04 PM
Hello all,

I have a SDI application containing splitters, in 2 of the pane's i want to have an OpenGL rendering view.. All is good up until this point, i save the hdc and the hglrc and do the wglMakeCurrent in my OnPaint() call.. now for my problem. one window looks perfect but the 2nd seems like it isnt painting completely (sorta like what Digital Cable does when it "lags").. small portions of the view (blocks) will quickly flicker and disapear, while the 2nd view stays crisp and clean.. any ideas? this one's got me for sure =(

Thanks!
Nat

Korval
04-13-2001, 06:09 PM
Did you override OnEraseBkgd on all of the CView-derived classes in your GL-windows? That is probably the source of the problem.

GoatNat
04-13-2001, 06:20 PM
I wasn't over-riding that call, i tried that for kicks just now, it didn't change anything. Here is a link to what i am seeing, right here (http://www.teamgoat.com/OpenGLIssue.jpg)

Nat

Korval
04-13-2001, 08:09 PM
Did you return 'true' from this function to tell Windows not to erase the background?

GoatNat
04-14-2001, 04:44 AM
yeah i tried both conditions, i dont think its the erase background that event is kicked off during a window resize, move, etc. My problem is consistant without any interaction from the client. What i think is going on here is the 1 view that is rendering properly is *hogging* the makecurrent token for some reason, although the only place i have it is in the OnPaint method. I'll keep plugging away heh. Thanks for your help btw.

Nat