Removing slang temporarily
This commit is contained in:
+5
-6
@@ -7,18 +7,17 @@
|
|||||||
[submodule "external/glfw"]
|
[submodule "external/glfw"]
|
||||||
path = external/glfw
|
path = external/glfw
|
||||||
url = https://github.com/glfw/glfw.git
|
url = https://github.com/glfw/glfw.git
|
||||||
[submodule "external/slang"]
|
|
||||||
path = external/slang
|
|
||||||
url = https://github.com/shader-slang/slang.git
|
|
||||||
[submodule "external/json"]
|
[submodule "external/json"]
|
||||||
path = external/json
|
path = external/json
|
||||||
url = https://github.com/nlohmann/json.git
|
url = https://github.com/nlohmann/json.git
|
||||||
[submodule "external/assimp"]
|
[submodule "external/assimp"]
|
||||||
path = external/assimp
|
path = external/assimp
|
||||||
url = https://github.com/assimp/assimp.git
|
url = https://github.com/assimp/assimp.git
|
||||||
[submodule "external/stb"]
|
|
||||||
path = external/stb
|
|
||||||
url = https://github.com/nothings/stb.git
|
|
||||||
[submodule "external/SPIRV-Cross"]
|
[submodule "external/SPIRV-Cross"]
|
||||||
path = external/SPIRV-Cross
|
path = external/SPIRV-Cross
|
||||||
url = https://github.com/KhronosGroup/SPIRV-Cross.git
|
url = https://github.com/KhronosGroup/SPIRV-Cross.git
|
||||||
|
[submodule "external/ktx"]
|
||||||
|
path = external/ktx
|
||||||
|
url = https://github.com/KhronosGroup/KTX-Software
|
||||||
|
[submodule "external/stb"]
|
||||||
|
url = https://github.com/nothings/stb
|
||||||
+3
-3
@@ -14,6 +14,7 @@ set(SLANG_ROOT ${EXTERNAL_ROOT}/slang)
|
|||||||
set(GLM_ROOT ${EXTERNAL_ROOT}/glm)
|
set(GLM_ROOT ${EXTERNAL_ROOT}/glm)
|
||||||
set(GLFW_ROOT ${EXTERNAL_ROOT}/glfw)
|
set(GLFW_ROOT ${EXTERNAL_ROOT}/glfw)
|
||||||
set(JSON_ROOT ${EXTERNAL_ROOT}/json)
|
set(JSON_ROOT ${EXTERNAL_ROOT}/json)
|
||||||
|
set(KTX_ROOT ${EXTERNAL_ROOT}/ktx)
|
||||||
set(STB_ROOT ${EXTERNAL_ROOT}/stb)
|
set(STB_ROOT ${EXTERNAL_ROOT}/stb)
|
||||||
set(SPIRV_ROOT ${EXTERNAL_ROOT}/SPIRV-Cross)
|
set(SPIRV_ROOT ${EXTERNAL_ROOT}/SPIRV-Cross)
|
||||||
set(NSAM_ROOT ${EXTERNAL_ROOT}/aftermath)
|
set(NSAM_ROOT ${EXTERNAL_ROOT}/aftermath)
|
||||||
@@ -47,16 +48,15 @@ find_package(Threads REQUIRED)
|
|||||||
find_package(Assimp REQUIRED)
|
find_package(Assimp REQUIRED)
|
||||||
find_package(JSON REQUIRED)
|
find_package(JSON REQUIRED)
|
||||||
find_package(GLFW REQUIRED)
|
find_package(GLFW REQUIRED)
|
||||||
#find_package(SPIRV REQUIRED)
|
|
||||||
find_package(GLM REQUIRED)
|
find_package(GLM REQUIRED)
|
||||||
find_package(STB REQUIRED)
|
find_package(KTX REQUIRED)
|
||||||
find_package(SLANG REQUIRED)
|
find_package(SLANG REQUIRED)
|
||||||
find_package(Aftermath REQUIRED)
|
find_package(Aftermath REQUIRED)
|
||||||
|
|
||||||
include_directories(${GLM_INCLUDE_DIRS})
|
include_directories(${GLM_INCLUDE_DIRS})
|
||||||
|
include_directories(${KTX_INCLUDE_DIRS})
|
||||||
include_directories(${STB_INCLUDE_DIRS})
|
include_directories(${STB_INCLUDE_DIRS})
|
||||||
include_directories(${Vulkan_INCLUDE_DIR})
|
include_directories(${Vulkan_INCLUDE_DIR})
|
||||||
#include_directories(${SPIRV_INCLUDE_DIRS})
|
|
||||||
include_directories(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
include_directories(${GLFW_INCLUDE_DIRS})
|
include_directories(${GLFW_INCLUDE_DIRS})
|
||||||
include_directories(${SLANG_INCLUDE_DIRS})
|
include_directories(${SLANG_INCLUDE_DIRS})
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
#
|
||||||
|
# Find KTX
|
||||||
|
#
|
||||||
|
# Try to find KTX library.
|
||||||
|
# This module defines the following variables:
|
||||||
|
# - KTX_INCLUDE_DIRS
|
||||||
|
# - KTX_LIBRARIES
|
||||||
|
# - KTX_FOUND
|
||||||
|
#
|
||||||
|
# The following variables can be set as arguments for the module.
|
||||||
|
# - KTX_ROOT : Root library directory of KTX
|
||||||
|
# - KTX_USE_STATIC_LIBS : Specifies to use static version of KTX library (Windows only)
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
# Additional modules
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
# Find include files
|
||||||
|
find_path(
|
||||||
|
KTX_INCLUDE_DIR
|
||||||
|
NAMES ktx.h
|
||||||
|
PATHS
|
||||||
|
$ENV{PROGRAMFILES}/include
|
||||||
|
${KTX_ROOT}/include
|
||||||
|
DOC "The directory where ktx.h resides")
|
||||||
|
|
||||||
|
# Find library files
|
||||||
|
find_library(
|
||||||
|
KTX_LIBRARY
|
||||||
|
NAMES ktx${CMAKE_DEBUG_POSTFIX}.lib
|
||||||
|
PATHS
|
||||||
|
$ENV{PROGRAMFILES}/lib
|
||||||
|
${KTX_ROOT}
|
||||||
|
${KTX_ROOT}/lib
|
||||||
|
PATH_SUFFIXES Debug Release)
|
||||||
|
else()
|
||||||
|
# Find include files
|
||||||
|
find_path(
|
||||||
|
KTX_INCLUDE_DIR
|
||||||
|
NAMES ktx.h
|
||||||
|
PATHS
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
|
/sw/include
|
||||||
|
/opt/local/include
|
||||||
|
${KTX_ROOT}
|
||||||
|
DOC "The directory where KTX/ktx.h resides")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Handle REQUIRD argument, define *_FOUND variable
|
||||||
|
find_package_handle_standard_args(KTX DEFAULT_MSG KTX_INCLUDE_DIR KTX_LIBRARY)
|
||||||
|
|
||||||
|
# Define KTX_LIBRARIES and KTX_INCLUDE_DIRS
|
||||||
|
if (KTX_FOUND)
|
||||||
|
set(KTX_INCLUDE_DIRS ${KTX_INCLUDE_DIR})
|
||||||
|
set(KTX_LIBRARIES ${KTX_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Hide some variables
|
||||||
|
mark_as_advanced(KTX_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(KTX_LIBRARY)
|
||||||
+1
-4
@@ -11,9 +11,6 @@
|
|||||||
# - STB_ROOT : Root library directory of STB
|
# - STB_ROOT : Root library directory of STB
|
||||||
# - STB_USE_STATIC_LIBS : Specifies to use static version of STB library (Windows only)
|
# - STB_USE_STATIC_LIBS : Specifies to use static version of STB library (Windows only)
|
||||||
#
|
#
|
||||||
# References:
|
|
||||||
# - https://github.com/progschj/OpenGL-Examples/blob/master/cmake_modules/FindSTB.cmake
|
|
||||||
# - https://bitbucket.org/Ident8/cegui-mk2-opengl3-renderer/src/befd47200265/cmake/FindSTB.cmake
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Additional modules
|
# Additional modules
|
||||||
@@ -26,7 +23,7 @@ if (WIN32)
|
|||||||
NAMES stb.h
|
NAMES stb.h
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{PROGRAMFILES}/include
|
$ENV{PROGRAMFILES}/include
|
||||||
${STB_ROOT}
|
${STB_ROOT}/include
|
||||||
DOC "The directory where STB/stb.h resides")
|
DOC "The directory where STB/stb.h resides")
|
||||||
else()
|
else()
|
||||||
# Find include files
|
# Find include files
|
||||||
|
|||||||
+9
-14
@@ -37,6 +37,11 @@ ExternalProject_Add(boost
|
|||||||
list (APPEND EXTRA_CMAKE_ARGS
|
list (APPEND EXTRA_CMAKE_ARGS
|
||||||
-DBoost_NO_SYSTEM_PATHS=OFF)
|
-DBoost_NO_SYSTEM_PATHS=OFF)
|
||||||
|
|
||||||
|
#-----------------KTX----------------------------
|
||||||
|
list(APPEND DEPENDENCIES ktx)
|
||||||
|
|
||||||
|
add_subdirectory(${KTX_ROOT} ${KTX_ROOT})
|
||||||
|
|
||||||
#--------------------JSON------------------
|
#--------------------JSON------------------
|
||||||
list(APPEND DEPENDENCIES nlohmann_json)
|
list(APPEND DEPENDENCIES nlohmann_json)
|
||||||
set(JSON_MultipleHeaders ON CACHE INTERNAL "")
|
set(JSON_MultipleHeaders ON CACHE INTERNAL "")
|
||||||
@@ -61,16 +66,16 @@ string(TOLOWER release_${CMAKE_PLATFORM} SLANG_CONFIG)
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
ExternalProject_Add(slang
|
ExternalProject_Add(slang
|
||||||
SOURCE_DIR ${SLANG_ROOT}
|
SOURCE_DIR ${SLANG_ROOT}
|
||||||
BINARY_DIR ${CMAKE_BINARY_DIR}/lib
|
BINARY_DIR ${SLANG_ROOT}
|
||||||
CONFIGURE_COMMAND devenv /upgrade ${SLANG_ROOT}/source/slang/slang.vcxproj
|
CONFIGURE_COMMAND ""
|
||||||
BUILD_COMMAND msbuild -p:Configuration=Release -p:WarningLevel=0 -p:Platform=${CMAKE_PLATFORM} -p:WindowsTargetPlatformVersion=10.0 ${SLANG_ROOT}/source/slang/slang.vcxproj
|
BUILD_COMMAND msbuild slang.sln
|
||||||
INSTALL_COMMAND "")
|
INSTALL_COMMAND "")
|
||||||
|
|
||||||
set(SLANG_LIB_PATH ${SLANG_ROOT}/${SLANG_LIB_PATH})
|
set(SLANG_LIB_PATH ${SLANG_ROOT}/${SLANG_LIB_PATH})
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
ExternalProject_Add(slang
|
ExternalProject_Add(slang
|
||||||
SOURCE_DIR ${SLANG_ROOT}
|
SOURCE_DIR ${SLANG_ROOT}
|
||||||
BINARY_DIR ${CMAKE_BINARY_DIR}/lib
|
BINARY_DIR ${SLANG_ROOT}/lib
|
||||||
CONFIGURE_COMMAND ${CMAKE_SOURCE_DIR}/premake5 --file=${CMAKE_SOURCE_DIR}/external/slang/premake5.lua gmake2 --build-location=build.linux
|
CONFIGURE_COMMAND ${CMAKE_SOURCE_DIR}/premake5 --file=${CMAKE_SOURCE_DIR}/external/slang/premake5.lua gmake2 --build-location=build.linux
|
||||||
BUILD_COMMAND make -C ${CMAKE_SOURCE_DIR}/external/slang/build.linux config=${SLANG_CONFIG}
|
BUILD_COMMAND make -C ${CMAKE_SOURCE_DIR}/external/slang/build.linux config=${SLANG_CONFIG}
|
||||||
INSTALL_COMMAND "")
|
INSTALL_COMMAND "")
|
||||||
@@ -80,16 +85,6 @@ ExternalProject_Add(slang
|
|||||||
set(SLANG_LIB_PATH)
|
set(SLANG_LIB_PATH)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#----------------SPIR-V-CROSS--------------------
|
|
||||||
# list(APPEND DEPENDENCIES spirv-cross-reflect)
|
|
||||||
# set(SPIRV_CROSS_ENABLE_HLSL OFF CACHE BOOL "")
|
|
||||||
# set(SPIRV_CROSS_ENABLE_TESTS OFF CACHE BOOL "")
|
|
||||||
# set(SPIRV_CROSS_CLI OFF CACHE BOOL "")
|
|
||||||
# set(SPIRV_CROSS_ENABLE_C_API OFF CACHE BOOL "")
|
|
||||||
# set(SPIRV_CROSS_ENABLE_UTIL OFF CACHE BOOL "")
|
|
||||||
# set(SPIRV_CROSS_SKIP_INSTALL ON CACHE BOOL "")
|
|
||||||
# add_subdirectory(${SPIRV_ROOT})
|
|
||||||
|
|
||||||
|
|
||||||
#-----------------SeeleEngine--------------------
|
#-----------------SeeleEngine--------------------
|
||||||
ExternalProject_Add(SeeleEngine
|
ExternalProject_Add(SeeleEngine
|
||||||
|
|||||||
+1
Submodule external/ktx added at 68674a69ca
Vendored
-1
Submodule external/slang deleted from 83514bd251
@@ -21,12 +21,12 @@ Scene::Scene(Gfx::PGraphics graphics)
|
|||||||
lightEnv.directionalLights[0].intensity = Vector4(1, 1, 1, 1);
|
lightEnv.directionalLights[0].intensity = Vector4(1, 1, 1, 1);
|
||||||
lightEnv.numDirectionalLights = 0;
|
lightEnv.numDirectionalLights = 0;
|
||||||
srand((unsigned int)time(NULL));
|
srand((unsigned int)time(NULL));
|
||||||
for(uint32 i = 0; i < 1; ++i)
|
for(uint32 i = 0; i < 16; ++i)
|
||||||
{
|
{
|
||||||
lightEnv.pointLights[i].colorRange = Vector4(frand(), frand(), frand(), frand() * 30);
|
lightEnv.pointLights[i].colorRange = Vector4(frand(), frand(), frand(), frand() * 30);
|
||||||
lightEnv.pointLights[i].positionWS = Vector4(frand() * 100-50, frand(), frand() * 100-50, 1);
|
lightEnv.pointLights[i].positionWS = Vector4(frand() * 100-50, frand(), frand() * 100-50, 1);
|
||||||
}
|
}
|
||||||
lightEnv.numPointLights = 1;
|
lightEnv.numPointLights = 16;
|
||||||
lightEnv.pointLights[0].colorRange = Vector4(1, 0, 0, 100);
|
lightEnv.pointLights[0].colorRange = Vector4(1, 0, 0, 100);
|
||||||
lightEnv.pointLights[0].positionWS = Vector4(0, 10, 0, 1);
|
lightEnv.pointLights[0].positionWS = Vector4(0, 10, 0, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
target_sources(SeeleEngine
|
target_sources(SeeleEngine
|
||||||
PRIVATE
|
PRIVATE
|
||||||
UIComponent.h
|
Element.h
|
||||||
UIComponent.cpp
|
Element.cpp
|
||||||
|
RenderHierarchy.h
|
||||||
|
RenderHierarchy.cpp
|
||||||
UIRenderPath.h
|
UIRenderPath.h
|
||||||
UIRenderPath.cpp)
|
UIRenderPath.cpp)
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#include "Element.h"
|
||||||
|
|
||||||
|
using namespace Seele;
|
||||||
|
using namespace Seele::UI;
|
||||||
|
|
||||||
|
Element::Element()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Element::~Element()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Element::addElement(PElement element)
|
||||||
|
{
|
||||||
|
children.add(element);
|
||||||
|
}
|
||||||
|
|
||||||
|
const Array<PElement> Element::getChildren() const
|
||||||
|
{
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Element::clear()
|
||||||
|
{
|
||||||
|
children.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Element::remove(PElement element)
|
||||||
|
{
|
||||||
|
children.remove(children.find(element));
|
||||||
|
}
|
||||||
|
|
||||||
|
void Element::setEnabled(bool newEnabled)
|
||||||
|
{
|
||||||
|
enabled = newEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Element::isEnabled() const
|
||||||
|
{
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "MinimalEngine.h"
|
||||||
|
|
||||||
|
namespace Seele
|
||||||
|
{
|
||||||
|
namespace UI
|
||||||
|
{
|
||||||
|
//Element defines any part of the UI
|
||||||
|
DECLARE_REF(Element)
|
||||||
|
class Element
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Element();
|
||||||
|
virtual ~Element();
|
||||||
|
void addElement(PElement element);
|
||||||
|
const Array<PElement> getChildren() const;
|
||||||
|
void clear();
|
||||||
|
void remove(PElement element);
|
||||||
|
void setEnabled(bool newEnabled);
|
||||||
|
bool isEnabled() const;
|
||||||
|
protected:
|
||||||
|
bool enabled;
|
||||||
|
Array<PElement> children;
|
||||||
|
};
|
||||||
|
DEFINE_REF(Element)
|
||||||
|
} // namespace UI
|
||||||
|
} // namespace Seele
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace Seele
|
||||||
|
{
|
||||||
|
namespace UI
|
||||||
|
{
|
||||||
|
class RenderHierarchy
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
} // namespace UI
|
||||||
|
} // namespace Seele
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include "MinimalEngine.h"
|
|
||||||
namespace Seele
|
|
||||||
{
|
|
||||||
DECLARE_REF(UIRenderPath)
|
|
||||||
class UIComponent
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
UIComponent(PUIRenderPath renderer);
|
|
||||||
virtual ~UIComponent();
|
|
||||||
private:
|
|
||||||
PUIRenderPath renderer;
|
|
||||||
};
|
|
||||||
DEFINE_REF(UIComponent);
|
|
||||||
} // namespace Seele
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Window/RenderPath.h"
|
#include "Window/RenderPath.h"
|
||||||
#include "UIComponent.h"
|
#include "Element.h"
|
||||||
|
|
||||||
namespace Seele
|
namespace Seele
|
||||||
{
|
{
|
||||||
@@ -13,6 +13,7 @@ public:
|
|||||||
virtual void render();
|
virtual void render();
|
||||||
virtual void endFrame();
|
virtual void endFrame();
|
||||||
private:
|
private:
|
||||||
|
Array<UI::PElement> rootElements;
|
||||||
};
|
};
|
||||||
DEFINE_REF(UIRenderPath);
|
DEFINE_REF(UIRenderPath);
|
||||||
} // namespace Seele
|
} // namespace Seele
|
||||||
|
|||||||
@@ -14,6 +14,5 @@ public:
|
|||||||
virtual void endFrame();
|
virtual void endFrame();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PUIComponent root;
|
|
||||||
};
|
};
|
||||||
} // namespace Seele
|
} // namespace Seele
|
||||||
|
|||||||
Reference in New Issue
Block a user