MCPcopy Create free account
hub / github.com/Kitware/VTK / SetTexture

Method SetTexture

Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx:1912–1932  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1910
1911//------------------------------------------------------------------------------
1912void vtkOpenGLContextDevice2D::SetTexture(vtkImageData* image, int properties)
1913{
1914 if (image == nullptr)
1915 {
1916 if (this->Storage->Texture)
1917 {
1918 this->Storage->Texture->Delete();
1919 this->Storage->Texture = nullptr;
1920 }
1921 return;
1922 }
1923 if (this->Storage->Texture == nullptr)
1924 {
1925 this->Storage->Texture = vtkTexture::New();
1926 }
1927 this->Storage->Texture->SetInputData(image);
1928 this->Storage->TextureProperties = properties;
1929 this->Storage->Texture->SetRepeat(properties & vtkContextDevice2D::Repeat);
1930 this->Storage->Texture->SetInterpolate(properties & vtkContextDevice2D::Linear);
1931 this->Storage->Texture->EdgeClampOn();
1932}
1933
1934//------------------------------------------------------------------------------
1935void vtkOpenGLContextDevice2D::SetPointSize(float size)

Callers 2

CoreDrawTrianglesMethod · 0.95
DrawImageMethod · 0.95

Calls 4

SetInterpolateMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
SetInputDataMethod · 0.45

Tested by

no test coverage detected