Advertisement

Allegro 3D functions

Started by January 11, 2005 05:03 PM
7 comments, last by Stompy9999 19 years, 8 months ago
Does anyone know how to use Allegro's 3D functions. Maybe, just how to draw a polygon and to rotate the camera. Yes, I realize that it isn't the best 3D system, but I would still like to try it out. Thanks!
-----------------------------Play Stompy's Revenge! Now!
I looked at the documentation, and it looks pretty easy, I just don't know how to use the functions in a program.
-----------------------------Play Stompy's Revenge! Now!
Advertisement
Allegro comes with some example programs. At least a few are 3D specific.

Jesus saves ... the rest of you take 2d4 fire damage.

I looked at the example code. I understand alot of it, but I don't get why almost every point is declared as "32 << 16".
-----------------------------Play Stompy's Revenge! Now!
Ugh. Fixed point. I need to go wash my eyeballs now. [razz]

Jesus saves ... the rest of you take 2d4 fire damage.

I just looked through the documentation again. The bit-shift to 16 is to convert an integer to a fixed point. There apparently is a function called itofix() which is the same as doing this.
-----------------------------Play Stompy's Revenge! Now!
Advertisement
Okay, I understand that to change an integer to a fixed point you need to shift a bit by 16. What I am confused about is what integers to use. Do I have to use factors of 16 or 32?
-----------------------------Play Stompy's Revenge! Now!
Nope. These are just vertex coordinates. If the demo you're talking about is what I think it is, the program is just making cubes, so equal measures on all sides would be desirable. [smile] Try changing some numbers, recompile, and see what happens.

Jesus saves ... the rest of you take 2d4 fire damage.

Thanks!
-----------------------------Play Stompy's Revenge! Now!

This topic is closed to new replies.

Advertisement