1. Allegroforia
WHERE CAN I GET ALLEGROFORIA?!?!? Allegro is the GREATEST library ever, fast
and polygonal stuff too. Do I need Allegro to use it?
- Nate
2. Re: Allegroforia
> WHERE CAN I GET ALLEGROFORIA?!?!?
Calm down Nate, Allegrophoria is an extension of PEU... basically just a
wrapper for the Allegro Library. You can download it at
> Allegro is the GREATEST library ever, fast
> and polygonal stuff too. Do I need Allegro to use it?
Yes, you need to download Allegro in order to compile the Allegrophoria
source code. As far as I know, Allegro 3.0 will only work with the
DJGPP compiler and only under DOS. I think a Linux version of Allegro
is in the works though. To compile Allegrophoria, type "gcc peu.c -o
al.exe -lalleg". Peu.c includes al.c, which is the wrapper stuff, the
outfile is "al.exe" and gcc links the library "liballeg.a". The current
size of "al.exe" is about a meg, so I won't upload it until the wrappers
are complete.
> - Nate
Monty noticed that the polygon wrapper routines have not been
completed. This is because I haven't decided how to accept the array of
structures that must be passed in C. Each structure holds information
for a vertex of the polygon. My options are:
1. Convert a sequence of sequences to the array of structures...
2. Convert a 1-d sequence to the array of structures...
3. Convert an allocated block of memory to the array of structures...
polygon example for #1:
sequence vertexlist
vertexlist = {{x1,y1},{x2,y2},{x3,y3},...}
polygon(bmp, vertexlist, BLUE)
polygon example for #2:
sequence vertexlist
vertexlist = {x1,y1,x2,y2,x3,y3}
polygon(bmp, vertexlist, RED)
polygon example for #3:
atom vertexlist
vertexlist = allocate(3 * 8)
poke4(vertexlist, {x1,y1,x2,y2,x3,y3})
polygon(bmp, 3, vertexlist, MAUVE)
polygon3d example for #1:
sequence vertexlist
vertexlist = {
{x1,y1,z1,u1,v1,c1},
{x2,y2,z2,u2,v2,c2},
{x3,y3,z3,u3,v3,c3},
...}
polygon3d(bmp, POLYTYPE_FLAT, texturebmp, vertexlist) -- flat shaded
poly
polygon3d example for #2:
sequence vertexlist
vertexlist = {x1,y1,z1,u1,v1,c1,x2,y2,z2,u2,v2,c2,x3,y3,z3,u3,v3,c3}
polygon3d(bmp, POLYTYPE_GRGB, texturebmp, vertexlist) -- gourad 3d poly
polygon3d example for #3:
atom vertexlist
vertexlist = allocate_V3D(3) -- allocate built-in struct
poke4(vertexlist, {x1,y1,x2,y2,x3,y3})
polygon3d(bmp, POLYTYPE_PTEX_LIT, texturebmp, vertexlist)
-- perspective correct texture map, with lighting
I will probably end up using #1, because it is the most "friendly" to
you, the programmer, but it will also be the slowest. It will be the
wrappers job to allocate the array of structs, move/convert the
vertices, then call the function, and free the memory from before... #3
would be the fastest for the call, but you would have to poke data in
first, which isn't fast.
Anyone have any other ideas, or a preference?
Later,
_______ ______ _______ ______
[ _ \[ _ ][ _ _ ][ _ ]
[/| [_] |[/| [_\][/ | | \][/| [_\]
| ___/ | _] | | | _]
[\| [/] [\| [_/] [\| |/] [\| [_/]
[_____] [______] [_____] [______]
xseal at harborside.com ICQ:13466657
http://www.harborside.com/home/x/xseal/euphoria/