[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obsolete libraries



Francesco Orsenigo wrote:
Frédéric Lopez:

I would say Glut is best suited for demos and little proofs of concept than
games, but I really don't know it that much.

Not so much.
The very limit of GLUT is that it needs to control the main loop.
Some parts of PLIB are built on the top of GLUT.
Actually, PLIB can now be built GLUT-free.  We have it build with GLUT
by default for legacy reasons - but you don't have to use GLUT to use PLIB
anymore.

There are several game engines too like
PLIB, Crystal Space, OGRE, NeoEngine, NeL, etc.

Except PLIB these are just engines built over OpenGL.
PLIB is also an engine built over OpenGL.  It adds sound and joystick I/O
and a few other things - but mostly it's a layer on top of OpenGL.

I'm plain C programmer, sooner or later i must learn C++,
I think you should.  Object oriented techniques are REALLY well suited
to games programming.

I need:
- fast double buffering, 640x480 / 800x600 or more at 16 or 32 bpp (SDL is faster with 32, maybe because no conversion is needed),
So you can't be talking about using OpenGL?!?  OpenGL (presuming you have a
supported 3D card) generally goes at about the same speed at either resolution.

Remember - GLUT/freeglut are for OpenGL applications.

-a good keyboard handler: i've obtained best results reading directly from a cooked terminal: it does even recognise iso_8859-1 characters like accented òàùèé, very important in the italian language
I've never tried that with GLUT/freeglut.  The keyboard handler works just
fine for US keyboards though.

-a mouse pointer; some control on the pointer look would be also nice.
GLUT gives you glutSetCursor which allows you to pick any of the 'standard'
cursor shapes - or to turn the cursor off altogether.  In games, I find it's
generally better to draw the cursor yourself and just turn off the X cursor.

-Optionally, OpenGL for some hardware 2d rotation/zoom.
Ah - then you are using OpenGL for some things.

If you are writing a 2D game, you might still want to consider using OpenGL
for *EVERYTHING*.   OpenGL hardware can draw 2D sprites with zooming, rotation,
transparency, layering and antialiasing *WAY* faster than any CPU.  There are
also tricks to do pixel perfect collision detection too. Define your sprites
as texture maps and render them as polygons.

-Not an overwhelming amount of libraries: i'm still trying to figure out wich parameters i need to compile GLUT programs: while demos work, my programs and TuxKart abort with "GLUT: Fatal Error in [program]: OpenGL GLX extension not supported by display: :0.0"
Sounds like you don't have OpenGL installed correctly.

The more libraries, the more compile problems.

Does freeglut have any advantage versus glut?
(I may suppose Steve implemented the glutLoopUpdate hack....)
John Fay has implemented a really comprehensive set of solutions
to that.  He's even added things like window destruction callbacks
and other things that can make working with GLUT-classic tiresome.

Ok, I'll use glut or freeglut.
I was mislead by the "developement status: beta" i found on SF, i'd suggest you to switch to "production/stable".
Hmmm - good point.  I'll "make it so".

---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@airmail.net>    WorkEmail: <sjbaker@link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
           http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----