Quote: Original post by shadowwz
also don't forget to move the "delete sd;" too with "HANDLE hTemp = sd->hThread;"
That did the trick. Here is the [updated source] and a posted [test page].
Quote: Original post by shadowwz
also don't forget to move the "delete sd;" too with "HANDLE hTemp = sd->hThread;"
Quote: Original post by tgraupmann
Hey Shadowwz,
I [ported Nehe tutorials 2-10] to the mozilla plugin style.
I'm running into window focus issues, where the plugin isn't accepting keyboard input. I did a hack by setting the focus in the draw section. This gives the OpenGL focus and somehow keeps the Firefox title still blue. But if you switch to another program, the taskbar flickers like crazy. Can you take a look?
Any performance benefits you can find would be great too!
Thanks,
~Tim
Quote: Original post by tgraupmann
Also, I can't embed multiple plugins on the same page. How should the code handle that?
Quote: Original post by shadowwz
maybe if you call wglMakeCurrent(hGL_DC,hGL_RC) each time before you call DrawGLScen,but i'm not shure if it will work.
Quote: Original post by shadowwz
as for a focus it's not good to set it in DrawGLScene,thats why you get the flickering - it's better to add it on mouse down message ,like this :
case WM_LBUTTONDOWN:
SetForegroundWindow(hGL_Wnd);
SetFocus(hGL_Wnd);
break;
otherwise you can't type url in address bar &).
* you also can skip drawing if window is not visible or active.
case WM_KILLFOCUS: for(int i=0; i<256; i++) keys = FALSE; break;
Quote: Original post by shadowwz
focus - you can set focus after some delay ,at a first time - something like 1 sec
multiple embeded - the problem is global variable in plugin ,and to fix this all plugin code need to be changed to work with not global variables.(if you comment "if(!hGL_Wnd){..}" in init() function maybe it will work,but both windows will display same data and react in same way)
RECT r = { 200, 200, 600, 400 };w.Create(0, r, 0, WS_OVERLAPPEDWINDOW);