On Mon, 7 May 2001, Mark Danks wrote:
To the list,
What are people's thoughts about how to handle non-power of two sized textures? My primary goal is always speed, which means that I don't like to use automatic conversions, etc. I would rather that the texture upload/whatever fail than do a silent conversion for me. However, I know that this approach confuses other people who don't know about the internals of how the hardware needs the textures....
Later, Mark
In OpenGL there is a call, glTexSubImage2D, which allows you to partially or completely replace an existing texure with another (subImage). The helpful thing here is that only the original texture needs to be power of 2. The subImage can be of any size up to the original tex size. The main restriction is that you would not be able to bind a non-power-of-2 sub-texture flush to the edges of a polygon, if that's what you require. There will have to be a margin on each axis equalling: origTexWidth - subTexWidth origTexHeight - subTexHeight
I'm not sure if this is anything you're looking for, or if it has already been implemented in GEM, but just thought I'd mention it since I'm currently using it on an OpenGL/CAVE project that involves streaming webcam images from my house to the VR lab and importing them into the virtual environment. No, it's not yet working. I have to learn Perl script to do some pre-processing, first.
-dan