Skip to main content
GameDev.net gamedev.net
🔒 Locked

How to use paletted textures?

Started by HyperHacker Aug 18, 2010 at 8:44 PM 0 replies 700+ views
Original Post
HyperHacker
HyperHacker
This seems like a pretty basic thing but I've been looking everywhere and can't seem to find any explanation, save for a few function calls I don't seem to have. I want to display an 8-bit (or less) paletted image and animate its palette.

I'm making a 2D game engine in Super NES style. I want to use palettes for animation and because I'd like to try to port to some low-end systems such as the Nintendo DS.

The colour index functions look like what I want but I can't find any way to define the table of colours. glColorTable, glColorPointer, glIndexPointer are all doing nothing. All I get is a completely black texture. Some pages suggested using glColorTableEXT but that doesn't seem to be defined on my system.

I keep finding pages that say things like palettes are no longer supported by modern drivers (which seems ridiculous to me given how useful they are) and shaders should be used instead, or that GL never supported palettes natively and some extension has to be used, but that leaves me to wonder what GL_COLOR_INDEX and such are for. Have modern systems really just dropped palette support entirely? Am I using the wrong functions? I don't get any errors returned, but no colours either.
---------------------------------dofile('sig.lua')

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.