Add KRDescriptorManager and KRDescriptorSet classes with stub functions.
This commit is contained in:
@@ -22,6 +22,8 @@ add_sources(KRBundleManager.cpp)
|
|||||||
add_sources(KRCamera.cpp)
|
add_sources(KRCamera.cpp)
|
||||||
add_sources(KRCollider.cpp)
|
add_sources(KRCollider.cpp)
|
||||||
add_sources(KRContext.cpp)
|
add_sources(KRContext.cpp)
|
||||||
|
add_sources(KRDescriptorManager.cpp)
|
||||||
|
add_sources(KRDescriptorSet.cpp)
|
||||||
add_sources(KRDevice.cpp)
|
add_sources(KRDevice.cpp)
|
||||||
add_sources(KRDeviceManager.cpp)
|
add_sources(KRDeviceManager.cpp)
|
||||||
add_sources(KRRenderPass.cpp)
|
add_sources(KRRenderPass.cpp)
|
||||||
|
|||||||
@@ -102,6 +102,8 @@ KRContext::KRContext(const KrInitializeInfo* initializeInfo)
|
|||||||
m_pBundleManager = std::make_unique<KRBundleManager>(*this);
|
m_pBundleManager = std::make_unique<KRBundleManager>(*this);
|
||||||
m_deviceManager = std::make_unique<KRDeviceManager>(*this);
|
m_deviceManager = std::make_unique<KRDeviceManager>(*this);
|
||||||
m_deviceManager->initialize();
|
m_deviceManager->initialize();
|
||||||
|
m_descriptorManager = std::make_unique<KRDescriptorManager>(*this);
|
||||||
|
m_descriptorManager->init();
|
||||||
m_surfaceManager = std::make_unique<KRSurfaceManager>(*this);
|
m_surfaceManager = std::make_unique<KRSurfaceManager>(*this);
|
||||||
m_pPipelineManager = std::make_unique<KRPipelineManager>(*this);
|
m_pPipelineManager = std::make_unique<KRPipelineManager>(*this);
|
||||||
m_pSamplerManager = std::make_unique<KRSamplerManager>(*this);
|
m_pSamplerManager = std::make_unique<KRSamplerManager>(*this);
|
||||||
@@ -162,6 +164,7 @@ KRContext::~KRContext()
|
|||||||
m_pShaderManager.reset();
|
m_pShaderManager.reset();
|
||||||
m_surfaceManager.reset();
|
m_surfaceManager.reset();
|
||||||
m_deviceManager.reset();
|
m_deviceManager.reset();
|
||||||
|
m_descriptorManager.reset();
|
||||||
|
|
||||||
// The bundles must be destroyed last, as the other objects may be using mmap'ed data from bundles
|
// The bundles must be destroyed last, as the other objects may be using mmap'ed data from bundles
|
||||||
m_pBundleManager.reset();
|
m_pBundleManager.reset();
|
||||||
@@ -255,6 +258,10 @@ KRDeviceManager* KRContext::getDeviceManager()
|
|||||||
{
|
{
|
||||||
return m_deviceManager.get();
|
return m_deviceManager.get();
|
||||||
}
|
}
|
||||||
|
KRDescriptorManager* KRContext::getDescriptorManager()
|
||||||
|
{
|
||||||
|
return m_descriptorManager.get();
|
||||||
|
}
|
||||||
KRUnknownManager* KRContext::getUnknownManager()
|
KRUnknownManager* KRContext::getUnknownManager()
|
||||||
{
|
{
|
||||||
return m_pUnknownManager.get();
|
return m_pUnknownManager.get();
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
#include "KRShaderManager.h"
|
#include "KRShaderManager.h"
|
||||||
#include "KRSourceManager.h"
|
#include "KRSourceManager.h"
|
||||||
#include "KRSurfaceManager.h"
|
#include "KRSurfaceManager.h"
|
||||||
|
#include "KRDescriptorManager.h"
|
||||||
#include "KRDeviceManager.h"
|
#include "KRDeviceManager.h"
|
||||||
#include "KRDevice.h"
|
#include "KRDevice.h"
|
||||||
#include "KRSurface.h"
|
#include "KRSurface.h"
|
||||||
@@ -53,6 +54,7 @@ class KRAudioManager;
|
|||||||
class KRPresentationThread;
|
class KRPresentationThread;
|
||||||
class KRStreamerThread;
|
class KRStreamerThread;
|
||||||
class KRDeviceManager;
|
class KRDeviceManager;
|
||||||
|
class KRDescriptorManager;
|
||||||
class KRSurfaceManager;
|
class KRSurfaceManager;
|
||||||
class KRSamplerManager;
|
class KRSamplerManager;
|
||||||
|
|
||||||
@@ -118,6 +120,7 @@ public:
|
|||||||
KRSourceManager* getSourceManager();
|
KRSourceManager* getSourceManager();
|
||||||
KRSurfaceManager* getSurfaceManager();
|
KRSurfaceManager* getSurfaceManager();
|
||||||
KRDeviceManager* getDeviceManager();
|
KRDeviceManager* getDeviceManager();
|
||||||
|
KRDescriptorManager* getDescriptorManager();
|
||||||
|
|
||||||
void startFrame(float deltaTime);
|
void startFrame(float deltaTime);
|
||||||
void endFrame(float deltaTime);
|
void endFrame(float deltaTime);
|
||||||
@@ -170,6 +173,7 @@ private:
|
|||||||
std::unique_ptr<KRShaderManager> m_pShaderManager;
|
std::unique_ptr<KRShaderManager> m_pShaderManager;
|
||||||
std::unique_ptr<KRSourceManager> m_pSourceManager;
|
std::unique_ptr<KRSourceManager> m_pSourceManager;
|
||||||
std::unique_ptr<KRDeviceManager> m_deviceManager;
|
std::unique_ptr<KRDeviceManager> m_deviceManager;
|
||||||
|
std::unique_ptr<KRDescriptorManager> m_descriptorManager;
|
||||||
std::unique_ptr<KRSurfaceManager> m_surfaceManager;
|
std::unique_ptr<KRSurfaceManager> m_surfaceManager;
|
||||||
|
|
||||||
KRResource** m_resourceMap;
|
KRResource** m_resourceMap;
|
||||||
|
|||||||
48
kraken/KRDescriptorManager.cpp
Normal file
48
kraken/KRDescriptorManager.cpp
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
//
|
||||||
|
// ShaderManager.cpp
|
||||||
|
// Kraken Engine
|
||||||
|
//
|
||||||
|
// Copyright 2022 Kearwood Gilbert. All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
// provided with the distribution.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR
|
||||||
|
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
//
|
||||||
|
// The views and conclusions contained in the software and documentation are those of the
|
||||||
|
// authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
// or implied, of Kearwood Gilbert.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "KRDescriptorManager.h"
|
||||||
|
|
||||||
|
KRDescriptorManager::KRDescriptorManager(KRContext& context)
|
||||||
|
: KRContextObject(context)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
KRDescriptorManager::~KRDescriptorManager()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void KRDescriptorManager::init()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
51
kraken/KRDescriptorManager.h
Normal file
51
kraken/KRDescriptorManager.h
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
//
|
||||||
|
// KRSurfaceManager.h
|
||||||
|
// Kraken Engine
|
||||||
|
//
|
||||||
|
// Copyright 2022 Kearwood Gilbert. All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
// provided with the distribution.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR
|
||||||
|
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
//
|
||||||
|
// The views and conclusions contained in the software and documentation are those of the
|
||||||
|
// authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
// or implied, of Kearwood Gilbert.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
|
#include "KRContext.h"
|
||||||
|
#include "KRDescriptorSet.h"
|
||||||
|
|
||||||
|
class KRDescriptorSet;
|
||||||
|
|
||||||
|
class KRDescriptorManager : KRContextObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
KRDescriptorManager(KRContext& context);
|
||||||
|
~KRDescriptorManager();
|
||||||
|
|
||||||
|
void init();
|
||||||
|
|
||||||
|
private:
|
||||||
|
set<KRDescriptorSet> m_descriptorSets;
|
||||||
|
};
|
||||||
43
kraken/KRDescriptorSet.cpp
Normal file
43
kraken/KRDescriptorSet.cpp
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
//
|
||||||
|
// ShaderManager.cpp
|
||||||
|
// Kraken Engine
|
||||||
|
//
|
||||||
|
// Copyright 2022 Kearwood Gilbert. All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
// provided with the distribution.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR
|
||||||
|
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
//
|
||||||
|
// The views and conclusions contained in the software and documentation are those of the
|
||||||
|
// authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
// or implied, of Kearwood Gilbert.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "KRDescriptorSet.h"
|
||||||
|
|
||||||
|
KRDescriptorSet::KRDescriptorSet(KRContext& context)
|
||||||
|
: KRContextObject(context)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
KRDescriptorSet::~KRDescriptorSet()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
46
kraken/KRDescriptorSet.h
Normal file
46
kraken/KRDescriptorSet.h
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
//
|
||||||
|
// KRPipeline.h
|
||||||
|
// Kraken Engine
|
||||||
|
//
|
||||||
|
// Copyright 2022 Kearwood Gilbert. All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
// provided with the distribution.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR
|
||||||
|
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
//
|
||||||
|
// The views and conclusions contained in the software and documentation are those of the
|
||||||
|
// authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
// or implied, of Kearwood Gilbert.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "KREngine-common.h"
|
||||||
|
#include "KRContext.h"
|
||||||
|
|
||||||
|
class KRDescriptorSet : public KRContextObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
KRDescriptorSet(KRContext& context);
|
||||||
|
virtual ~KRDescriptorSet();
|
||||||
|
|
||||||
|
private:
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user