Hi,
  I sent this to Volker off-list already, but now that I can post,
here it is for others to read:
Volker,
  Thanks for the suggestions.  The shared libtachyon via
autotools
is probably a good idea, though it would only be usable for
the
non-MPI builds.  MPI programs must always be compiled from
source
unless one uses something like "MorphMPI" that simulates an
ABI
to abstract the native implementation.  I will see about doing
this
later this spring after I'm done with the rest of the heavy
lifting
I'm doing getting the new version of Tachyon ready and
releasing
it concurrently with the new version of
VMD...

Rendering to a memory buffer is trivial, and no, you
don't
need any OpenGL headers or anything like that, the core
Tachyon
library is independent of the supplied standalone driver
program
and OpenGL demo programs in the "demosrc"
directory.

To render to a memory buffer you would want to use one of these two
APIs:

/
**
 * Request Tachyon to save the output image in the
specified
 * memory buffer, in raw 24-bit, packed, pixel interleaved, unsigned
char
 * RGB bytes.  The caller is responsible for making sure that
there
 * is enough space in the memory area for the entire
image.
 
*/
void rt_rawimage_rgb24(SceneHandle, unsigned char
*rawimage);

/
**
 * Request Tachyon to save the output image in the
specified
 * memory buffer, in raw 96-bit, packed, pixel interleaved, 32-bit
float
 * RGB bytes.  The caller is responsible for making sure that
there
 * is enough space in the memory area for the entire
image.
 
*/
void rt_rawimage_rgb96f(SceneHandle, float
*rawimage);


So, for a 24-bit RGB image, Tachyon expects you to send in
a
pointer to a packed 24-bit RGB image buffer.  You'd
allocate
the buffer and pass it to Tachyon in a code sequence like
this:
  rt_resolution(scene, width,
height);
  unsigned char *rgb24 = (unsigned char*)
malloc(width*height*3);
  rt_rawimage_rgb24(scene,
rgb24);

The aperture option/API is going to change, so I will probably
not
document it quite yet, but if you want to fool around with
that
I would be happy to help you play with the existing code until
I'm
happy with how it
works.

I am in the process of massively updating the Tachyon docs
and
header files to make this all easier to follow.  If you want,
I
can send you and any other interested parties a current
snapshot
for you to play
with.

Cheers,
  John
Stone
  john.st...@gmail.com

On Feb 6, 1:38 am, Volker Braun <vbraun.n...@gmail.com> wrote:
> Dear John & sage-devel,
>
> I looked into libtachyon on Sage a while ago. Right now, we don't
> build the library because tachyon already isn't that easy to build
> without manual intervention. Sage only drives tachyon through
> temporary files at the moment. Clearly, that is not ideal. My wishlist
> would be
>
> 1) Use autotools/libtools to build a shared libtachyon in a portable manner.
>
> 2) I know that there is a way to render into a memory buffer, but I
> haven't understood it 100%. I'm not sure if building it currently
> needs OpenGL headers; If possible, we would like to avoid that
> dependency.
>
> 3) Documentation would be nice ;-) For example we haven't quite been
> able to figure out the aperture option, 
> seehttp://trac.sagemath.org/sage_trac/ticket/9855
>
> Best wishes,
> Volker

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to