Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jahshaka/VR
Browse files Browse the repository at this point in the history
  • Loading branch information
njbrown committed Nov 1, 2017
2 parents 5dc7da2 + f825a8a commit 52af985
Show file tree
Hide file tree
Showing 44 changed files with 1,814 additions and 949 deletions.
13 changes: 10 additions & 3 deletions Jahshaka.pro
Expand Up @@ -113,7 +113,10 @@ SOURCES += src/main.cpp\
src/widgets/dynamicgrid.cpp \
src/widgets/itemgridwidget.cpp \
src/dialogs/renameprojectdialog.cpp \
src/editor/thumbnailgenerator.cpp
src/editor/thumbnailgenerator.cpp \
src/widgets/mainwindowviewport.cpp \
src/editor/viewercontroller.cpp \
src/dialogs/donatedialog.cpp

HEADERS += src/mainwindow.h \
src/dialogs/renamelayerdialog.h \
Expand Down Expand Up @@ -217,7 +220,10 @@ HEADERS += src/mainwindow.h \
src/widgets/dynamicgrid.h \
src/widgets/itemgridwidget.hpp \
src/dialogs/renameprojectdialog.h \
src/editor/thumbnailgenerator.h
src/editor/thumbnailgenerator.h \
src/widgets/mainwindowviewport.h \
src/editor/viewercontroller.h \
src/dialogs/donatedialog.h

FORMS += \
src/dialogs/renamelayerdialog.ui \
Expand Down Expand Up @@ -259,7 +265,8 @@ FORMS += \
src/dialogs/progressdialog.ui \
src/widgets/screenshotwidget.ui \
src/widgets/projectmanager.ui \
src/dialogs/renameprojectdialog.ui
src/dialogs/renameprojectdialog.ui \
src/dialogs/donate.ui

RESOURCES += \
app/shaders.qrc \
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -27,6 +27,7 @@ Jahshaka brings you the future of immersive digital content creation with the le
- Realtime Dynamic Shadows
- Powerful Extensible Material System
- Asset Manager
- Supports 4k displays
- Custom Shaders and more…

## Screenshots
Expand All @@ -43,7 +44,7 @@ Jahshaka brings you the future of immersive digital content creation with the le
## Building From Source

### Requirements
- Qt version 5.7 or greater is recommended *(earlier versions might work but aren't tested)*
- Qt versions *5.7* or *5.9* are recommended *(other versions might work but aren't tested, 5.8 also has a bug on Windows)*
- A C++ compiler with support for C++11 or later (choose a compiler for your OS when installing the Qt SDK, G++ or Clang recommended)
- Qt Creator (also comes with the Qt SDK, latest version recommended)

Expand Down
2 changes: 2 additions & 0 deletions app/icons.qrc
Expand Up @@ -75,5 +75,7 @@
<file>icons/tedit_alpha.svg</file>
<file>icons/tplay_alpha.svg</file>
<file>icons/ic_file.svg</file>
<file>icons/g_pause.svg</file>
<file>icons/error_alpha.svg</file>
</qresource>
</RCC>
49 changes: 14 additions & 35 deletions app/icons/error.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions app/icons/error_alpha.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions app/icons/g_pause.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/images.qrc
Expand Up @@ -9,5 +9,7 @@
<file>images/splashv2.jpg</file>
<file>images/preview.png</file>
<file>images/splashv3.png</file>
<file>images/empty_canvas.png</file>
<file>images/splashv3_d.png</file>
</qresource>
</RCC>
Binary file added app/images/empty_canvas.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/images/splashv3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/splashv3_d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/shaders/matcap.frag
Expand Up @@ -19,7 +19,7 @@ vec2 matcap(vec3 eye, vec3 normal) {
void main() {
//vec3 e = normalize(v_worldPos - u_eyePos);
vec2 N = matcap(v_viewEyeDir, v_viewNormal);
vec3 base = texture2D( u_matTexture, N ).rgb;
vec3 base = texture( u_matTexture, N ).rgb;

if (u_useMatTexture) {
fragColor = vec4(base, 1.0);
Expand Down
4 changes: 2 additions & 2 deletions src/constants.h
Expand Up @@ -10,7 +10,7 @@

namespace Constants
{
const QString CONTENT_VERSION = "0.4beta";
const QString CONTENT_VERSION = "0.4a";
const QString PROJ_EXT = ".jah";
const QStringList PROJECT_DIRS = { "Textures", "Models", "Shaders", "Materials" };
const QString SHADER_DEFS = "/app/shader_defs/";
Expand All @@ -30,7 +30,7 @@ namespace Constants
const QString DB_THUMBS_TABLE = "thumbnails";

const QList<QString> IMAGE_EXTS = { "png", "PNG", "jpg" };
const QList<QString> MODEL_EXTS = { "obj", "fbx", "dae" };
const QList<QString> MODEL_EXTS = { "obj", "fbx", "dae", "blend"};

const int FPS_90 = 11; // milliseconds
const int FPS_60 = 17; // milliseconds
Expand Down
157 changes: 157 additions & 0 deletions src/dialogs/donate.ui
@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DonateDialog</class>
<widget class="QWidget" name="DonateDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>815</width>
<height>480</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string>Donate</string>
</property>
<property name="styleSheet">
<string notr="true">#Donate {
border: 1px solid black;
}

QCheckBox {
spacing: 5px;
font-size: 12px;
}

QCheckBox::indicator {
width: 20px;
height: 20px;
}

QCheckBox::indicator::unchecked {
image: url(:/icons/check-unchecked.png);
}

QCheckBox::indicator::checked {
image: url(:/icons/check-checked.png);
}
</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="maximumSize">
<size>
<width>815</width>
<height>480</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../app/images.qrc">:/images/splashv3_d.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="ctrl" native="true">
<property name="styleSheet">
<string notr="true">#ctrl {
background: #111;
}

QPushButton, QToolButton {
border: 0;
padding: 6px 24px;
background: #444;
}

QPushButton::hover {
background: #555;
}

QToolButton::hover {
background: #555;
}</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>I have already donated. Don't show me this again</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="close">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../../app/images.qrc"/>
</resources>
<connections/>
</ui>
24 changes: 24 additions & 0 deletions src/dialogs/donatedialog.cpp
@@ -0,0 +1,24 @@
#include "donatedialog.h"
#include "ui_donate.h"
#include "../core/settingsmanager.h"

DonateDialog::DonateDialog(QDialog *parent) : QDialog(parent), ui(new Ui::DonateDialog)
{
ui->setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::FramelessWindowHint);

connect(ui->checkBox, SIGNAL(pressed()), this, SLOT(saveAndClose()));
connect(ui->close, SIGNAL(pressed()), this, SLOT(close()));

settingsManager = SettingsManager::getDefaultManager();
}

DonateDialog::~DonateDialog()
{
delete ui;
}

void DonateDialog::saveAndClose()
{
settingsManager->setValue("ddialog_seen", true);
}
28 changes: 28 additions & 0 deletions src/dialogs/donatedialog.h
@@ -0,0 +1,28 @@
#ifndef DONATEDIALOG_HPP
#define DONATEDIALOG_HPP

#include <QDialog>

namespace Ui {
class DonateDialog;
}

class SettingsManager;

class DonateDialog : public QDialog
{
Q_OBJECT

public:
DonateDialog(QDialog *parent = Q_NULLPTR);
~DonateDialog();

public slots:
void saveAndClose();

private:
Ui::DonateDialog *ui;
SettingsManager *settingsManager;
};

#endif // DONATEDIALOG_HPP

0 comments on commit 52af985

Please sign in to comment.