mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Add skeleton qrenderdoc (just a qt template) & include in linux build
* Building qrenderdoc on windows will be supported just because that's likely where I will be developing it mostly, but for the foreseeable future it won't be built by default. If it ever gets good enough to replace the .NET UI, then we can look at it again.
This commit is contained in:
@@ -8,6 +8,7 @@ Release32/
|
||||
Release64/
|
||||
dist/
|
||||
Resources/*.png
|
||||
qrenderdoc/Makefile
|
||||
*.exe
|
||||
*.aps
|
||||
*.ilk
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
.PHONY: all
|
||||
all:
|
||||
mkdir -p bin/
|
||||
cd renderdoc && make librenderdoc.so
|
||||
cd renderdoccmd && make bin/renderdoccmd
|
||||
mkdir -p bin/
|
||||
cd qrenderdoc && qmake "CONFIG+=debug" && make
|
||||
cp renderdoc/librenderdoc.so renderdoccmd/bin/renderdoccmd bin/
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
cd renderdoc && make clean
|
||||
cd renderdoccmd && make clean
|
||||
cd qrenderdoc && rm -rf .obj Makefile*
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QApplication>
|
||||
|
||||
#include "renderdoc_replay.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
RENDERDOC_LogText("QRenderDoc initialising.");
|
||||
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
@@ -0,0 +1,24 @@
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QMenuBar" name="menuBar" />
|
||||
<widget class="QToolBar" name="mainToolBar" />
|
||||
<widget class="QWidget" name="centralWidget" />
|
||||
<widget class="QStatusBar" name="statusBar" />
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,51 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2015-03-18T20:10:50
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = qrenderdoc
|
||||
TEMPLATE = app
|
||||
|
||||
# Temp files into .obj
|
||||
MOC_DIR = .obj
|
||||
UI_DIR = .obj
|
||||
OBJECTS_DIR = .obj
|
||||
|
||||
# include path for core renderdoc API
|
||||
INCLUDEPATH += $$_PRO_FILE_PWD_/../renderdoc/api/replay
|
||||
|
||||
# Different output folders per platform
|
||||
win32 {
|
||||
|
||||
!contains(QMAKE_TARGET.arch, x86_64) {
|
||||
Debug:DESTDIR = $$_PRO_FILE_PWD_/../Win32/Profile
|
||||
Release:DESTDIR = $$_PRO_FILE_PWD_/../Win32/Release
|
||||
|
||||
} else {
|
||||
Debug:DESTDIR = $$_PRO_FILE_PWD_/../x64/Profile
|
||||
Release:DESTDIR = $$_PRO_FILE_PWD_/../x64/Release
|
||||
}
|
||||
|
||||
# Link against the core library
|
||||
LIBS += $$DESTDIR/renderdoc.lib
|
||||
|
||||
} else {
|
||||
|
||||
DESTDIR = $$_PRO_FILE_PWD_/../bin
|
||||
|
||||
# Link against the core library
|
||||
LIBS += -L$$_PRO_FILE_PWD_/../renderdoc -lrenderdoc
|
||||
|
||||
}
|
||||
|
||||
SOURCES += main.cpp\
|
||||
mainwindow.cpp
|
||||
|
||||
HEADERS += mainwindow.h
|
||||
|
||||
FORMS += mainwindow.ui
|
||||
@@ -140,6 +140,7 @@ class SysHook : LibraryHook
|
||||
|
||||
if(app.find("renderdoccmd.exe") != string::npos ||
|
||||
app.find("renderdocui.vshost.exe") != string::npos ||
|
||||
app.find("qrenderdoc.exe") != string::npos ||
|
||||
app.find("renderdocui.exe") != string::npos)
|
||||
{
|
||||
inject = false;
|
||||
@@ -152,6 +153,7 @@ class SysHook : LibraryHook
|
||||
|
||||
if(cmd.find("renderdoccmd.exe") != string::npos ||
|
||||
cmd.find("renderdocui.vshost.exe") != string::npos ||
|
||||
cmd.find("qrenderdoc.exe") != string::npos ||
|
||||
cmd.find("renderdocui.exe") != string::npos)
|
||||
{
|
||||
inject = false;
|
||||
@@ -227,6 +229,7 @@ class SysHook : LibraryHook
|
||||
|
||||
if(app.find(L"renderdoccmd.exe") != wstring::npos ||
|
||||
app.find(L"renderdocui.vshost.exe") != wstring::npos ||
|
||||
app.find(L"qrenderdoc.exe") != string::npos ||
|
||||
app.find(L"renderdocui.exe") != wstring::npos)
|
||||
{
|
||||
inject = false;
|
||||
@@ -239,6 +242,7 @@ class SysHook : LibraryHook
|
||||
|
||||
if(cmd.find(L"renderdoccmd.exe") != wstring::npos ||
|
||||
cmd.find(L"renderdocui.vshost.exe") != wstring::npos ||
|
||||
cmd.find(L"qrenderdoc.exe") != wstring::npos ||
|
||||
cmd.find(L"renderdocui.exe") != wstring::npos)
|
||||
{
|
||||
inject = false;
|
||||
|
||||
@@ -53,6 +53,7 @@ static BOOL add_hooks()
|
||||
|
||||
if(f.find(L"renderdoccmd.exe") != wstring::npos ||
|
||||
f.find(L"renderdocui.vshost.exe") != wstring::npos ||
|
||||
f.find(L"qrenderdoc.exe") != wstring::npos ||
|
||||
f.find(L"renderdocui.exe") != wstring::npos)
|
||||
{
|
||||
RDCDEBUG("Not creating hooks - in replay app");
|
||||
|
||||
Reference in New Issue
Block a user