Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:

# BSD related variables
BSD_DEPS: "llvm17 libinotify openal-soft xorg 7-zip cmake-core ninja pkgconf ccache4"
BSD_QT: "qt5-widgets qt5-core qt5-gamepad qt5-gui qt5-svg qt5-xml qt5 qmake"
BSD_QT: "qt5-widgets qt5-core qt5-gui qt5-svg qt5-xml qt5 qmake"
BSD_CC: "clang17"
BSD_CXX: "clang++17"
BSD_VERSION: "14.1"
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:

- name: Install Qt
run: |
sudo ./build/install-qt.sh --version ${QT_VERSION} qtbase qtmultimedia qtscript qtsvg qtimageformats qtgraphicaleffects qtquickcontrols2 qttools qtxmlpatterns qtdeclarative qtgamepad icu | tee -a $GITHUB_PATH
sudo ./build/install-qt.sh --version ${QT_VERSION} qtbase qtmultimedia qtscript qtsvg qtimageformats qttools qtxmlpatterns qtdeclarative icu | tee -a $GITHUB_PATH
sudo ./build/install-qt.sh --version ${QTCREATOR_VERSION} qtcreator | tee -a $GITHUB_PATH

- name: Setup Qbs
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:

- name: Install Qt
run: |
echo "QT_PATH=$(./build/install-qt.sh -d ${QT_INSTALL_DIR} --version ${QT_VERSION} qtbase qtmultimedia qtscript qtsvg qtimageformats qtgraphicaleffects qtquickcontrols2 qttools qtxmlpatterns qtdeclarative qtgamepad)" >> $GITHUB_ENV
echo "QT_PATH=$(./build/install-qt.sh -d ${QT_INSTALL_DIR} --version ${QT_VERSION} qtbase qtmultimedia qtscript qtsvg qtimageformats qttools qtxmlpatterns qtdeclarative)" >> $GITHUB_ENV

- name: Install Qbs
run: |
Expand Down
27 changes: 11 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,17 @@ set(INC_PATH "${SDK_PATH}/include")
set(TOOLS_PATH "${SDK_PATH}/tools")
set(PLUGINS_PATH "${BIN_PATH}/plugins")

if(desktop)
find_package(Qt5 COMPONENTS
Core
Gui
Widgets
QuickWidgets
Xml
Multimedia
Gamepad
Svg
)

set(QT_BIN_DIR "$ENV{QT5_DIR}/bin")
set(QT_PLUGINS_DIR "$ENV{QT5_DIR}/plugins")
set(QT_QML_DIR "$ENV{QT5_DIR}/qml")
endif()
find_package(Qt5 COMPONENTS
Core
Gui
Widgets
Xml
Multimedia
Svg
)

set(QT_BIN_DIR "$ENV{QT5_DIR}/bin")
set(QT_PLUGINS_DIR "$ENV{QT5_DIR}/plugins")

# Add subdirectories
add_subdirectory(thirdparty)
Expand Down
62 changes: 21 additions & 41 deletions build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,47 +18,27 @@ if(desktop)
DESTINATION "${PLATFORM_PATH}/plugins"
)

# Install QML plugins
install(DIRECTORY ${QT_QML_DIR}/QtGraphicalEffects
DESTINATION "${PLATFORM_PATH}/qml"
)

install(DIRECTORY ${QT_QML_DIR}/QtQuick
DESTINATION "${PLATFORM_PATH}/qml"
)

install(DIRECTORY ${QT_QML_DIR}/QtQuick.2
DESTINATION "${PLATFORM_PATH}/qml"
)

set(libPrefix "${QT_BIN_DIR}/")

if(WIN32)
set(libSuffix "$<$<CONFIG:Debug>:d>.dll")
endif()

set(QT_LIBS
"Qt5Core"
"Qt5Gui"
"Qt5Xml"
"Qt5XmlPatterns"
"Qt5Network"
"Qt5Multimedia"
"Qt5QuickWidgets"
"Qt5Quick"
"Qt5QuickTemplates2"
"Qt5QuickShapes"
"Qt5QuickControls2"
"Qt5Qml"
"Qt5Svg"
"Qt5Widgets"
"Qt5Gamepad"
"Qt5Script"
)

if (Qt5Core_VERSION VERSION_GREATER_EQUAL 5.14.0)
list(APPEND QT_LIBS "Qt5QmlModels")
list(APPEND QT_LIBS "Qt5QmlWorkerScript")
set(libPrefix "${QT_BIN_DIR}/")

if(WIN32)
set(libSuffix "$<$<CONFIG:Debug>:d>.dll")
endif()

set(QT_LIBS
"Qt5Core"
"Qt5Gui"
"Qt5Xml"
"Qt5XmlPatterns"
"Qt5Network"
"Qt5Multimedia"
"Qt5Svg"
"Qt5Widgets"
"Qt5Script"
)

list(TRANSFORM QT_LIBS PREPEND ${libPrefix})
if(WIN32)
list(TRANSFORM QT_LIBS APPEND ${libSuffix})
endif()

