cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

super_xu
Journeyman III

[W600] how to use DOPP to do color calibration

Jump to solution

Hello AMD, I'm a Chinese student. I'm now using W600 to acheive a 2X2 display. Here are the problems.

First, I want to change the desktop texture's RGB one by one pixel by a RGB LUT. I've downloaded the DOPP SDK. But there are only the class definition in it. I don't konw how to use it. So, can you give some samples to show me how to use the SDK?

Second, about the "DOPPenable.exe", does it have someting to do with the displaycard driver? I mean it makes getting and setting the desktop texture through the driver APIs? Can I get the source program about the "DOPPenable.exe"

Tags (3)
0 Likes
1 Solution

Accepted Solutions
chm
Staff
Staff

Re: [W600] how to use DOPP to do color calibration

Jump to solution

Hi,

the DOPP SDK contains sample code that illustrate how to acquire the desktop texture and how to render it using a shader. Please make sure to download the DOPP_SDK_1.0.zip from our web-page: http://developer.amd.com/tools-and-sdks/graphics-development/firepro-sdk/

Please have a look at the GLDOPPEngine class (DOPPSDK_1.0\DOPPEffectOpenGL\DOPPWin32\GLDOPPEngine.cpp). The GLDOPPEngine::initDOPP shows how to get access to the desktop texture and how to attach a present texture to a FBO. Later you can render the desktop texture to the FBO using your shader that changes the RGB values have the OS using the present texture as desktop.

1: get desktop texture

m_uiDesktopTexture = wglGetDesktopTextureAMD();

glBindTexture(GL_TEXTURE_2D, m_uiDesktopTexture);

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

...

2: Attach present texture to FBO:

m_uiPresentTexture = wglGenPresentTextureAMD();

....

glBindFramebuffer(GL_FRAMEBUFFER, m_uiFBO);

glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_uiPresentTexture, 0);

3: Render to present texture

// Bind FBO with attached present texture

glBindFramebuffer(GL_FRAMEBUFFER, m_uiFBO);

// Bind your shader

m_pShader->bind();

...

glBindTexture(GL_TEXTURE_2D, m_uiDesktopTexture);

// Draw desktop texture using shader

glBindVertexArray(m_uiVertexArray);

glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);

glBindVertexArray(0);


m_pShader->unbind();

You will find all this code in the DOPP SDK.

Please make sure to have windows Aero enabled.

DOPPenable.exe will simply activate DOPP since it is not on by default. You just need to do it once after the driver is installed.

Chris

View solution in original post

0 Likes
1 Reply
chm
Staff
Staff

Re: [W600] how to use DOPP to do color calibration

Jump to solution

Hi,

the DOPP SDK contains sample code that illustrate how to acquire the desktop texture and how to render it using a shader. Please make sure to download the DOPP_SDK_1.0.zip from our web-page: http://developer.amd.com/tools-and-sdks/graphics-development/firepro-sdk/

Please have a look at the GLDOPPEngine class (DOPPSDK_1.0\DOPPEffectOpenGL\DOPPWin32\GLDOPPEngine.cpp). The GLDOPPEngine::initDOPP shows how to get access to the desktop texture and how to attach a present texture to a FBO. Later you can render the desktop texture to the FBO using your shader that changes the RGB values have the OS using the present texture as desktop.

1: get desktop texture

m_uiDesktopTexture = wglGetDesktopTextureAMD();

glBindTexture(GL_TEXTURE_2D, m_uiDesktopTexture);

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

...

2: Attach present texture to FBO:

m_uiPresentTexture = wglGenPresentTextureAMD();

....

glBindFramebuffer(GL_FRAMEBUFFER, m_uiFBO);

glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_uiPresentTexture, 0);

3: Render to present texture

// Bind FBO with attached present texture

glBindFramebuffer(GL_FRAMEBUFFER, m_uiFBO);

// Bind your shader

m_pShader->bind();

...

glBindTexture(GL_TEXTURE_2D, m_uiDesktopTexture);

// Draw desktop texture using shader

glBindVertexArray(m_uiVertexArray);

glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);

glBindVertexArray(0);


m_pShader->unbind();

You will find all this code in the DOPP SDK.

Please make sure to have windows Aero enabled.

DOPPenable.exe will simply activate DOPP since it is not on by default. You just need to do it once after the driver is installed.

Chris

0 Likes