Commit 06057658 authored by Aashish Chaudhary's avatar Aashish Chaudhary

Removed extra flag to force re-computation of texture format

As per the team discussion, we expect that user will set those
parameters in advance and if set, we won't computer them again.

Change-Id: I4b6574b7df9b4cc81a45fdba69ba46a45b0ec3a1
parent 1098a121
This diff is collapsed.
......@@ -194,28 +194,27 @@ public:
// Description:
// Create 1D texture from client memory
bool Create1DFromRaw(unsigned int width, int numComps,
int dataType, void *data, bool forceComputeParams=true);
int dataType, void *data);
// Description:
// Create a 2D texture from client memory
// numComps must be in [1-4].
bool Create2DFromRaw(unsigned int width, unsigned int height,
int numComps, int dataType, void *data,
bool forceComputeParams=true);
int numComps, int dataType, void *data);
// Description:
// Create a 3D texture from client memory
// numComps must be in [1-4].
bool Create3DFromRaw(unsigned int width, unsigned int height,
unsigned int depth, int numComps,
int dataType, void *data, bool forceComputeParams=true);
int dataType, void *data);
// Description:
// Create a 2D depth texture using a raw pointer.
// This is a blocking call. If you can, use PBO instead.
bool CreateDepthFromRaw(unsigned int width, unsigned int height,
int internalFormat, int rawType,
void *raw, bool forceComputeParams=true);
void *raw);
// Description:
// Create a 1D alpha texture using a raw pointer.
......@@ -223,7 +222,7 @@ public:
bool CreateAlphaFromRaw(unsigned int width,
int internalFormat,
int rawType,
void *raw, bool forceComputeParams=true);
void *raw);
// PBO's are not supported in ES 2.0
#if GL_ES_VERSION_2_0 != 1
......@@ -278,40 +277,37 @@ public:
// Description:
// Create a 2D depth texture but does not initialize its values.
bool AllocateDepth(unsigned int width,unsigned int height,
int internalFormat, bool forceComputeParams=true);
int internalFormat);
// Description:
// Create a 1D color texture but does not initialize its values.
// Internal format is deduced from numComps and vtkType.
bool Allocate1D(unsigned int width, int numComps,int vtkType,
bool forceComputeParams=true);
bool Allocate1D(unsigned int width, int numComps,int vtkType);
// Description:
// Create a 2D color texture but does not initialize its values.
// Internal format is deduced from numComps and vtkType.
bool Allocate2D(unsigned int width,unsigned int height, int numComps,
int vtkType, bool forceComputeParams=true);
int vtkType);
// Description:
// Create a 3D color texture but does not initialize its values.
// Internal format is deduced from numComps and vtkType.
bool Allocate3D(unsigned int width,unsigned int height,
unsigned int depth, int numComps,
int vtkType, bool forceComputeParams=true);
int vtkType);
// Description:
// Create texture without uploading any data.
bool Create2D(unsigned int width, unsigned int height, int numComps,
int vtktype, bool shaderSupportsTextureInt,
bool forceComputeParams=true);
int vtktype, bool shaderSupportsTextureInt);
bool Create3D(unsigned int width, unsigned int height, unsigned int depth,
int numComps, int vtktype, bool shaderSupportsTextureInt,
bool forceComputeParams=true);
int numComps, int vtktype, bool shaderSupportsTextureInt);
// Description:
// Get the data type for the texture as a vtk type int i.e. VTK_INT etc.
int GetDataType();
// Get the data type for the texture as GLenum type.
int GetDataType(int vtk_scalar_type);
void SetDataType(unsigned int glType);
unsigned int GetInternalFormat(int vtktype, int numComps,
......
......@@ -629,7 +629,7 @@ bool vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::LoadVolume(vtkRenderer* ren,
this->TextureSize[2],
scalars->GetNumberOfComponents(),
scalarType,
dataPtr, false);
dataPtr);
this->VolumeTextureObject->Activate();
this->VolumeTextureObject->SetWrapS(vtkTextureObject::ClampToEdge);
this->VolumeTextureObject->SetWrapT(vtkTextureObject::ClampToEdge);
......@@ -653,7 +653,7 @@ bool vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::LoadVolume(vtkRenderer* ren,
this->TextureSize[2],
scalars->GetNumberOfComponents(),
scalarType,
0, false);
0);
this->VolumeTextureObject->Activate();
this->VolumeTextureObject->SetWrapS(vtkTextureObject::ClampToEdge);
this->VolumeTextureObject->SetWrapT(vtkTextureObject::ClampToEdge);
......
......@@ -178,7 +178,7 @@ public:
this->Texture->SetInternalFormat(internalFormat);
this->Texture->Create3DFromRaw(
textureSize[0], textureSize[1], textureSize[2],
1, scalarType, dataPtr, false);
1, scalarType, dataPtr);
this->Texture->Activate();
this->Texture->SetWrapS(vtkTextureObject::ClampToEdge);
this->Texture->SetWrapT(vtkTextureObject::ClampToEdge);
......
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