-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2015-05-25 um 10:50 schrieb Henri Verbeet:
I guess, but it doesn't really seem worth it if that means duplicating much of the generic usage/format validation code.
I tried to move the code to resource_init and the non power of 2 handling is a big problem. resource_init doesn't care about power of 2 and non power of 2 sizes, and I don't think it should. It would need to know that though to switch between 2D and RECT.
Adding a flag for "this resource type supports NP2 textures" isn't really an option either. If we have neither TEXTURE_NP2 nor TEXTURE_RECTANGLE (some GL ES systems according to Matteo) we want to use 2D textures with padding.
The other relatively minor problem is handling subresources. The solution here is to never set or read the resource type on subresources, which we already do, and don't do capability validation on subresources. Right now we read format flags from subresources though .