Forums > Jitter

jit.gl.videoplane "internal texture"

January 26, 2006 | 5:54 pm

The documentation for jit.gl.videoplane mentions an "internal texture". It’s not clear to me how the dimensions of this
texture are set. Does it automatically size itself to the incoming matrix? OpenGL textures have square dimensions, in
powers of 2….how is 3:4 video resized to fit?

I understand how to get things to "look right", but am just curious about what’s going on behind the scenes.

Thanks
Kurt
….
http://retnull.com

http://auv-i.com


January 26, 2006 | 9:57 pm

On Jan 26, 2006, at 9:54 AM, auvi wrote:

>
> The documentation for jit.gl.videoplane mentions an "internal
> texture". It’s not clear to me how the dimensions of this
> texture are set. Does it automatically size itself to the incoming
> matrix? OpenGL textures have square dimensions, in
> powers of 2….how is 3:4 video resized to fit?

It is matched to the incoming matrix size. It uses the rectangular
texture implementation (also the default for jit.gl.texture, btw).
Power of two textures (which actually need not be square, but can be
512×128 for example) can be used if desired (jit.gl.texture
@rectangle 0, or the message to jit.gl.videoplane "sendtexture
rectangle 0"). However note that all of our fragment shaders assume
rectangular rather than power of two texture coordinates.

Hope this helps. Perhaps your question is also related to the fact
that the plane to which the texture is mapped happens to be square by
default? This has nothing to do with the texture dimensions.

-Joshua


Viewing 2 posts - 1 through 2 (of 2 total)