Re: [AD] power-of-two textures? |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Evert Glebbeek wrote:
AllegroGL has (used to have?) a way to cope with non-power-of-two
textures, but I've forgotten the details. I assume we could use the
same method?
No, we'd better not use the same method. :)
This is how it works:
If EXT_NPOT is not available, try EXT_TEXTURE_RECTANGLE. If neither is
available, split the texture into smaller POT textures. For example, a
3000x500 bitmap is then split into (2^11,2^9,2^8,2^7,2^5,2^4,2^3 x
2^8,2^7,2^6,2^5,2^4,2^2) 42 pieces! Doing anything to such a bitmap is
slow as hell. And it's hard to test.
Using a subitmap might be a better solution. Maybe not even try
EXT_TEXTURE_RECTANGLE because it requires special coordinate handing
when blitting it. It would use less video memory though.
Splitting a too large bitmap should not produce too many fragments, so
that should be fine, just because there isn't a better solution apparently.
--
Milan Mimica
http://sparklet.sf.net