mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
28 lines
490 B
C++
28 lines
490 B
C++
#include "CustomPaintWidget.h"
|
|
#include <QPainter>
|
|
|
|
#include "renderdoc_replay.h"
|
|
|
|
extern ReplayOutput *out;
|
|
extern TextureDisplay d;
|
|
|
|
CustomPaintWidget::CustomPaintWidget(QWidget *parent) : QWidget(parent)
|
|
{
|
|
setAttribute(Qt::WA_PaintOnScreen);
|
|
}
|
|
|
|
CustomPaintWidget::~CustomPaintWidget()
|
|
{
|
|
|
|
}
|
|
|
|
void CustomPaintWidget::paintEvent(QPaintEvent *e)
|
|
{
|
|
static float t = 0.0f;
|
|
t += 0.01f;
|
|
d.scale = 1.5f + sinf(t);
|
|
ReplayOutput_SetTextureDisplay(out, d);
|
|
ReplayOutput_Display(out);
|
|
}
|
|
|