mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-31 03:41:01 +00:00
Add CustomPaintWidget and super-super hacky initial 'rendering' test
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user