mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
31 lines
447 B
C++
31 lines
447 B
C++
#include "CustomPaintWidget.h"
|
|
#include <QPainter>
|
|
|
|
#include "renderdoc_replay.h"
|
|
|
|
CustomPaintWidget::CustomPaintWidget(QWidget *parent) : QWidget(parent)
|
|
{
|
|
m_Output = NULL;
|
|
setAttribute(Qt::WA_PaintOnScreen);
|
|
}
|
|
|
|
CustomPaintWidget::~CustomPaintWidget()
|
|
{
|
|
|
|
}
|
|
|
|
void CustomPaintWidget::paintEvent(QPaintEvent *e)
|
|
{
|
|
if(m_Output)
|
|
{
|
|
m_Output->Display();
|
|
}
|
|
else
|
|
{
|
|
QPainter p(this);
|
|
p.setBrush(QBrush(Qt::black));
|
|
p.drawRect(rect());
|
|
}
|
|
}
|
|
|