Am Mittwoch, 18. Juli 2007 15:45 schrieb H. Verbeet:
I'd rather fix the handling of the format table. Floating point formats are another case where we should be doing extension checks, rather than having entries for those and only doing the extension check in CheckDeviceFormat. We may even want to support different internal formats for different uses... not sure about that one yet. (The problem there is that currently eg. D3DFMT_R5G6B5 isn't supported as FBO attachment, but would be if we used eg. GL_RGBA8 as internal format)
Agreed, the static table is too limited. We should replace it with some per-adapter structure with some more fields like a different render target internal. The per adapter table can then be set up based on the settings and gl features. Inherently static data like the bitmasks should be separated from gl data.
Some other places where we have troubles with the current setup:
Bump map formats: GL_ATI_envmap_bumpmap vs GL_NV_texture_shader vs none of them. Currently the converter stuff in LoadTexture deals with that.
sRGB textures: Currently an extra internal format deals with that, extension checks are done at texture load time. That can stay the way it is IMHO because an extra internal format isn't a bad solution and srgb textures involve more than just a different format, and the extension check is responsible for all the other things too.