-----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 . -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVZFDRAAoJEN0/YqbEcdMwZWoP/jhFewDCNegghTsvWiiWmwvV sHTn+tVduHCUqnZDYoytEYmQbAKC6nZCvAe+29j8OW/mP9/AraKc0edscrVha7ya uH0lgWWSITSSNQwg7VZMnIqq7zmrrO8BwSDLfNZILTtFzAZf2q72qknkkyiN62ui oVi1NjsHrBOBed7AyqVj+7JpilZ6DB1q7zrJ48p/k2sOEWJ8zcoqLcAlBXe51XQ8 sxXX4+zOmkNzg8n/x0bXAqZbgWHKRIzGbyI15iSY5cf849syNYKhJqVsL2hN0BZJ 53l+jdWVQYXNs+/jwIIOsStt7obvkcNeQj7hqZQGdPGjDxhhDStwxMRnFjZQmrcF RRTWKVAyXRk9I+SybHIn9Q9sR/7qN1GRv962xi856vf/F6SuLw5NE7+tZ8t2/UoD XlQkeDVNr/bcGeieFnjUlXZDwkv+EhEe1s7/tr+cEbrAxE+ze5Etj8/b+wTFgjP5 tc5M7SLZWQC8GrKGoOotR/CPPdHB0bXoZ4keYvmtUCKE9Vp/Qd7y3pLoZV9N9ZF7 r7NsjH2uOun4m1PaQ/EnsfxWvp8BbRKTsa34XYEWN6yaVVAjd9DvS4B/nZP73MDo bK4TQvpQq21GMWprAnBAi+mwcdNrjbkEPJm1EXPeHpgacJ9aQJG7gjAcuKc6+8oI k4ptRVihfkc98lnlQd4N =NsZR -----END PGP SIGNATURE-----