From: Subu <ma...@ce...> - 2002-07-22 04:46:11
|
Here's the test case. Initially, there are 2 canvases added to a JSplitPane, and the JSplitPane itself is added to the content pane (JPanel) of the Frame. What I'm doing is... -Remove the canvas (the one that was initially on the left of the split pane) from the JSplitPane -Remove the JSplitPane from the content pane. -Add the removed canvas to the content pane. The keystroke "s" toggles between the split configuration and the single canvas configuration. This test case does not work with the fix I've proposed, but it illustrates the problem. If time permits, I'll look into why my application works with this fix. > -----Original Message----- > From: Kenneth B. Russell [mailto:kbr...@al...] > Sent: Sunday, July 21, 2002 11:59 AM > To: Subu > Cc: GL4Java Users > Subject: Re: [gl4java-usergroup] Possible bug in > gljMakeCurrentNative() > > > > > > What problem did you see that this patch fixes? I assume it > > > was related to the removal of canvases from the component > hierarchy. > > > > Yes, that is correct. It just recreate's the OpenGL context > when the > > component hierarchy changes. It could be removing this > canvas from a > > component hierarchy or removing one of its parents from the > component > > hierarchy. > > The OpenGL context shouldn't be recreated until the next time > the component is added to the hierarchy. I can believe that > your code fixes a problem here, but could you please either > > a) provide a test case > > b) describe exactly the problem you saw in your application > that this patch fixes > > Thanks. > |