From: Peter O. <my_...@ya...> - 2010-03-07 07:35:09
|
Hi in 14 Jul 2009 http://www.mail-archive.com/per...@li.../msg05703.html i have posted an opengl example to run from within win32gui , the example depends on kevin Marshall code posted here http://www.mail-archive.com/per...@li.../msg05673.html . the example show a popup child window in wich the opengl scene rendered. now i have tried the same example but the opengl scene will be rendered to a child window inside the main window; it is working but with one problem; the launching of the program lasts about 5 seconds before the main window appears. why is this behaviour?, since in the popup child window example the main window appears in one second only. the only adjustments i have made is : 1- adding the following lines to the render sub since the sticky child window can't be resized so the -onResize => sub {...} is not operative: glViewport(0,0,320,240); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0, 320 / 240, 0.1, 500.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); 2-adding to the child properties: -popstyle => WS_CAPTION | WS_SIZEBOX, -pushstyle => WS_CHILD, -pushexstyle => WS_EX_CLIENTEDGE, and the else of the program is the same as the first example. for convenience here is the modified program, so you can check the 5 seconds delay before the main window appears: http://rapidshare.com/files/360063815/win32gui_opengl2.pl its picture like this: http://img192.imageshack.us/img192/3226/win32guiopengl.jpg regards peter |