Mip Mapping Levels and Register Combiners

Panda only supports auto-generated mipmaps that it generates (or it asks the hardware to generate) at texture load time; we don’t have a facility for loading hand-painted mipmaps–no one’s ever wanted to do that before. You can enable a special mode where bogus flat-colored textures are loaded for each mipmap level, just so you can see where the mipmap switches happen; you can set gl-show-mipmaps to True in your Config.prc to enable this. (This requires that you’re running with pandagl, as implied by the name.)

Similarly, there’s no facility for extracting a particular level of the mipmap back out, although I guess you could do this by rendering the texture to a polygon that was chosen to be the appropriate size for the mipmap level you wanted, and then copying the bits of the framebuffer out. Not particularly speedy, as both Bei and voxel pointed out, but it is a way to examine what the automatic mipmapper is doing. On the other hand, you could simply set gl-save-mipmaps to True, and Panda will dump out all of the mipmap levels to disk for your inspection when it loads the texture. (You probably just want to pview the texture by itself when this mode is on, unless you want to fill up your disk with mipmap levels.)

The variable dx-force-16bpptextures just means to downgrade all textures to 16bpp mode at load time (when running pandadx). That’s 16 bits per pixel, not 16 bits per channel. Our pandadx driver doesn’t currently support textures of 16 bits per channel.

Our pandagl driver does support textures with 16 bits per channel. You can specify the number of bits per channel you want in the egg file. In fact, if you load a 16bpc TIFF file, I think Panda will automatically request a 16bpc texture with it, unless you specify otherwise.

Of course, none of this applies to render-to-texture. You can request a 16bpc render-to-texture by setting the appropriate number of color bits (16 * 3 = 48) in FrameBufferProperties, which you need to pass to the GraphicsStateGuardian when you create it. If you don’t want your main window to have the same number of color bits, then you’ll need to create a separate GSG for the render-to-texture. Driver support for all this is a little spotty in OpenGL, and you’re wandering into a part of Panda that receives relatively little exercise, so your mileage may vary.

I have no idea what it means to render to 16 bits per channel, 32 bit textures. That sounds like a contradiction to me. Can you explain this in more detail?

David