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

Re: [pygame] ANNOUNCE: new 2d primitives library for pygame/SDL



> I've been using pygame for a week or two, and am very impressed.  One thing
> that seemed to be missing was a graphics primitives library.
> 
> I've started one, called the HeidiGFX library, and have created a
> sourceforge project.  It's not what I'd like it to be right now, and will
> likely change dramatically in the near future, but I wanted to get feedback
> asap.

hello scott, i just looked into the library. definitely a full
start for a graphics library. i'm not sure if you know, but
there is already a Heidi Graphics :]. it is kind of a simpler
opengl type thing that graphic card vendors can provide drivers
for, and used mainly by CAD programs and whatnot. although that
is a little dated, since nowadays i belive opengl is just the
standard. owell, no big deal, but it caught my eye when i saw
"heidi graphics", heh

here is the information i currently know about drawing primitives and sdl.

currently, the two libraries Powerpak and SGE are what everyone
has been basing there code on, but rarely does anyone actually
use these libraries (too much 'other stuff' i think).

there is another early drawing primitives library that is 
surprisingly full featured. (antialiased lines, drawing with alpha, etc)
this one is named SDL_gfxPrimitves, and you can find it here.
ftp://esc2.zkm.de/pub/SDL_gfxPrimitives/
(currently only has an ftp site)

the SGE library has one other thing that i haven't seen anywhere
else, and that is drawing gouroud shaded triangles. neat

also, pygame has the groundwork for a decent drawing library.
the draw module currently only provides line drawing, but i
want to expand it to include the things you have in your library.
i don't really see the need for pygame's draw library to be as
full featured as the gfxPrimitives one.

btw, toot my own horn time. gfxPrimitive was using the line drawing
routine found in SGE (same as in powerpak and yours). in version 1.1 he
switched the line drawing routine to the one found in pygame.draw. it
was over 50x faster (woop!)




> Right now, it's a basic put-pixels-to-the-screen library, for ellipses,
> rectangles, triangles, lines, and individual pixels.
>
> Soon, it will support polygons, and soon after, animated sprites and
> collisions.  A lot of the code is from the PowerPak library for SDL, but
> without a lot of PowerPak's baggage. (Special PP types, a single screen,
> etc...)

here's some options. right now i'd really like to add some functionality
to the pygame.draw module. the functions you have now in heidigfx are
pretty much what i want. if you could get a chance to take my draw.c and
add your functions in, that would be awesome. just the basics are good
for the pygame.draw module. any advanced drawing i'll leave for the 3rd
party extensions.

you might want to get in touch with the gfxPrimitives guy. i've met
him a couple times on IRC, and we've swapped code a bit. it might be
nicer all around to just have one really good SDL drawing primitives
library. you could do the library in all C, and we could maintain
the python wrapper as an optional module included in pygame.



> A MSVC workspace is included, the setup isn't tested, and I'd love to get
> someone to test it compiling on linux/BE/MacOS, because I don't have access
> to those platforms at this time.

i was able to make a few small changes and your package compiled with
the distutils stuff included. eventually you'll probably want to get
it set up right, since then it can compile on all platforms.

before the pygame-1.0 release i was digging through distutils a lot, and i
know i can make a cleaner setup.py script for any 3rd party modules. i'll
try to work on this soon.


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org