Help please

Started by
7 comments, last by caffeineaddict 22 years, 8 months ago
I''ve got a problem, I wrote my game, and ran it in 16 bit color mode, no problem here, but I wanted to see if it would run in other modes, so i changed my settings on my desktop to 256 colors and tried to run my game, well it executed but nothing but a grey screen was there, does anyone have any idea why it did this? If you know of some way to remedy this please post it here.
Advertisement
Hey,
Are you using some API or function calls to change the computer''s color depth to the one needed in the game? Otherwise, if the game uses things like true-color graphics and you''re in 256 color mode, you''re going to have some problems.
You should make your game change the color mode when it is started. It shouldn''t just use the one the user has set, or otherwise you will have major trouble.
how can i make it change it when it starts?

also when it starts i am assuming you're in 16 bit, i didn't know how to change it, or i would have.

Edited by - caffeineaddict on August 1, 2001 1:12:09 AM
try looking at any of the Nehe tutorials ... they all have code for changing resolution / colour depth!

Regards
I looked at the demos on there but i just saw where it was changing the color bit, i never saw where you could change it to 256 color mode if you wanted, please help.
You can''t use 256 color w/OpenGL AFAIK. 15/16 bit and up only. 256 mode is a palletized mode which cannot be hardware accelerated (for 3d anyways). Of course i could just be talking out of my arse since i have done little with OpenGL.
Thanks AP, that will save me many hours and headaches trying to find code for this.
I''ve taken this piece of code from NeHe''s first tutorial:

// Create Our OpenGL Window
if (!CreateGLWindow("...",640,480,16,fullscreen))
{
return 0;
// Quit If Window Was Not Created
}

If you place 8 instead of 16 you should be using the 8-bit (256 color) mode. You will see that this doesn''t work as it should (at least here it doesn''t).

This topic is closed to new replies.

Advertisement