SpaceDogDN
09-06-2003, 05:34 PM
Here's an evil puzzle for you to solve. You're a programmer trying to create an RTS game engine, and your project has the following restrictions:
1) You are trying to target a very large number of platforms and system configurations, so you shouldn't use any OpenGL extensions unless you have an alternative for ALL cards that don't support it.
2) You have a great number of legacy 8-bit palettized textures you have to use, all potentially at the same time, and you can't change the format in which they are stored on disk.
3) Your code has to be able to change the palette of any 8-bit texture being rendered. The texture may even be rendered several times per frame with a different palette each frame.
4) Memory usage must be kept to a minimum. Therefore, converting every 8-bit texture to 32-bits and having separate copies of each 32-bit image for each palette is NOT an option.
5) Your code must have a reasonable frame rate on a GeForce or better. (It can be slower on older generation cards, but it must be able to run on those slower cards.)
6) You must include support for 32-bit RGBA textures.
Well, I think that's it for the restrictions. Good luck!
1) You are trying to target a very large number of platforms and system configurations, so you shouldn't use any OpenGL extensions unless you have an alternative for ALL cards that don't support it.
2) You have a great number of legacy 8-bit palettized textures you have to use, all potentially at the same time, and you can't change the format in which they are stored on disk.
3) Your code has to be able to change the palette of any 8-bit texture being rendered. The texture may even be rendered several times per frame with a different palette each frame.
4) Memory usage must be kept to a minimum. Therefore, converting every 8-bit texture to 32-bits and having separate copies of each 32-bit image for each palette is NOT an option.
5) Your code must have a reasonable frame rate on a GeForce or better. (It can be slower on older generation cards, but it must be able to run on those slower cards.)
6) You must include support for 32-bit RGBA textures.
Well, I think that's it for the restrictions. Good luck!