/* virtual */ void Hdx_UnitTestWindow::OnPaintGL() { // // Update the draw target's size and execute the unit test with // the draw target bound. // _drawTarget->Bind(); _drawTarget->SetSize(GfVec2i(GetWidth(), GetHeight())); _unitTest->DrawTest(); _drawTarget->Unbind(); // // Blit the resulting color buffer to the window (this is a noop // if we're drawing offscreen). // glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); glBindFramebuffer(GL_READ_FRAMEBUFFER, _drawTarget->GetFramebufferId()); glBlitFramebuffer(0, 0, GetWidth(), GetHeight(), 0, 0, GetWidth(), GetHeight(), GL_COLOR_BUFFER_BIT, GL_NEAREST); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); glBindFramebuffer(GL_READ_FRAMEBUFFER, 0); }
void Hdx_UnitTestWindow::OffscreenTest() { _drawTarget->Bind(); _drawTarget->SetSize(GfVec2i(GetWidth(), GetHeight())); _unitTest->OffscreenTest(); _drawTarget->Unbind(); }