[Fluxus] texture dimension

Kassen signal.automatique at gmail.com
Sun Jan 9 16:03:09 PST 2011


Dear list.

Suppose we loaded some texture that we don't know the exact dimensions of
(for example because we picked a random file from a given directory).
Suppose we'd like to apply this to a plane with a given width and a height
such that the texture's aspect ratio were preserved.

The first step would probably be to poll the texture for it's dimensions in
pixels. It looks like we can't do that. It does look like we can upload the
texture to the gpu, then download it again to a pixels object with
"(pixels-download)", then poll the resultant pixels object using
(pixels-width) etc. I didn't actually try this yet, but the docs imply that
this should be possible.

Even if possible that sounds a bit roundabout and a waste of memory.
"(texture-height)" and "(texture-width)" sounds more straightforward to me.
We may, for example, elect not to upload a texture if the aspect ratio
doesn't fit the spot where we'd like it to some arbitrary degree, and
instead pick a new one.

So, this is either a feature request or a request for help about the bit
that I can't find. If such a bit exists I'm fairly sure it must be
under-documented as I think I looked quite hard.

Yours,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20110110/30db91cc/attachment-0001.htm>


More information about the Fluxus mailing list