This is an excellent example, Robert. Exactly what I was looking for. Any plans to post it to the wiki? Would you like me to do that?
On Sun, Jul 18, 2010 at 10:14 PM, Adam B <[email protected]> wrote: > Excellent! Thanks, Robert. I'll start reading through the code tomorrow > after work. I'll keep you posted. > > > On Sat, Jul 17, 2010 at 8:51 PM, Robert Bragg <[email protected]>wrote: > >> Hi Adam, >> >> Excerpts from Adam B's message of Sat Jul 17 18:58:12 +0100 2010: >> > Hello all, >> > >> > This page touts the benefits of COGL over raw OpenGL: >> > http://wiki.clutter-project.org/wiki/Cogl. I'm really excited about >> the >> > pango text rendering and vertex/pixel buffer abstractions. I'd like to >> give >> > COGL a try for a 3D game project but I've not been able to find good >> > examples or documentation for COGL. >> >> The Cogl reference manual can be found here: >> http://docs.clutter-project.org/docs/cogl/1.0/ but sadly there aren't >> currently any comprehensive introductions to Cogl. >> >> I have to confess I was a bit cheeking claiming a few features on that >> page that don't exist yet (so as to motivate me to implement them) but >> luckily the features you want do already exist :-) >> >> I'd love to encourage people to pick up Cogl for games so I'm eager to >> help if I can. In general Cogl still isn't a very mature API so we are >> still working hard on exposing more features, but hopefully we cover >> enough already for your game. >> >> > >> > Would some kind sole please show me a simple COGL program that: >> > 1) sets up a fullscreen COGL window (perspective projection) >> > 2) draw a spinning 3D cube or triangle >> > 3) draw the text "Hello COGL" in front of the spinning cube >> > 4) draw text showing the current mouse coordinates >> > >> > I'd guess that the above example could probably be with the high-level >> > clutter framework (actors etc), but the bigger goal is a 3D game where I >> > need something closer to raw opengl api. I also realize that COGL >> cannot >> > (currently) work without clutter. I'm just looking for the minimal >> amount >> > of clutter code to use COGL. >> >> I've written an example program that should demonstrate all of the >> above. It's quite verbose because it doesn't use much of the convenience >> that Clutter offers and because I tried to comment it quite heavily. The >> source can be compiled like: >> $ gcc -g3 -O0 -o crate crate.c `pkg-config --cflags --libs >> clutter-x11-1.0` >> >> It assumes you have an image named "crate1.jpg" in the current directory >> when run. You can fetch the image I used with: >> $ wget http://www.20threed.com/images/tuts/crate1.jpg >> >> I have to mention it doesn't start fullscreened by default because I was >> actually seeing some window sizing problems with fullscreening when >> testing myself and since I didn't have a chance to debug that yet I made >> the 'f' key toggle fullscreen mode instead. It might work for you. >> >> If you have any further questions about Cogl please don't hesitate to >> ask! >> >> kind regards, >> - Robert >> > >
_______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
