2 Replies Latest reply on Aug 24, 2016 12:28 PM by benc

    Sample Code for 10 Bit Color Depth Display

    greenmadrid

      Summary: Looking for sample code for 10 bit color depth display

       

      Hi, I am a beginner in graphics.

       

      I would like to write a 10 bit color depth display program for Windows 10 64 bit application.

       

      I referred to this page and downloaded the SDK for AMD FirePro.

      http://developer.amd.com/tools-and-sdks/graphics-development/firepro-sdk/

       

      Somehow the sample code in 'main.cpp' in the folder [samples]-[wgl-10bit] looks different to the sample codes written in the '10-bit.pdf' in [samples]-[wgl-10bit]-[doc].

      I hope someone would not mind enlightening me with a sample code written in the '10-bit.pdf' or other sources available.

       

      I tried some part of the code written in the '10-bit.pdf' but was not successful. I wrote an application which is able to draw from 0-1023 bit in grayscale, with adjustable grayscale level.

      However, I was only able to display the image in 8-bit color depth. The change was onbly visible when I incremented the grayscale by 4 bit.

      I am wondering whether I used the suitable color format and therefore would like to have a look of the suggested sample code.

       

      Below is the specification which I used for my developed application.

       

      Hardware:

      CPU: Dell OptiPlex 980

      Monitor: EIZO GX540 (using Display Port Interface)

      Graphic Board: FirePro W4100

       

      Software:

      OS: Windows 10 Pro 64 bit

      Graphic Board Driver Package Version: 15.201.2401-151104a-296716c-Retail_End_User (with 10 bit pixel format support enabled)

      Open GL Version: 6.14.10.13411

       

      Thank you in advance.

        • Re: Sample Code for 10 Bit Color Depth Display
          fsadough

          Please PM me your email address

           



           

          • Re: Sample Code for 10 Bit Color Depth Display
            benc

            Hi,

             

            To use 10 bits you first need to activate the feature in the driver settings.

            Then you need to require a 10bits pixel format from windows

            ChoosePixelFormat function (Windows)

              pfd.nSize           = sizeof(PIXELFORMATDESCRIPTOR);

              pfd.nVersion        = 1;

              pfd.dwFlags         = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL  | PFD_DOUBLEBUFFER  ;

              pfd.iPixelType      = PFD_TYPE_RGBA;

              pfd.cColorBits      = 32;

              pfd.cRedBits        = Need10Bits?10:8;

              pfd.cRedShift       = 0;

              pfd.cGreenBits      = Need10Bits?10:8;

              pfd.cGreenShift     = 0;

              pfd.cBlueBits       = Need10Bits?10:8;

              pfd.cBlueShift      = 0;

              pfd.cAlphaBits      = Need10Bits?2:8;

              pfd.cAlphaShift     = 0;

              pfd.cAccumBits      = 0;

              pfd.cAccumRedBits   = 0;

              pfd.cAccumGreenBits = 0;

              pfd.cAccumBlueBits  = 0;

              pfd.cAccumAlphaBits = 0;

              pfd.cDepthBits      = 24;

              pfd.cStencilBits    = 8;

              pfd.cAuxBuffers     = 0;

              pfd.iLayerType      = PFD_MAIN_PLANE;

              pfd.bReserved       = 0;

              pfd.dwLayerMask     = 0;

              pfd.dwVisibleMask   = 0;

              pfd.dwDamageMask    = 0;

             

            At this stage you can check if the pixel format returned by ChoosePixelFormat is a 10 bits one.

            If not it means your card doesn't support it

             

            10 bits is only supported on FirePro (and the new RadeonPro) brand.