list(TRANSFORM QT_LIBS PREPEND ${libPrefix})
Expand Down
2 changes: 1 addition & 1 deletion build/build-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export QTCREATOR_VERSION=5.0.3
export QT_BIN=$QT_INSTALL_DIR/$QT_VERSION/clang_64/bin
export PATH="$QT_INSTALL_DIR/Qt Creator.app/Contents/MacOS:$QT_BIN:$PATH"

./build/install-qt.sh -d $QT_INSTALL_DIR --version $QT_VERSION qtbase qtmultimedia qtscript qtsvg qtimageformats qtgraphicaleffects qtquickcontrols2 qttools qtxmlpatterns qtdeclarative
./build/install-qt.sh -d $QT_INSTALL_DIR --version $QT_VERSION qtbase qtmultimedia qtscript qtsvg qtimageformats qttools qtxmlpatterns qtdeclarative
./build/install-qt.sh -d $QT_INSTALL_DIR --version $QTCREATOR_VERSION qtcreator

qbs --version
Expand Down
2 changes: 1 addition & 1 deletion build/build-win.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export QTCREATOR_VERSION=5.0.3
export QT_BIN=$QT_INSTALL_DIR/$QT_VERSION/clang_64/bin
export PATH="$QT_INSTALL_DIR/Qt Creator.app/Contents/MacOS:$QT_BIN:$PATH"

./build/install-qt.sh -d $QT_INSTALL_DIR --version $QT_VERSION qtbase qtmultimedia qtscript qtsvg qtimageformats qtgraphicaleffects qtquickcontrols2 qttools qtxmlpatterns qtdeclarative
./build/install-qt.sh -d $QT_INSTALL_DIR --version $QT_VERSION qtbase qtmultimedia qtscript qtsvg qtimageformats qttools qtxmlpatterns qtdeclarative
./build/install-qt.sh -d $QT_INSTALL_DIR --version $QTCREATOR_VERSION qtcreator

qbs --version
Expand Down
2 changes: 0 additions & 2 deletions build/darwin/qt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
[Paths]
Plugins = PlugIns
Imports = Resources/qml
Qml2Imports = Resources/qml
42 changes: 2 additions & 40 deletions build/install.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ Product {

return install.PLATFORM_PATH + "/plugins"
}
property string QML_PATH: {
if(qbs.targetOS.contains("darwin")) {
return install.BIN_PATH + "/../Resources/qml"
}

return install.PLATFORM_PATH + "/qml"
}

