Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#196 30-bit video mode

open
nobody
moderate (59)
5
2013-02-27
2013-02-27
Kris Lamb
No

In glut 3.7 I can set the video mode using glutInitDisplayString("red=10 green=10 blue=10 alpha=2"); when I query the driver with:
int rbits, gbits, bbits, abits;
glGetIntegerv(GL_RED_BITS, &rbits);
glGetIntegerv(GL_GREEN_BITS, &gbits);
glGetIntegerv(GL_BLUE_BITS, &bbits);
glGetIntegerv(GL_ALPHA_BITS, &abits);

I get 10,10,10,2 respectively but using freeglut it will still only give me 8,8,8,8. I haven't tried looking into the code too much myself to figure out why it won't work, but maybe someone who knows the api better can spot the fix sooner.

I'm marking as moderate, because at the moment it means I can't use freeglut, however due to the program I'm writing I require mouse wheel support which glut 3.7 does not provide either and I also use glutLeaveMainLoop

Discussion

1 2 > >> (Page 1 of 2)
  • Hi Kris,

    glutInitDisplayString currently does not actually parse its arguments, thats not implemented. Some of the more important ones are done via glutSetOption, but the color/bitdepth ones are currently not available. I can implement this quickly in trunk if, if you're using trunk.

    Best,
    Dee

     
  • Hmm, forgot to ask, what platform?

     
  • been looking into this, on windows we can only get pixel formats that match the bit depth the display is currently set to. So what platform are you working with? I can provide a patch for trunk for you to test...

     
  • Kris Lamb
    Kris Lamb
    2013-02-28

    I actually did go into the source and found exactly what you said, I implemented a crude version for windows. But ideally would be nice if it could work for Linux and Windows. The application I'm writing is cross-platform and depending on users needs will run on either Linux/Windows. The windows fix would be higher priority in my case.

    Thanks for the help thus far :)

     
  • If you got something that actually works on Windows, even if its crude, could you attach a patch here? From what i understand, it shouldn't be possible on windows unless you switch to a 10bit mode with gamemode...

     
  • Kris Lamb
    Kris Lamb
    2013-02-28

    Of course the hack I did was from the 2.8.0 release, and it looks like the trunk has changed quite a few things in the area I mucked with, but I'm trying to throw together something equivalent in the meantime.

     
  • Kris Lamb
    Kris Lamb
    2013-02-28

     
    Attachments
  • Kris Lamb
    Kris Lamb
    2013-02-28

    I tried to do a patch but got line ending complaints, so I just attached the 2 files. Like I said it's a bit of a hack using externed globals, but it got me up and running in 30-bit video mode for now.

     
  • Thanks for showing me how you implemented this. I tried something similar but get nowhere.
    I am actually very surprised this works. The MS docs say explicitly that cRedBits etc fields should be left at 0, and that only the cColorBits and cAlphaBits fields should be used when feeding the struct into ChoosePixelFormat. Those other fields are for descriptions of the pixel format only. For wglChoosePixelFormatARB this is not specified, so feeding them should be fine.

    In any case, i tried a similar thing but never got what i requested. It might be a driver issue, or have something to do with that I'm on windows 8. I sent you a private message to ask for your email address so that i could send you what I did for you to test.

    Thanks!
    Dee

     
  • Kris Lamb
    Kris Lamb
    2013-03-01

    you can reach me at lamb.kris@gmail.com

    If you have an nVidia card you need to enable deep color mode http://www.nvidia.ca/docs/IO/40049/TB-04701-001_v02_new.pdf

    and for amd/ati open up catalyst control center, I have a firePro, so it's under AMD Firepro->AMD FirePro Settings-> and check the Enabel 10-bit pixel format support.

    Without setting the driver up correctly the 10-10-10-2 mode will not even be available and thus when you request it you'll just get 8-8-8-8 (or whatever default closest matches the query) Some cards also support an 11-11-10-0 mode too.

    I have a monitor that supports 10-bit color depth and I can actually do a test by outputting grey levels and can see a smooth transition and then move the test to an 8-bit monitor and there will be noticeable gradients. So I know that driver is acting accordingly.

    Thanks for the help so far :)

     
1 2 > >> (Page 1 of 2)