🔒 Locked
Bits Per Pixel
Advertisement
Original Post
I am writing a 2d game using 16bit colour in directx7. I''ve read that if you load in a bitmap using a different colour count, eg 8 bit(palette mode), onto a surface, directx automatically stores the surface into system memory as opposed to video memory. Is this true?, if so how do I convert an image to 16 bit colour, as my paint program (Paint Shop Pro 5) only sets colour counts to 8bit, 24bit etc, but not 16bit!. Do I just store the bmp in 24 bit?
The game is running fine, I just want to make sure that I am using the video memory not system memory for storing off screen plain surfaces.
Cheers
As far as I know, there is no 16-bit BMP.... Hmmm.....
What are you using to load the BMP files though? If you don''t use the framework library (I think it sux.... but maybe that''s just me) you can probably convert them.
Oh well, I guess it doesn''t concern me right now. I''m doing a 3D engine in DX8
Oh what fun, time to get 3DS files load... cya
DuSiK
------------------------
CRAZY_DUSIK* pCrazyDuSiK;
pCrazyDuSiK->EatMicroshaft(MS_MUNCH_BILL_GATES | MS_CHEW_BILL_GATES);
What are you using to load the BMP files though? If you don''t use the framework library (I think it sux.... but maybe that''s just me) you can probably convert them.
Oh well, I guess it doesn''t concern me right now. I''m doing a 3D engine in DX8
DuSiK
------------------------
CRAZY_DUSIK* pCrazyDuSiK;
pCrazyDuSiK->EatMicroshaft(MS_MUNCH_BILL_GATES | MS_CHEW_BILL_GATES);
I am using 24 bit bmps. I am using the DDLoadBitmap function in the ddutil.cpp file that you get with directx7. The game is running at 640x480x16 in full screen mode. I am specifying the surface to use video memory. Basically what I am asking is when running a game in 16bpp mode, can I use 24bit bmps?
You need to convert them at runtime when you load the images. The format of the pixels will be different depending on what graphics card the app is running on, so you have to detect this and then do the conversion.
The D3DX utility library has bitmap loading functions, or use the GDI to blit to the surface to do the conversion, or write the pixels directly yourself.
The D3DX utility library has bitmap loading functions, or use the GDI to blit to the surface to do the conversion, or write the pixels directly yourself.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement