Peter,
Your problem could be caused by the code that you added to the render sub. It
would probably add some overhead to resize the viewport every frame. Try moving
the code to just before the dialog loop. Also, you could try using the
Win32::GUI::OpenGLFrame module created by Robert May. This module basically
shortcuts all the code necessary for using OpenGL with Win32::GUI, and uses an
XS interface to the required functions, instead of loading them with
Win32::API. This may provide a speed increase. The module can be found on CPAN.
Hope this helps,
Kevin.
Date: Sat, 6 Mar 2010 23:08:19 -0800
From: my_name_tallu...@yahoo.com
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] child window for opengl
Hi
in 14 Jul 2009
http://www.mail-archive.com/perl-win32-gui-users@lists.sourceforge.net/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/perl-win32-gui-users@lists.sourceforge.net/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
_________________________________________________________________
Get the latest jobs delivered. Sign up for SEEK Jobmail.
http://clk.atdmt.com/NMN/go/157639755/direct/01/
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/