thegooglecodearchive / los-cocos

Automatically exported from code.google.com/p/los-cocos
0 stars 0 forks source link

Drawing primitives #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Circle, Line, Arc, segment, quad, etc.

Original issue reported on code.google.com by lucio.to...@gmail.com on 20 Apr 2008 at 4:35

GoogleCodeExporter commented 9 years ago
using optimized ways to draw them, like vertex arrays, or indexed vertex arrays.

Original comment by ricardoq...@gmail.com on 20 Apr 2008 at 4:58

GoogleCodeExporter commented 9 years ago
yes, batchable stuff.

one question i have, how can these things get to be resolution independant?

imagine i draw a bezier with 100 points and i looks smooth. Then if i zoom in, 
or
scale the bezier, i get to see less points, hence less smooth. how could we 
automate
the ammount of points for the curve in a way that it always looks good?

Original comment by lucio.to...@gmail.com on 20 Apr 2008 at 5:42

GoogleCodeExporter commented 9 years ago
I don't know. But it seems that the "independent resolution thing" shall be a 
sort of
`layer` on top of the primitives... bah, I don't know.

Original comment by ricardoq...@gmail.com on 21 Apr 2008 at 9:36

GoogleCodeExporter commented 9 years ago
would you not be using opengl primitives to do the drawing? You can reuse a 
module
that does this on the pyglet mainling list pages archive.

Original comment by santagada on 11 Aug 2008 at 8:32

GoogleCodeExporter commented 9 years ago
ive tried primitives.py and although it provides the basic functionality, we are
trying to get something better. For example, primittives.py uses immediate mode 
for
drawing, and we want to have something we can batch (vertex buffers).

first, id like to have resolution independant curves. This can more or less be 
done
using textures. It can be done using shaders (and it is, in the source) but 
shader
support is not yet there.

also, id like to have some form of tessellation and antialias built in.

check the branch 'europython2008-sprint', all the tests named 'test_draw_*.py' 
to see
where we are at. (lines, multilines, caps and elbows)

i still need to code curves (quadrics and cubics), circles and arcs. Then i 
want to
integrate with Squirtle, they have tessellation done. (and maybe more, check it 
at:
http://www.supereffective.org/?p=14)

Original comment by lucio.to...@gmail.com on 11 Aug 2008 at 10:28

GoogleCodeExporter commented 9 years ago
please do, and take the svg loading code (or maybe some other simpler format) 
so we
can both draw primitives and load vector graphics... I sense an asteroid clone 
in the
future :)

I will take a look at the curves code as I was thinking of doing something that
needed curves, I was thinking of using glu NURBS, but maybe there is something 
there
(in squirtle) ready to use on pyglet.

Original comment by santagada on 16 Aug 2008 at 8:51