Results 1 to 3 of 3

Thread: Change specific colors in textures to other specific colors (pallet swap)

  1. #1
    Newbie Newbie
    Join Date
    Jun 2015
    Posts
    1

    Change specific colors in textures to other specific colors (pallet swap)

    So I'm making a game using OpenGL, and I've gotten by by using multiple tutorials, however I am still pretty unfamiliar with using most of OpenGL. I have no idea how to change the color of pixels in textures, or how to really use FBOs. I need to be able to change my character's colors like how Mega Man changes his colors, but I have no idea how to do this with OpenGL, and I haven't been able to find anything helpful on this despite searching for LITERALLY WEEKS! Could someone please help me?

  2. #2
    Junior Member Newbie
    Join Date
    Jun 2015
    Posts
    4
    Or... you could simply use a sprite sheet with all the colors you want your character to have. That's pretty much what most 2D games would have implemented.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    3,105
    Quote Originally Posted by Entity1037 View Post
    So I'm making a game using OpenGL, and I've gotten by by using multiple tutorials, however I am still pretty unfamiliar with using most of OpenGL. I have no idea how to change the color of pixels in textures, or how to really use FBOs. I need to be able to change my character's colors like how Mega Man changes his colors, but I have no idea how to do this with OpenGL
    I've never played Mega Man, but given that it appears to be an NES game, I'm assuming that it uses colour-index (aka colour-mapped, paletted) textures. Apart from the EXT_paletted_texture extension (which isn't supported on modern hardware), OpenGL doesn't support these directly. However, you can implement them yourself using a fragment shader.

Similar Threads

  1. Replies: 3
    Last Post: 06-19-2016, 08:11 AM
  2. using GL_MAP2_COLOR_4 inOpenGL to change vertexe colors
    By ali----- in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-13-2013, 12:49 PM
  3. the colors of the texture change when i render
    By luisillo in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-09-2006, 02:43 AM
  4. Swap colors w/o color matrix?
    By wolfgang in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 07-05-2004, 06:16 AM
  5. why do colors change in fullscreen mode?
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-27-2002, 04:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean