20 VisRTX::Context* rtx = VisRTX_GetContext();
23 this->frameBuffer = rtx->CreateFrameBuffer(VisRTX::FrameBufferFormat::RGBA8, VisRTX::Vec2ui(
size.x,
size.y));
25 this->frameBuffer = rtx->CreateFrameBuffer(VisRTX::FrameBufferFormat::RGBA32F, VisRTX::Vec2ui(
size.x,
size.y));
29 this->format = format;
30 this->channels = frameBufferChannels;
35 this->frameBuffer->Release();
44 this->frameBuffer->Clear();
50 return this->frameBuffer->MapColorBuffer();
52 return this->frameBuffer->MapDepthBuffer();
60 this->frameBuffer->Unmap(mapped);
65 this->frameBuffer->SetDepthNormalization(clipMin, clipMax);
72 return this->frameBuffer->GetColorTextureGL();
74 catch(
const VisRTX::Exception& e)
76 vtkLogF(ERROR,
"VISRTX Error: Could not get color texture.");
85 return this->frameBuffer->GetDepthTextureGL();
87 catch(
const VisRTX::Exception& e)
89 vtkLogF(ERROR,
"VISRTX Error: Could not get depth texture.");
95 VisRTX::FrameBuffer* frameBuffer =
nullptr;
void SetDepthNormalizationGL(float clipMin, float clipMax)
FrameBuffer(const rtw::vec2i &size, const RTWFrameBufferFormat format, const uint32_t frameBufferChannels)
void Unmap(const void *mapped)
const void * Map(const RTWFrameBufferChannel channel)
#define vtkLogF(verbosity_name,...)
Add to log given the verbosity level.