opengl rendering to the wrong window

Ryan Stallings nwn at
Fri May 10 18:40:18 CDT 2002

	I am trying to get the Neverwinter Nights Model viewer 
working under wine.  The menus etc of the model viewer come up correctly, but 
no rendering can be seen in the render window.  Through some investigation I 
determined that the model was being rendered, just in the wrong window.  I 
moved the window out of the way by a few pixels and saw the model was being 
rendered to what looks like the main window underneath the menu.  Here is a 
screen shot that shows what I mean.....
The black square is the windows shifted and the blue background is the 
glClearColor of the rendering window.  As you can see the model is under the 
window :( Now if I move the window way offscreen and add an offset to the 
glViewport call I can get the model to render in the correct place, but this 
is obviously not the right solution. 

	What could be causing it to be rendered in the wrong window?  The render 
window has a hwnd =1003e and a drawable client/whole = 0x4000064/0x4000063 
and the first couple of time through wglMakeCurrent the drawable that comes 
back from the hdc that is passed (requested from 1003e) is 0x4000064 which 
seems right, but I think this is some sort of test renderings offscreen 
before the application comes up. Later in the logs this is not true.  GetDCEx 
is called with 1003e, but it returns a hdc that has a different drawable 
associated with it (the one for the root window I think).  But even if I try 
to for the drawable to 0x4000064 is does not render in to the correct window 
(it does not render at all).

	Does anybody have any direction to point me in?  Or is there any information 
that I could provide to make the situation more clear? 



More information about the wine-devel mailing list