Age | Commit message (Collapse) | Author |
|
This moves most of the particle system maintenance into the serially
executed sparkler_prepare_frame(), divides the frame into ncpus
fragments, and leaves the draw to occur concurrently.
The drawing must still currently process all particles and simply skips
drawing those falling outside the fragment.
Moving more of the computation out of prepare_frame() and into
render_fragment() is left for future improvements, as it's a bit
complex to do gainfully.
|
|
should_draw_expire_if_oob() assumed the fragment represented the entire
frame. Instead, return 0 if the coordinates are outside the fragment,
but only reset longevity if outside of the frame.
If sparkler goes threaded in the drawing, this would result in threads
simply skipping particles outside the fragment. The longevity reset
occurring in all threads appears suspicious but should be benign since
they all write the same thing - 0.
|
|
|
|
The burst particle abused a zero mass to circumvent the effects of aging.
Instead use an explicit virtual flag to suppress aging, change busrt_cb
to ignore all virtual particles instead of only its center. Previously
burst_cb would thrust other bursts like any other particle, and this was
incorrect. Now burst centers are always stationary, even when they overlap
other bursts.
|
|
introduces create_context() and destroy_context() methods, and adds a
'void *context' first parameter to the module methods.
If a module doesn't supply create_context() then NULL is simply passed
around as the context, so trivial modules can continue to only implement
render_fragment().
A subsequent commit will update the modules to encapsulate their global
state in module-specific contexts.
|
|
Adding more context to the name in anticipation of adding a prepare_frame()
method to the module struct.
|
|
Make consistent with the source directory structure naming.
|
|
|
|
|
|
|
|
discards draw_pixel(), introduces helpers.h and a convenience
function for bounds checking and oob extermination. Move makergb
to helpers.h, draw.h gets removed in a later commit.
|
|
If a z-buffer is added these checks will need to be done independent from and
prior to drawing. Also it's silly to makergb() pixels which can't be drawn.
|
|
The relative path broke out-of-tree builds.
Previously the following:
$ mkdir /tmp/foo
$ cd /tmp/foo
$ ~/src/rototiller/configure
$ make
Would fail to compile unable to locate the headers in
~/rototiller/src
This fixes it.
|
|
Restoring some organizational sanity since adopting autotools.
|