Commit 52413884 authored by Ken Martin's avatar Ken Martin

Remove power of two requirement from image slice mapper

It is no longer needed and was causing a failure on ATI OSX

Change-Id: If7111fec3ce3b58320721216389900135f0c1b18
parent 86a5dad4
......@@ -131,7 +131,6 @@ vtkOpenGLImageSliceMapper::vtkOpenGLImageSliceMapper()
this->LoadCount = 0;
this->UseClampToEdge = false;
this->UsePowerOfTwoTextures = true;
// Use GL_ARB_fragment_program, which is an extension to OpenGL 1.3
// that is compatible with very old drivers and hardware, and is still
......@@ -628,19 +627,8 @@ void vtkOpenGLImageSliceMapper::ComputeTextureSize(
imageSize[0] = (extent[xdim*2+1] - extent[xdim*2] + 1);
imageSize[1] = (extent[ydim*2+1] - extent[ydim*2] + 1);
if (this->UsePowerOfTwoTextures)
{
// find the target size of the power-of-two texture
for (int i = 0; i < 2; i++)
{
textureSize[i] = vtkMath::NearestPowerOfTwo(imageSize[i]);
}
}
else
{
textureSize[0] = imageSize[0];
textureSize[1] = imageSize[1];
}
textureSize[0] = imageSize[0];
textureSize[1] = imageSize[1];
}
//----------------------------------------------------------------------------
......@@ -789,8 +777,7 @@ void vtkOpenGLImageSliceMapper::Render(vtkRenderer *ren, vtkImageSlice *prop)
void vtkOpenGLImageSliceMapper::CheckOpenGLCapabilities(vtkOpenGLRenderWindow*)
{
this->UseClampToEdge = true;
this->UsePowerOfTwoTextures = true;
this->UseFragmentProgram = true;
this->UseFragmentProgram = false;
}
//----------------------------------------------------------------------------
......
......@@ -119,7 +119,6 @@ protected:
vtkTimeStamp LoadTime;
int LoadCount;
bool UsePowerOfTwoTextures;
bool UseClampToEdge;
bool UseFragmentProgram;
......
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