8-bit color in SDL?

Questions regarding game mechanics and graphic programming should go here.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

8-bit color in SDL?

Postby Mullvalen » Fri Sep 23, 2005 12:02 pm

How to have indexed color in SDL and how do i load palettes and use them?

Hmmm. I could set it to 8-bit but why do i get black and white vertical lines over the whole screen?
Mullvalen
 
Posts: 47
Joined: Fri Jun 24, 2005 1:53 pm
Location: Stavromula Beta

Postby Dante Shamest » Sat Sep 24, 2005 2:19 am

Do the black/white lines occur when you use SDL_FULLSCREEN, or without? Or both?
User avatar
Dante Shamest
Moderator
 
Posts: 3131
Joined: Wed Oct 22, 2003 10:29 pm
Location: Malaysia

Postby Mullvalen » Sat Sep 24, 2005 3:46 am

Both times. In 32 bit it works fine and in 16-bit like 8-bit and 31 bit mixed together
Mullvalen
 
Posts: 47
Joined: Fri Jun 24, 2005 1:53 pm
Location: Stavromula Beta

Postby Mullvalen » Sat Sep 24, 2005 3:51 am

Ive stored color data in a char field. When i changed that field into an int field it turned to be worse.

But thats maybe not the problem. I have an function to get the color of a spot from the field and eaven i i dont use that function i get the same problem
Mullvalen
 
Posts: 47
Joined: Fri Jun 24, 2005 1:53 pm
Location: Stavromula Beta

Postby Mullvalen » Fri Sep 30, 2005 1:45 pm

Hmm, it seems that each column is offseted one extra x position
Mullvalen
 
Posts: 47
Joined: Fri Jun 24, 2005 1:53 pm
Location: Stavromula Beta


Return to Games and Graphics

Who is online

Users browsing this forum: No registered users and 0 guests