Commit 12463081 authored by Ken Martin's avatar Ken Martin
Browse files

Fix compile warning in TextureObject

Texture object method was requiring the width and height of the
framebuffer as arguments.  It was doing error testing on these
arguments but there is no reason to.  Copying a texture where part of
the texture goes outside the framebuffer is fine. That can happen
and is not a problem. The extra texels just get discarded. This also
saves having to know the width and height of the frame buffer
to make this call.

Change-Id: I96cafda2ac900f1ecd247e6678e1e68cbccf033c
parent 386cfd4f
......@@ -172,7 +172,7 @@ vtkIdType vtkOpenGLContextBufferId::GetPickedItem(int x, int y)
......@@ -1618,9 +1618,7 @@ void vtkTextureObject::CopyToFrameBuffer(int srcXmin,
int srcXmax,
int srcYmax,
int dstXmin,
int dstYmin,
int width,
int height)
int dstYmin)
assert("pre: positive_srcXmin" && srcXmin>=0);
assert("pre: max_srcXmax" &&
......@@ -1632,10 +1630,6 @@ void vtkTextureObject::CopyToFrameBuffer(int srcXmin,
assert("pre: increasing_y" && srcYmin<=srcYmax);
assert("pre: positive_dstXmin" && dstXmin>=0);
assert("pre: positive_dstYmin" && dstYmin>=0);
assert("pre: positive_width" && width>0);
assert("pre: positive_height" && height>0);
assert("pre: x_fit" && dstXmin+(srcXmax-srcXmin)<width);
assert("pre: y_fit" && dstYmin+(srcYmax-srcYmin)<height);
......@@ -433,8 +433,7 @@ public:
// Description:
// Copy a sub-part of the texture (src) in the current framebuffer
// at location (dstXmin,dstYmin). (dstXmin,dstYmin) is the location of the
// lower left corner of the rectangle. width and height are the dimensions
// of the framebuffer.
// lower left corner of the rectangle.
// \pre positive_srcXmin: srcXmin>=0
// \pre max_srcXmax: srcXmax<this->GetWidth()
// \pre increasing_x: srcXmin<=srcXmax
......@@ -443,18 +442,12 @@ public:
// \pre increasing_y: srcYmin<=srcYmax
// \pre positive_dstXmin: dstXmin>=0
// \pre positive_dstYmin: dstYmin>=0
// \pre positive_width: width>0
// \pre positive_height: height>0
// \pre x_fit: destXmin+(srcXmax-srcXmin)<width
// \pre y_fit: destYmin+(srcYmax-srcYmin)<height
void CopyToFrameBuffer(int srcXmin,
int srcYmin,
int srcXmax,
int srcYmax,
int dstXmin,
int dstYmin,
int width,
int height);
int dstYmin);
// Description:
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