Renamed dx_Window to dx_Viewport

TRAC #11594 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@356 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent be5a0867
...@@ -181,7 +181,7 @@ void OutputHLSL::header() ...@@ -181,7 +181,7 @@ void OutputHLSL::header()
if (mUsesFragCoord) if (mUsesFragCoord)
{ {
out << "uniform float4 dx_Window;\n" out << "uniform float4 dx_Viewport;\n"
"uniform float2 dx_Depth;\n"; "uniform float2 dx_Depth;\n";
} }
......
...@@ -1701,7 +1701,7 @@ bool Context::applyRenderTarget(bool ignoreViewport) ...@@ -1701,7 +1701,7 @@ bool Context::applyRenderTarget(bool ignoreViewport)
GLfloat xy[2] = {1.0f / viewport.Width, 1.0f / viewport.Height}; GLfloat xy[2] = {1.0f / viewport.Width, 1.0f / viewport.Height};
programObject->setUniform2fv(halfPixelSize, 1, (GLfloat*)&xy); programObject->setUniform2fv(halfPixelSize, 1, (GLfloat*)&xy);
GLint window = programObject->getDxWindowLocation(); GLint window = programObject->getDxViewportLocation();
GLfloat whxy[4] = {mState.viewportWidth / 2.0f, mState.viewportHeight / 2.0f, GLfloat whxy[4] = {mState.viewportWidth / 2.0f, mState.viewportHeight / 2.0f,
(float)mState.viewportX + mState.viewportWidth / 2.0f, (float)mState.viewportX + mState.viewportWidth / 2.0f,
(float)mState.viewportY + mState.viewportHeight / 2.0f}; (float)mState.viewportY + mState.viewportHeight / 2.0f};
......
...@@ -1394,8 +1394,8 @@ bool Program::linkVaryings() ...@@ -1394,8 +1394,8 @@ bool Program::linkVaryings()
if (mFragmentShader->mUsesFragCoord) if (mFragmentShader->mUsesFragCoord)
{ {
mPixelHLSL += " float rhw = 1.0 / input.gl_FragCoord.w;\n" mPixelHLSL += " float rhw = 1.0 / input.gl_FragCoord.w;\n"
" gl_FragCoord.x = (input.gl_FragCoord.x * rhw) * dx_Window.x + dx_Window.z;\n" " gl_FragCoord.x = (input.gl_FragCoord.x * rhw) * dx_Viewport.x + dx_Viewport.z;\n"
" gl_FragCoord.y = (input.gl_FragCoord.y * rhw) * dx_Window.y + dx_Window.w;\n" " gl_FragCoord.y = (input.gl_FragCoord.y * rhw) * dx_Viewport.y + dx_Viewport.w;\n"
" gl_FragCoord.z = (input.gl_FragCoord.z * rhw) * dx_Depth.x + dx_Depth.y;\n" " gl_FragCoord.z = (input.gl_FragCoord.z * rhw) * dx_Depth.x + dx_Depth.y;\n"
" gl_FragCoord.w = rhw;\n"; " gl_FragCoord.w = rhw;\n";
} }
...@@ -1527,7 +1527,7 @@ void Program::link() ...@@ -1527,7 +1527,7 @@ void Program::link()
mDepthRangeFarLocation = getUniformLocation("gl_DepthRange.far", true); mDepthRangeFarLocation = getUniformLocation("gl_DepthRange.far", true);
mDepthRangeDiffLocation = getUniformLocation("gl_DepthRange.diff", true); mDepthRangeDiffLocation = getUniformLocation("gl_DepthRange.diff", true);
mDxDepthLocation = getUniformLocation("dx_Depth", true); mDxDepthLocation = getUniformLocation("dx_Depth", true);
mDxWindowLocation = getUniformLocation("dx_Window", true); mDxViewportLocation= getUniformLocation("dx_Viewport", true);
mDxHalfPixelSizeLocation = getUniformLocation("dx_HalfPixelSize", true); mDxHalfPixelSizeLocation = getUniformLocation("dx_HalfPixelSize", true);
mDxFrontCCWLocation = getUniformLocation("dx_FrontCCW", true); mDxFrontCCWLocation = getUniformLocation("dx_FrontCCW", true);
mDxPointsOrLinesLocation = getUniformLocation("dx_PointsOrLines", true); mDxPointsOrLinesLocation = getUniformLocation("dx_PointsOrLines", true);
...@@ -2436,7 +2436,7 @@ void Program::unlink(bool destroy) ...@@ -2436,7 +2436,7 @@ void Program::unlink(bool destroy)
mDepthRangeNearLocation = -1; mDepthRangeNearLocation = -1;
mDepthRangeFarLocation = -1; mDepthRangeFarLocation = -1;
mDxDepthLocation = -1; mDxDepthLocation = -1;
mDxWindowLocation = -1; mDxViewportLocation = -1;
mDxHalfPixelSizeLocation = -1; mDxHalfPixelSizeLocation = -1;
mDxFrontCCWLocation = -1; mDxFrontCCWLocation = -1;
mDxPointsOrLinesLocation = -1; mDxPointsOrLinesLocation = -1;
...@@ -2761,9 +2761,9 @@ GLint Program::getDxDepthLocation() const ...@@ -2761,9 +2761,9 @@ GLint Program::getDxDepthLocation() const
return mDxDepthLocation; return mDxDepthLocation;
} }
GLint Program::getDxWindowLocation() const GLint Program::getDxViewportLocation() const
{ {
return mDxWindowLocation; return mDxViewportLocation;
} }
GLint Program::getDxHalfPixelSizeLocation() const GLint Program::getDxHalfPixelSizeLocation() const
......
...@@ -97,7 +97,7 @@ class Program ...@@ -97,7 +97,7 @@ class Program
GLint getDepthRangeNearLocation() const; GLint getDepthRangeNearLocation() const;
GLint getDepthRangeFarLocation() const; GLint getDepthRangeFarLocation() const;
GLint getDxDepthLocation() const; GLint getDxDepthLocation() const;
GLint getDxWindowLocation() const; GLint getDxViewportLocation() const;
GLint getDxHalfPixelSizeLocation() const; GLint getDxHalfPixelSizeLocation() const;
GLint getDxFrontCCWLocation() const; GLint getDxFrontCCWLocation() const;
GLint getDxPointsOrLinesLocation() const; GLint getDxPointsOrLinesLocation() const;
...@@ -204,7 +204,7 @@ class Program ...@@ -204,7 +204,7 @@ class Program
GLint mDepthRangeNearLocation; GLint mDepthRangeNearLocation;
GLint mDepthRangeFarLocation; GLint mDepthRangeFarLocation;
GLint mDxDepthLocation; GLint mDxDepthLocation;
GLint mDxWindowLocation; GLint mDxViewportLocation;
GLint mDxHalfPixelSizeLocation; GLint mDxHalfPixelSizeLocation;
GLint mDxFrontCCWLocation; GLint mDxFrontCCWLocation;
GLint mDxPointsOrLinesLocation; GLint mDxPointsOrLinesLocation;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment