On Tue, Apr 14, 2009 at 7:51 AM, Greg Ewing <[email protected]>wrote:
> > 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. > Loading indexed-colour textures ought to be ok, since they will be transformed to floating-point when they are loaded, but be warned that actually rendering in indexed-colour causes software fallback on many (if not all) modern graphics cards, which is a big performance hit. -- Tristam MacDonald http://swiftcoder.wordpress.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
