Merge branch 'master' into vulkan
Former-commit-id: 38b7c439620b078448ce9b84fc42627ebf62f49a [formerly 3ae3a4f3c227085b3e4939461d19c17cde3862a2] Former-commit-id: 3a476b16265b9825cdb17c7a054e57abb5cf6eb6
This commit is contained in:
commit
c75f3ce28b
|
|
@ -1,20 +1,17 @@
|
|||
// This file was automatically generated on 03 Mar 2016 at 14:09:12
|
||||
// This file was automatically generated on 01 Jun 2016 at 13:11:09
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NDK_COMPONENTS_GLOBAL_HPP
|
||||
#define NDK_COMPONENTS_GLOBAL_HPP
|
||||
|
||||
#include <NDK/Components/CameraComponent.hpp>
|
||||
#include <NDK/Components/CollisionComponent.hpp>
|
||||
#include <NDK/Components/GraphicsComponent.hpp>
|
||||
#include <NDK/Components/LightComponent.hpp>
|
||||
#include <NDK/Components/ListenerComponent.hpp>
|
||||
#include <NDK/Components/NodeComponent.hpp>
|
||||
#include <NDK/Components/PhysicsComponent.hpp>
|
||||
#include <NDK/Components/VelocityComponent.hpp>
|
||||
|
||||
#ifndef NDK_SERVER
|
||||
#include <NDK/Components/CameraComponent.hpp>
|
||||
#include <NDK/Components/GraphicsComponent.hpp>
|
||||
#include <NDK/Components/LightComponent.hpp>
|
||||
#include <NDK/Components/ListenerComponent.hpp>
|
||||
#endif
|
||||
|
||||
#endif // NDK_COMPONENTS_GLOBAL_HPP
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifndef NDK_SERVER
|
||||
#ifndef NDK_COMPONENTS_CAMERACOMPONENT_HPP
|
||||
#define NDK_COMPONENTS_CAMERACOMPONENT_HPP
|
||||
|
||||
|
|
@ -108,3 +109,4 @@ namespace Ndk
|
|||
#include <NDK/Components/CameraComponent.inl>
|
||||
|
||||
#endif // NDK_COMPONENTS_CAMERACOMPONENT_HPP
|
||||
#endif // NDK_SERVER
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifndef NDK_SERVER
|
||||
#ifndef NDK_COMPONENTS_GRAPHICSCOMPONENT_HPP
|
||||
#define NDK_COMPONENTS_GRAPHICSCOMPONENT_HPP
|
||||
|
||||
|
|
@ -80,3 +81,4 @@ namespace Ndk
|
|||
#include <NDK/Components/GraphicsComponent.inl>
|
||||
|
||||
#endif // NDK_COMPONENTS_GRAPHICSCOMPONENT_HPP
|
||||
#endif // NDK_SERVER
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifndef NDK_SERVER
|
||||
#ifndef NDK_COMPONENTS_LIGHTCOMPONENT_HPP
|
||||
#define NDK_COMPONENTS_LIGHTCOMPONENT_HPP
|
||||
|
||||
|
|
@ -28,3 +29,4 @@ namespace Ndk
|
|||
#include <NDK/Components/LightComponent.inl>
|
||||
|
||||
#endif // NDK_COMPONENTS_LIGHTCOMPONENT_HPP
|
||||
#endif // NDK_SERVER
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifndef NDK_SERVER
|
||||
#ifndef NDK_COMPONENTS_LISTENERCOMPONENT_HPP
|
||||
#define NDK_COMPONENTS_LISTENERCOMPONENT_HPP
|
||||
|
||||
|
|
@ -30,3 +31,4 @@ namespace Ndk
|
|||
#include <NDK/Components/ListenerComponent.inl>
|
||||
|
||||
#endif // NDK_COMPONENTS_LISTENERCOMPONENT_HPP
|
||||
#endif // NDK_SERVER
|
||||
|
|
@ -1,16 +1,13 @@
|
|||
// This file was automatically generated on 03 Mar 2016 at 14:09:12
|
||||
// This file was automatically generated on 01 Jun 2016 at 13:11:09
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NDK_SYSTEMS_GLOBAL_HPP
|
||||
#define NDK_SYSTEMS_GLOBAL_HPP
|
||||
|
||||
#include <NDK/Systems/ListenerSystem.hpp>
|
||||
#include <NDK/Systems/PhysicsSystem.hpp>
|
||||
#include <NDK/Systems/RenderSystem.hpp>
|
||||
#include <NDK/Systems/VelocitySystem.hpp>
|
||||
|
||||
#ifndef NDK_SERVER
|
||||
#include <NDK/Systems/ListenerSystem.hpp>
|
||||
#include <NDK/Systems/RenderSystem.hpp>
|
||||
#endif
|
||||
|
||||
#endif // NDK_SYSTEMS_GLOBAL_HPP
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifndef NDK_SERVER
|
||||
#ifndef NDK_SYSTEMS_LISTENERSYSTEM_HPP
|
||||
#define NDK_SYSTEMS_LISTENERSYSTEM_HPP
|
||||
|
||||
|
|
@ -27,3 +28,4 @@ namespace Ndk
|
|||
#include <NDK/Systems/ListenerSystem.inl>
|
||||
|
||||
#endif // NDK_SYSTEMS_LISTENERSYSTEM_HPP
|
||||
#endif // NDK_SERVER
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifndef NDK_SERVER
|
||||
#ifndef NDK_SYSTEMS_RENDERSYSTEM_HPP
|
||||
#define NDK_SYSTEMS_RENDERSYSTEM_HPP
|
||||
|
||||
|
|
@ -70,3 +71,4 @@ namespace Ndk
|
|||
#include <NDK/Systems/RenderSystem.inl>
|
||||
|
||||
#endif // NDK_SYSTEMS_RENDERSYSTEM_HPP
|
||||
#endif // NDK_SERVER
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespace Ndk
|
|||
static_assert(std::is_base_of<BaseSystem, SystemType>::value, "SystemType is not a component");
|
||||
|
||||
// Allocation et affectation du component
|
||||
std::unique_ptr<SystemType> ptr(new SystemType(std::forward(args)...));
|
||||
std::unique_ptr<SystemType> ptr(new SystemType(std::forward<Args>(args)...));
|
||||
return static_cast<SystemType&>(AddSystem(std::move(ptr)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function NazaraBuild:Execute()
|
|||
if (self.Actions[_ACTION] == nil) then
|
||||
local makeLibDir = os.is("windows") and "mingw" or "gmake"
|
||||
|
||||
if (#self.OrderedExtLibs > 0) then
|
||||
if (_OPTIONS["with-extlibs"]) then
|
||||
workspace("NazaraExtlibs")
|
||||
platforms(platformData)
|
||||
|
||||
|
|
@ -196,9 +196,7 @@ function NazaraBuild:Execute()
|
|||
targetdir("../lib/" .. makeLibDir .. "/x64")
|
||||
|
||||
-- Copy the module binaries to the example folder
|
||||
if (os.is("windows")) then
|
||||
self:MakeCopyAfterBuild(moduleTable)
|
||||
end
|
||||
|
||||
configuration({"vs*", "x86"})
|
||||
libdirs("../extlibs/lib/msvc/x86")
|
||||
|
|
@ -310,7 +308,7 @@ function NazaraBuild:Execute()
|
|||
targetdir("../plugins/" .. toolTable.Name .. "/lib/" .. makeLibDir .. "/x64")
|
||||
end
|
||||
|
||||
-- Copy the module binaries to the example folder
|
||||
-- Copy the tool binaries to the example folder
|
||||
if (toolTable.CopyTargetToExampleDir) then
|
||||
self:MakeCopyAfterBuild(toolTable)
|
||||
end
|
||||
|
|
@ -450,6 +448,11 @@ end
|
|||
|
||||
function NazaraBuild:Initialize()
|
||||
-- Commençons par les options
|
||||
newoption({
|
||||
trigger = "server",
|
||||
description = "Excludes client-only modules/tools/examples"
|
||||
})
|
||||
|
||||
newoption({
|
||||
trigger = "united",
|
||||
description = "Builds all the modules as one united library"
|
||||
|
|
@ -491,7 +494,6 @@ function NazaraBuild:Initialize()
|
|||
ACTION = nil
|
||||
|
||||
-- Extern libraries
|
||||
if (_OPTIONS["with-extlibs"]) then
|
||||
local extlibs = os.matchfiles("../extlibs/build/*.lua")
|
||||
for k,v in pairs(extlibs) do
|
||||
local f, err = loadfile(v)
|
||||
|
|
@ -510,7 +512,6 @@ function NazaraBuild:Initialize()
|
|||
end
|
||||
end
|
||||
LIBRARY = nil
|
||||
end
|
||||
|
||||
-- Then the modules
|
||||
local modules = os.matchfiles("scripts/modules/*.lua")
|
||||
|
|
@ -605,13 +606,20 @@ function NazaraBuild:Initialize()
|
|||
self.OrderedExtLibs = {}
|
||||
self.OrderedModules = {}
|
||||
self.OrderedTools = {}
|
||||
local tables = {self.Examples, self.ExtLibs, self.Modules, self.Tools}
|
||||
local orderedTables = {self.OrderedExamples, self.OrderedExtLibs, self.OrderedModules, self.OrderedTools}
|
||||
local tables = {self.ExtLibs, self.Modules, self.Tools, self.Examples}
|
||||
local orderedTables = {self.OrderedExtLibs, self.OrderedModules, self.OrderedTools, self.OrderedExamples}
|
||||
for k,projects in ipairs(tables) do
|
||||
-- Begin by resolving every project (because of dependencies in the same category)
|
||||
for projectId,projectTable in pairs(projects) do
|
||||
self:Process(projectTable)
|
||||
self:Resolve(projectTable)
|
||||
end
|
||||
|
||||
for projectId,projectTable in pairs(projects) do
|
||||
if (self:Process(projectTable)) then
|
||||
table.insert(orderedTables[k], projectTable)
|
||||
else
|
||||
print("Rejected client-only " .. projectTable.Name .. " " .. projectTable.Type)
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(orderedTables[k], function (a, b) return a.Name < b.Name end)
|
||||
|
|
@ -772,6 +780,10 @@ local PosixOSes = {
|
|||
}
|
||||
|
||||
function NazaraBuild:Process(infoTable)
|
||||
if (infoTable.ClientOnly and _OPTIONS["server"]) then
|
||||
return false
|
||||
end
|
||||
|
||||
local libraries = {}
|
||||
for k, library in pairs(infoTable.Libraries) do
|
||||
local moduleName = library:match("Nazara(%w+)")
|
||||
|
|
@ -779,6 +791,11 @@ function NazaraBuild:Process(infoTable)
|
|||
local toolTable = moduleName and self.Tools[moduleName:lower()]
|
||||
|
||||
if (moduleTable) then
|
||||
if (moduleTable.ClientOnly and _OPTIONS["server"]) then
|
||||
infoTable.ClientOnly = true
|
||||
return false -- We depend on a client-only library
|
||||
end
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
library = "NazaraEngine"
|
||||
else
|
||||
|
|
@ -794,6 +811,11 @@ function NazaraBuild:Process(infoTable)
|
|||
else
|
||||
local extLibTable = self.ExtLibs[library:lower()]
|
||||
if (extLibTable) then
|
||||
if (extLibTable.ClientOnly and _OPTIONS["server"]) then
|
||||
infoTable.ClientOnly = true
|
||||
return false -- We depend on a client-only library
|
||||
end
|
||||
|
||||
library = extLibTable.Name
|
||||
|
||||
table.insert(infoTable.ConfigurationLibraries.DebugStatic, library .. "-s-d")
|
||||
|
|
@ -802,6 +824,11 @@ function NazaraBuild:Process(infoTable)
|
|||
table.insert(infoTable.ConfigurationLibraries.ReleaseDynamic, library .. "-s")
|
||||
else
|
||||
if (toolTable and toolTable.Kind == "library") then
|
||||
if (toolTable.ClientOnly and _OPTIONS["server"]) then
|
||||
infoTable.ClientOnly = true
|
||||
return false -- We depend on a client-only library
|
||||
end
|
||||
|
||||
library = "Nazara" .. toolTable.Name
|
||||
|
||||
-- Import tools includes
|
||||
|
|
@ -862,6 +889,14 @@ function NazaraBuild:Process(infoTable)
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function NazaraBuild:Resolve(infoTable)
|
||||
if (type(infoTable.Libraries) == "function") then
|
||||
infoTable.Libraries = infoTable.Libraries()
|
||||
end
|
||||
end
|
||||
|
||||
function NazaraBuild:MakeCopyAfterBuild(infoTable)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
MODULE.Name = "Audio"
|
||||
|
||||
MODULE.ClientOnly = true
|
||||
|
||||
MODULE.Defines = {
|
||||
"NAZARA_AUDIO_OPENAL"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
MODULE.Name = "Renderer"
|
||||
|
||||
MODULE.ClientOnly = true
|
||||
|
||||
MODULE.Defines = {
|
||||
"NAZARA_RENDERER_OPENGL"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
MODULE.Name = "Vulkan"
|
||||
|
||||
MODULE.ClientOnly = true
|
||||
|
||||
MODULE.Defines = {
|
||||
"VK_NO_PROTOTYPES"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,14 +22,11 @@ TOOL.Files = {
|
|||
"../SDK/src/NDK/**.cpp"
|
||||
}
|
||||
|
||||
TOOL.Libraries = {
|
||||
"NazaraCore",
|
||||
"NazaraAudio",
|
||||
"NazaraLua",
|
||||
"NazaraNetwork",
|
||||
"NazaraNoise",
|
||||
"NazaraPhysics",
|
||||
"NazaraUtility",
|
||||
"NazaraRenderer",
|
||||
"NazaraGraphics"
|
||||
}
|
||||
TOOL.Libraries = function()
|
||||
local libraries = {}
|
||||
for k,v in pairs(NazaraBuild.Modules) do
|
||||
table.insert(libraries, "Nazara" .. v.Name)
|
||||
end
|
||||
|
||||
return libraries
|
||||
end
|
||||
|
|
@ -37,11 +37,14 @@ TOOL.FilesExcluded = {
|
|||
"../SDK/**/LuaBinding_Renderer.*"
|
||||
}
|
||||
|
||||
TOOL.Libraries = {
|
||||
"NazaraCore",
|
||||
"NazaraLua",
|
||||
"NazaraNetwork",
|
||||
"NazaraNoise",
|
||||
"NazaraPhysics",
|
||||
"NazaraUtility"
|
||||
}
|
||||
|
||||
TOOL.Libraries = function()
|
||||
local libraries = {}
|
||||
for k,v in pairs(NazaraBuild.Modules) do
|
||||
if (not v.ClientOnly) then
|
||||
table.insert(libraries, "Nazara" .. v.Name)
|
||||
end
|
||||
end
|
||||
|
||||
return libraries
|
||||
end
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace Nz
|
|||
renderPass,
|
||||
subpass,
|
||||
framebuffer,
|
||||
(occlusionQueryEnable) ? VK_TRUE : VK_FALSE,
|
||||
VkBool32((occlusionQueryEnable) ? VK_TRUE : VK_FALSE),
|
||||
queryFlags,
|
||||
pipelineStatistics
|
||||
};
|
||||
|
|
@ -102,7 +102,7 @@ namespace Nz
|
|||
VK_NULL_HANDLE,
|
||||
0,
|
||||
VK_NULL_HANDLE,
|
||||
(occlusionQueryEnable) ? VK_TRUE : VK_FALSE,
|
||||
VkBool32((occlusionQueryEnable) ? VK_TRUE : VK_FALSE),
|
||||
queryFlags,
|
||||
pipelineStatistics
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace Nz
|
|||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
inline bool Surface::Create(const VkAndroidSurfaceCreateInfoKHR& createInfo, const VkAllocationCallbacks* allocator)
|
||||
{
|
||||
m_lastErrorCode = m_instance.PFN_vkCreateAndroidSurfaceKHR(m_instance, &createInfo, allocator, &m_surface);
|
||||
m_lastErrorCode = m_instance.vkCreateAndroidSurfaceKHR(m_instance, &createInfo, allocator, &m_surface);
|
||||
return Create(allocator);
|
||||
}
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ namespace Nz
|
|||
#ifdef VK_USE_PLATFORM_MIR_KHR
|
||||
inline bool Surface::Create(const VkMirSurfaceCreateInfoKHR& createInfo, const VkAllocationCallbacks* allocator)
|
||||
{
|
||||
m_lastErrorCode = m_instance.PFN_vkCreateMirSurfaceKHR(m_instance, &createInfo, allocator, &m_surface);
|
||||
m_lastErrorCode = m_instance.vkCreateMirSurfaceKHR(m_instance, &createInfo, allocator, &m_surface);
|
||||
return Create(allocator);
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ namespace Nz
|
|||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||
inline bool Surface::Create(const VkXcbSurfaceCreateInfoKHR& createInfo, const VkAllocationCallbacks* allocator)
|
||||
{
|
||||
m_lastErrorCode = m_instance.PFN_vkCreateXcbSurfaceKHR(m_instance, &createInfo, allocator, &m_surface);
|
||||
m_lastErrorCode = m_instance.vkCreateXcbSurfaceKHR(m_instance, &createInfo, allocator, &m_surface);
|
||||
return Create(allocator);
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ namespace Nz
|
|||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||
inline bool Surface::Create(const VkXlibSurfaceCreateInfoKHR& createInfo, const VkAllocationCallbacks* allocator)
|
||||
{
|
||||
m_lastErrorCode = m_instance.PFN_vkCreateXlibSurfaceKHR(m_instance, &createInfo, allocator, &m_surface);
|
||||
m_lastErrorCode = m_instance.vkCreateXlibSurfaceKHR(m_instance, &createInfo, allocator, &m_surface);
|
||||
return Create(allocator);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue