Everyone knows that the programmers greatest excuse for slacking off is compile time. Next time your waiting for your software to build burn a few minutes playing the Delphi Cannon Demo! It’s a simple VCL/OpenGL app I wrote in a few short afternoons.
By hosting an OpenGL canvas on top of a standard TPanel I was able to easily integrate a simple windows app with basic OpenGL rendering. This allowed me to create the simple game you see here, and encapsulate it in the easy to design UI of VCL. It works for more than just games too. A OpenGL enables TPanel is great for rendering complex graphs and data processed by your Delphi application!
So enjoy playing the demo, and think about what other things could be done with a faster rendering system attached to VCL controls.
Note, since this demo uses OpenGL you will need compatable video card drivers. These can be obtained by your video card manufacturer in MOST cases. Cirtain cards may need to search for OpenGL compatable drivers, as the manufacturers drivers are not always compliant. Also, if anyone has any questions reguarding the TPanel hosting OpenGL, or about the game itself, feel free to reply to this post.Posted by David Lock on November 20th, 2007 under Uncategorized |