property var pluginFiles: {
var files = []
Expand Down Expand Up @@ -75,14 +68,8 @@ Product {
if (!Qt.core.frameworkBuild) {
var libPrefix = (qbs.targetOS.contains("linux")) ? "lib" : ""
var libPostfix = ((qbs.targetOS.contains("windows") && qbs.debugInformation) ? "d": "") + cpp.dynamicLibrarySuffix
var libs = ["Qt5Core", "Qt5Gui", "Qt5Xml",
"Qt5XmlPatterns", "Qt5Network", "Qt5Multimedia",
"Qt5QuickWidgets", "Qt5Quick", "Qt5QuickTemplates2", "Qt5QuickShapes",
"Qt5QuickControls2", "Qt5Qml", "Qt5Svg", "Qt5Widgets"]
if(Qt.core.versionMajor >= 5 && Qt.core.versionMinor >= 14) {
libs.push("Qt5QmlModels")
libs.push("Qt5QmlWorkerScript")
}
var libs = ["Qt5Core", "Qt5Gui", "Qt5Xml", "Qt5XmlPatterns",
"Qt5Network", "Qt5Multimedia", "Qt5Svg", "Qt5Widgets"]

if(qbs.targetOS.contains("linux")) {
for(var it in libs) {
Expand Down Expand Up @@ -116,11 +103,6 @@ Product {
list.push("**/QtXmlPatterns.framework/**")
list.push("**/QtNetwork.framework/**")
list.push("**/QtMultimedia.framework/**")
list.push("**/QtQml.framework/**")
list.push("**/QtQuick.framework/**")
list.push("**/QtQuickTemplates2.framework/**")
list.push("**/QtQuickControls2.framework/**")
list.push("**/QtQuickWidgets.framework/**")
list.push("**/QtSvg.framework/**")
list.push("**/QtPrintSupport.framework/**")
list.push("**/QtDBus.framework/**")
Expand Down Expand Up @@ -209,26 +191,6 @@ Product {
qbs.installPrefix: install.PREFIX
}

Group {
name: "QML Plugins"
prefix: FileInfo.joinPaths(Qt.core.pluginPath, "/../qml/")
files: [
"QtGraphicalEffects/**",
"QtQuick/Controls.2/**",
"QtQuick/Shapes/**",
"QtQuick/Templates.2/**",
"QtQuick/XmlListModel/**",
"QtQuick/Layouts/**",
"QtQuick/Window.2/**",
"QtQuick.2/**"
]
excludeFiles: pluginExcludeFiles
qbs.install: true
qbs.installDir: install.QML_PATH
qbs.installPrefix: install.PREFIX
qbs.installSourceBase: prefix
}

Group {
name: "Shaders Engine"
files: [
Expand Down
2 changes: 1 addition & 1 deletion doc/config.qdocconf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ excludedirs += \
../engine/includes/systems \
../thirdparty/assimp

sources.fileextensions = "*.cpp *.qdoc *.mm *.qml"
sources.fileextensions = "*.cpp *.qdoc *.mm"
headers.fileextensions = "*.h *.ch *.h++ *.hh *.hpp *.hxx"

exampledirs = .
Expand Down
2 changes: 0 additions & 2 deletions engine/includes/pipelinecontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class ENGINE_EXPORT PipelineContext : public Object {

void drawRenderers(const std::list<Renderable *> &list, uint32_t layer, uint32_t flags = 0);

void setMaxTexture(uint32_t size);

World *world();
void setWorld(World *world);

Expand Down
5 changes: 5 additions & 0 deletions engine/src/editor/viewport/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ void Viewport::init() {
m_rhiWindow = m_renderSystem->createRhiWindow();

if(m_rhiWindow) {
static bool first = true;
if(first) {
m_rhiWindow->show();
first = false;
}
m_renderSystem->init();

m_rhiWindow->installEventFilter(this);
Expand Down
10 changes: 3 additions & 7 deletions engine/src/pipelinecontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ PipelineContext::PipelineContext() :
}

m_buffer->setGlobalTexture(m_radianceMap->name().c_str(), m_radianceMap);

uint32_t size = Texture::maxTextureSize();
m_buffer->setGlobalValue("shadow.pageSize", Vector4(1.0f / size, 1.0f / size, size, size));
}

PipelineContext::~PipelineContext() {
Expand Down Expand Up @@ -133,13 +136,6 @@ void PipelineContext::setCurrentCamera(Camera *camera) {
void PipelineContext::cameraReset() {
m_buffer->setViewProjection(m_cameraView, m_cameraProjection);
}
/*!
\internal
Sets the maximum texture \a size in the command buffer for shadow mapping.
*/
void PipelineContext::setMaxTexture(uint32_t size) {
m_buffer->setGlobalValue("shadow.pageSize", Vector4(1.0f / size, 1.0f / size, size, size));
}
/*!
Resizes the pipeline context to the specified \a width and \a height. Updates render tasks accordingly.
*/
Expand Down
1 change: 0 additions & 1 deletion modules/editor/particletools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ if (desktop)
Qt5::Core
Qt5::Gui
Qt5::Widgets
Qt5::QuickWidgets
)

target_compile_definitions(${PROJECT_NAME} PRIVATE
Expand Down
38 changes: 20 additions & 18 deletions modules/renders/rendergl/src/renderglsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,34 +87,36 @@ RenderGLSystem::~RenderGLSystem() {
bool RenderGLSystem::init() {
PROFILE_FUNCTION();

static bool done = false;
if(!done) {
#ifndef THUNDER_MOBILE
if(!gladLoadGL()) {
if(!gladLoadGL()) {
CheckGLError();
aWarning() << "[ RenderGL ] Failed to initialize OpenGL context.";
return false;
}
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
CheckGLError();
aWarning() << "[ RenderGL ] Failed to initialize OpenGL context.";
return false;
}
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
CheckGLError();
#endif
bool result = RenderSystem::init();
int32_t texture;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &texture);
CheckGLError();

int32_t texture;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &texture);
CheckGLError();
texture = MIN(texture, MAX_RESOLUTION);

texture = MIN(texture, MAX_RESOLUTION);
Texture::setMaxTextureSize(texture);

Texture::setMaxTextureSize(texture);
pipelineContext()->setMaxTexture(texture);
glGetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, &texture);
CheckGLError();

glGetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, &texture);
CheckGLError();
Texture::setMaxCubemapSize(texture);

Texture::setMaxCubemapSize(texture);
CommandBufferGL::setInited();

CommandBufferGL::setInited();
done = true;
}

return result;
return RenderSystem::init();
}
/*!
Main drawing procedure.
Expand Down
1 change: 0 additions & 1 deletion worldeditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ if (desktop)
Qt5::Gui
Qt5::Widgets
Qt5::Xml
Qt5::QuickWidgets
)

if(WIN32)
Expand Down
9 changes: 0 additions & 9 deletions worldeditor/res/WorldEditor.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,6 @@
<file>styles/dark/images/css.svg</file>
<file>styles/dark/images/ui.svg</file>
</qresource>
<qresource prefix="/QML">
<file>qml/Theme.qml</file>
<file>qml/CurveEditor.qml</file>
<file>qml/Startup.qml</file>
<file>qml/Projects.qml</file>
<file>qml/Blog.qml</file>
<file>qml/BlogTile.qml</file>
<file>qml/ResizableScrollBar.qml</file>
</qresource>
<qresource prefix="/Workspaces">
<file alias="Default.ws">workspaces/Default.ws</file>
</qresource>
Expand Down
Loading
Loading