DDPIXELFORMAT 4-4-4 in 16bpp

Started by
8 comments, last by KartalTr 23 years, 9 months ago
hi. Can i use 4-4-4(RGB) in 16bpp? Can anybody give a little sample? I couldn''t shift colors. ddpfPixelFormat.dwFlags := DDPF_RGB; ddpfPixelFormat.dwRGBBitCount := 16; ddpfPixelFormat.dwRBitMask := $00000F00; ddpfPixelFormat.dwGBitMask := $000000F0; ddpfPixelFormat.dwBBitMask := $0000000F; I tried this but result was ''surface can''t create''. I wan''t to use it because of using alpha channel for menus and some effects(like clouds, window''s shadow...) faster. ps: sorry for my English.. Regards Kartal
Advertisement

You write :

ddpfPixelFormat.dwRBitMask := $00000F00;
ddpfPixelFormat.dwGBitMask := $000000F0;
ddpfPixelFormat.dwBBitMask := $0000000F;

I think it should be :

ddpfPixelFormat.dwRBitMask := $00007C00;
ddpfPixelFormat.dwGBitMask := $000003E0;
ddpfPixelFormat.dwBBitMask := $0000001F;



--
Kyodai Mahjongg
kyodai.com
--Kyodai Mahjonggkyodai.com

You wrote the code correctly although I'm unsure if you set bit count correctly (you put 16 while you're using 12 bits). Furthermore the mode you want to use might not be supported by your software or hardware. In GDI setting bits for every RGB component does work, but not on WinNT (on Win2k neither) and I'm in doubt if it is possible to do in DirectX.

To Kyodai no Naoki:
He wanted to do 4-4-4 mask, not 5-5-5.



Edited by - Lifepower on July 17, 2000 5:08:13 PM
quote:Original post by Lifepower
To Kyodai no Naoki:
He wanted to do 4-4-4 mask, not 5-5-5.


Oops
I never use that kind of format anyway

PS : Hmm you can call me Naoki, I had to set this user name because I had problems with my passwords with other user names )


--
Kyodai Mahjongg
kyodai.com
--Kyodai Mahjonggkyodai.com
I tried setting the 4-4-4 mask and although I haven''t got error that surface can''t be created, it behaved strange and then got messed up so I think it''s impossible to do that.

To Naoki: I just cut''n''paste your name ''cause I was unsure about it ;-)
Why would you want 4-4-4?

That would only be 4096 colors (like an Amiga )

4-4-4=4096 colors
5-5-5=32768 colors
5-6-5=65536 colors




-Coleco

Rock the cradle of love!
You stupid WANKER!

--HASBRO SUCKS--

Rock the cradle of love! You stupid WANKER!
quote:
Why would you want 4-4-4?

That would only be 4096 colors (like an Amiga )


I think people like the 444 RGB + 4 Alpha with the important thing being the 4 bits of alpha channel. For tranparency, etc...

[ turbo | turbo.gamedev.net ]
[ Michael Wilson | turbo sys-op | turbo.gamedev.net ]
Hi

Yeah you all understand what i want.

ddpfPixelFormat.dwFlags := DDPF_RGB;
ddpfPixelFormat.dwRGBBitCount := 16;
ddpfPixelFormat.dwRBitMask := $00000F00;
ddpfPixelFormat.dwGBitMask := $000000F0;
ddpfPixelFormat.dwBBitMask := $0000000F;
This code not work in Jedi Dx header files. What should i add or change in my code.

Thanks for all replies but a little sample for 444RGB + 4Alpha will be more appreciated

ps: Sorry again for English and late reply..
Thanks and regards..
Kartal
Hi everybody, back from my holidays
Let''s get started.

Well to answer that : You can''t use 4-4-4 in 16bpp with DirectX.
It would be possible if you''d have a graphic-card that could handle such a Pixelformat, but for the normal ones the only supported ones are

R: 0x0000F800
G: 0x000007E0
B: 0x0000001F
A: 0x00000000

and

R: 0x00007C00
G: 0x000003E0
B: 0x0000001F
A: 0x00000000

[ Ampaze | www.crazyentertainment.net ]
[ Ampaze | www.crazyentertainment.net ]
Thanks for all replies.

Regards
Kartal

This topic is closed to new replies.

Advertisement