Trixie wrote: > I have sprites that are 8 bit (256 colors). I'd like to be able to > swap color palettes on the fly, much like many classic arcade and home > console games did.
This seems to be sort-of supported. According to the red book: "...you can specify a texture with a GL_COLOR_INDEX image. In that case, pixel-transfer operations are applied to convert the indices to RGBA values by table lookup before they're used to form the texture image." [Red book, 4th ed., p. 372] However, it appears that the transformation is performed when you load the texture (using glTexImage2d), not at rendering time. If you have shaders available, you might be able to devise a pixel shader that does color map lookups on the texture values. Another way would be to precalculate a set of RGB textures from your color index texture in the program and load them as separate textures. -- Greg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
