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

Method DrawPixels

Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx:2017–2034  ·  view source on GitHub ↗

------------------------------------------------------------------------------ draw (and stretch as needed) the data to the current viewport

Source from the content-addressed store, hash-verified

2015//------------------------------------------------------------------------------
2016// draw (and stretch as needed) the data to the current viewport
2017void vtkOpenGLRenderWindow::DrawPixels(
2018 int srcWidth, int srcHeight, int numComponents, int dataType, void* data)
2019{
2020 this->GetState()->vtkglDisable(GL_SCISSOR_TEST);
2021 this->GetState()->vtkglDisable(GL_DEPTH_TEST);
2022 if (!this->DrawPixelsTextureObject)
2023 {
2024 this->DrawPixelsTextureObject = vtkTextureObject::New();
2025 }
2026 else
2027 {
2028 this->DrawPixelsTextureObject->ReleaseGraphicsResources(this);
2029 }
2030 this->DrawPixelsTextureObject->SetContext(this);
2031 this->DrawPixelsTextureObject->Create2DFromRaw(
2032 srcWidth, srcHeight, numComponents, dataType, data);
2033 this->DrawPixelsTextureObject->CopyToFrameBuffer(nullptr, nullptr);
2034}
2035
2036//------------------------------------------------------------------------------
2037// very generic call to draw pixel data to a region of the window

Callers 3

SetPixelDataMethod · 0.95
SetRGBAPixelDataMethod · 0.95
SetRGBACharPixelDataMethod · 0.95

Calls 8

vtkglDisableMethod · 0.80
Create2DFromRawMethod · 0.80
CopyToFrameBufferMethod · 0.80
NewFunction · 0.50
GetStateMethod · 0.45
SetContextMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected