Skip to content

Commit ef832ef

Browse files
committed
Initial Commit
1 parent d780319 commit ef832ef

File tree

4,289 files changed

+1125125
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,289 files changed

+1125125
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@
3030
*.exe
3131
*.out
3232
*.app
33+
/SubstanceManagerImporterUnity

AppIcon.ico

193 KB
Binary file not shown.

Cubemap/irradiance.dds

256 KB
Binary file not shown.

Cubemap/miramar_negx.webp

119 KB
Binary file not shown.

Cubemap/miramar_negy.webp

1.88 KB
Binary file not shown.

Cubemap/miramar_negz.webp

144 KB
Binary file not shown.

Cubemap/miramar_posx.webp

133 KB
Binary file not shown.

Cubemap/miramar_posy.webp

56.3 KB
Binary file not shown.

Cubemap/miramar_posz.webp

161 KB
Binary file not shown.

Cubemap/specular.dds

1 MB
Binary file not shown.

DarkStyle.cpp

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/*
2+
###############################################################################
3+
# #
4+
# The MIT License #
5+
# #
6+
# Copyright (C) 2017 by Juergen Skrotzky ([email protected]) #
7+
# >> https://github.com/Jorgen-VikingGod #
8+
# #
9+
# Sources: https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle #
10+
# #
11+
###############################################################################
12+
*/
13+
14+
#include "DarkStyle.h"
15+
16+
DarkStyle::DarkStyle() : DarkStyle(styleBase()) {}
17+
18+
DarkStyle::DarkStyle(QStyle *style) : QProxyStyle(style) {}
19+
20+
QStyle *DarkStyle::styleBase(QStyle *style) const {
21+
static QStyle *base =
22+
!style ? QStyleFactory::create(QStringLiteral("Fusion")) : style;
23+
return base;
24+
}
25+
26+
QStyle *DarkStyle::baseStyle() const { return styleBase(); }
27+
28+
void DarkStyle::polish(QPalette &palette) {
29+
// modify palette to dark
30+
palette.setColor(QPalette::Window, QColor(53, 53, 53));
31+
palette.setColor(QPalette::WindowText, Qt::white);
32+
palette.setColor(QPalette::Disabled, QPalette::WindowText,
33+
QColor(127, 127, 127));
34+
palette.setColor(QPalette::Base, QColor(42, 42, 42));
35+
palette.setColor(QPalette::AlternateBase, QColor(66, 66, 66));
36+
palette.setColor(QPalette::ToolTipBase, Qt::white);
37+
palette.setColor(QPalette::ToolTipText, QColor(53, 53, 53));
38+
palette.setColor(QPalette::Text, Qt::white);
39+
palette.setColor(QPalette::Disabled, QPalette::Text, QColor(127, 127, 127));
40+
palette.setColor(QPalette::Dark, QColor(35, 35, 35));
41+
palette.setColor(QPalette::Shadow, QColor(20, 20, 20));
42+
palette.setColor(QPalette::Button, QColor(53, 53, 53));
43+
palette.setColor(QPalette::ButtonText, Qt::white);
44+
palette.setColor(QPalette::Disabled, QPalette::ButtonText,
45+
QColor(127, 127, 127));
46+
palette.setColor(QPalette::BrightText, Qt::red);
47+
palette.setColor(QPalette::Link, QColor(42, 130, 218));
48+
palette.setColor(QPalette::Highlight, QColor(42, 130, 218));
49+
palette.setColor(QPalette::Disabled, QPalette::Highlight, QColor(80, 80, 80));
50+
palette.setColor(QPalette::HighlightedText, Qt::white);
51+
palette.setColor(QPalette::Disabled, QPalette::HighlightedText,
52+
QColor(127, 127, 127));
53+
}
54+
55+
void DarkStyle::polish(QApplication *app) {
56+
if (!app) return;
57+
58+
// increase font size for better reading,
59+
// setPointSize was reduced from +2 because when applied this way in Qt5, the
60+
// font is larger than intended for some reason
61+
QFont defaultFont = QApplication::font();
62+
defaultFont.setPointSize(defaultFont.pointSize() );
63+
app->setFont(defaultFont);
64+
65+
// loadstylesheet
66+
QFile qfDarkstyle(QStringLiteral(":/darkstyle/darkstyle.qss"));
67+
if (qfDarkstyle.open(QIODevice::ReadOnly | QIODevice::Text)) {
68+
// set stylesheet
69+
QString qsStylesheet = QString::fromLatin1(qfDarkstyle.readAll());
70+
app->setStyleSheet(qsStylesheet);
71+
qfDarkstyle.close();
72+
}
73+
}

DarkStyle.h

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
###############################################################################
3+
# #
4+
# The MIT License #
5+
# #
6+
# Copyright (C) 2017 by Juergen Skrotzky ([email protected]) #
7+
# >> https://github.com/Jorgen-VikingGod #
8+
# #
9+
# Sources: https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle #
10+
# #
11+
###############################################################################
12+
*/
13+
14+
#ifndef DARKSTYLE_HPP
15+
#define DARKSTYLE_HPP
16+
17+
#include <QApplication>
18+
#include <QFile>
19+
#include <QFont>
20+
#include <QProxyStyle>
21+
#include <QStyleFactory>
22+
23+
class DarkStyle : public QProxyStyle {
24+
Q_OBJECT
25+
26+
public:
27+
DarkStyle();
28+
explicit DarkStyle(QStyle *style);
29+
30+
QStyle *baseStyle() const;
31+
32+
void polish(QPalette &palette) override;
33+
void polish(QApplication *app) override;
34+
35+
private:
36+
QStyle *styleBase(QStyle *style = Q_NULLPTR) const;
37+
};
38+
39+
#endif // DARKSTYLE_HPP

OSXHideTitleBar.h

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class OSXHideTitleBar
2+
{
3+
public:
4+
static void HideTitleBar(long winid);
5+
6+
};

OSXHideTitleBar.mm

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "OSXHideTitleBar.h"
2+
#include <Cocoa/Cocoa.h>
3+
4+
void OSXHideTitleBar::HideTitleBar(long winid)
5+
{
6+
NSView *nativeView = reinterpret_cast<NSView *>(winid);
7+
NSWindow* nativeWindow = [nativeView window];
8+
9+
[nativeWindow setStyleMask:
10+
[nativeWindow styleMask] | NSFullSizeContentViewWindowMask | NSWindowTitleHidden];
11+
12+
[nativeWindow setTitlebarAppearsTransparent:YES];
13+
//[nativeWindow setMovableByWindowBackground:YES];
14+
15+
}

PBRView/PBRView.pro

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#-------------------------------------------------
2+
#
3+
# Project created by QtCreator 2019-02-21T13:28:22
4+
#
5+
#-------------------------------------------------
6+
7+
QT += core gui 3dcore 3drender 3dinput 3dextras
8+
9+
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
10+
11+
TARGET = PBRView
12+
TEMPLATE = app
13+
14+
# The following define makes your compiler emit warnings if you use
15+
# any feature of Qt which has been marked as deprecated (the exact warnings
16+
# depend on your compiler). Please consult the documentation of the
17+
# deprecated API in order to know how to port your code away from it.
18+
DEFINES += QT_DEPRECATED_WARNINGS
19+
20+
# You can also make your code fail to compile if you use deprecated APIs.
21+
# In order to do so, uncomment the following line.
22+
# You can also select to disable deprecated APIs only up to a certain version of Qt.
23+
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
24+
25+
CONFIG += c++11
26+
27+
SOURCES += \
28+
main.cpp \
29+
pbrview.cpp
30+
31+
HEADERS += \
32+
pbrview.h
33+
34+
FORMS += \
35+
pbrview.ui
36+
37+
# Default rules for deployment.
38+
qnx: target.path = /tmp/$${TARGET}/bin
39+
else: unix:!android: target.path = /opt/$${TARGET}/bin
40+
!isEmpty(target.path): INSTALLS += target
41+
42+
RESOURCES += \
43+
env.qrc

0 commit comments

Comments
 (0)