Add CustomPaintWidget and super-super hacky initial 'rendering' test

This commit is contained in:
baldurk
2015-07-10 16:38:21 +02:00
parent 4c6a77d5d8
commit 1d87a6eec0
7 changed files with 146 additions and 46 deletions
+27
View File
@@ -0,0 +1,27 @@
#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);
}