简体   繁体   中英

Palette swapping with iPhone and OpenGLES

I am working on an iPhone game, which will have many types of creeps, and each type of creep may have different colors, so I'm looking for the best way to do it, which so far seems to be palette swaping. Is GL_EXT_paletted_texture available in OpenGLES (it is deprecated in OpenGL)? Since my game must support older devices (iPhone 3G) I can't use shaders, so I'm stuck with fixed pipeline.

How should I do palette swapping with OpenGLES on an iPhone?

It sounds that you can use glCompressedTexImage2D with GL_PALETTE4_RGB8_OES or GL_PALETTE8_RGBA8_OES. It would be possible to load texel data with various palette data.

Or you can use OpenGL ES 1.1 Texture Environments. Combine texture or constant color with proper environment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM