Login  Register

Re: requested graphics configuration

Posted by runiter on Jan 17, 2013; 8:23pm
URL: https://forum.jogamp.org/requested-graphics-configuration-tp4027845p4027907.html

gouessej wrote
DisplaySettings only has 2 variables. I would need to modify the core API of Ardor3D to add 2 variables in order to do what you want or Renanse should clarify how to use colorDepth and alphaBits. If colorDepth handled the 3 first components and alphabits the very last one, I would be able to provide a fix, you would set colorDepth to 30 and alphaBits to 2.
Looks at least in Windows it's common practice to pick a general color bits (ie. 32 or 16) and alpha bits, and let the chooser handle how many bits each color should have.

Here's how Microsoft does it by ignoring red, green and blue bits passed to PIXELFORMATDESCRIPTOR and only taking the general number of bits per pixel and alpha bits into consideration:

http://msdn.microsoft.com/en-us/library/windows/desktop/dd318284(v=vs.85).aspx

I'm guessing that if the user passed ColorBit of 32 and AlphaBit of 8, then you can assume that each color component should have (32-8)/3=8 bits. Is this a good way to go?
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D