Results 1 to 6 of 6

Thread: change gamma ramp in video card

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: change gamma ramp in video card

    Maybe QWidget::getDC() will help?

  2. #2
    Join Date
    Mar 2006
    Posts
    74
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1

    Default Re: change gamma ramp in video card

    I don't see this for Qt3. But perhaps I can look in the Qt4 code and create my own version of this based on it.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: change gamma ramp in video card

    Quote Originally Posted by hvengel View Post
    I don't see this for Qt3. But perhaps I can look in the Qt4 code and create my own version of this based on it.
    Sorry, I haven't noticed that you are using Qt3. AFAIR QWidget::winId() returns HWND on windows. Once you have it, you can get HDC through win API.

  4. #4
    Join Date
    Mar 2006
    Posts
    74
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1

    Default Re: change gamma ramp in video card

    OK now I have the same basic question about OS/X. OS/X has these functions for setting the gamma ramp:

    CGDisplayErr CGSetDisplayTransferByTable (
    CGDirectDisplayID display,
    CGTableCount tableSize,
    const CGGammaValue * redTable,
    const CGGammaValue * greenTable,
    const CGGammaValue * blueTable
    );

    and

    CGDisplayErr CGGetDisplayTransferByTable (
    CGDirectDisplayID display,
    CGTableCount capacity,
    CGGammaValue * redTable,
    CGGammaValue * greenTable,
    CGGammaValue * blueTable,
    CGTableCount * sampleCount
    );

    Which are similar to X11 and Windows functions for the same thing but there are some differences. Like the gamma table values are floats in the range of 0.0 through 1.0 instead of unsigned shorts in the range of 0 to 2^16 on the other platforms. OK not a big deal. But how do I get from QDesktopWidget::screenNumber() to a CGDirectDisplayID so that I can make these calls? Are these the same thing or are they different? If they are different are there some functions for getting the CGDirectDisplayID available? I can't seem to find any docs about this.

  5. #5
    Join Date
    Mar 2006
    Posts
    74
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1

    Default Re: change gamma ramp in video card

    OK I didn't mean to stump the band. So I will bump this to see if perhaps a new set of eyes might have an idea about how to get this working on a Mac.

Similar Threads

  1. [SOLVED] DirectShow Video Player Inside Qt
    By ToddAtWSU in forum Qt Programming
    Replies: 16
    Last Post: 3rd November 2011, 07:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.