summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-07-23 22:58:46 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-08-02 19:21:33 +0000
commit8a7504ff49c357ad86d547a35bdfd3258bea72df (patch)
treebb60a5848ac4046b66dfa3197423a60bec185613 /Graphics/GraphicsEngineOpenGL
parentAdded Render pass interface stub (diff)
downloadDiligentCore-8a7504ff49c357ad86d547a35bdfd3258bea72df.tar.gz
DiligentCore-8a7504ff49c357ad86d547a35bdfd3258bea72df.zip
Added render pass object implementation stubs in all backends
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/CMakeLists.txt2
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/RenderPassGLImpl.hpp54
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp22
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/RenderPassGLImpl.cpp47
4 files changed, 115 insertions, 10 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
index 1072d067..52251b68 100644
--- a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
+++ b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
@@ -20,6 +20,7 @@ set(INCLUDE
include/PipelineStateGLImpl.hpp
include/QueryGLImpl.hpp
include/RenderDeviceGLImpl.hpp
+ include/RenderPassGLImpl.hpp
include/SamplerGLImpl.hpp
include/ShaderGLImpl.hpp
include/ShaderResourceBindingGLImpl.hpp
@@ -71,6 +72,7 @@ set(SOURCE
src/PipelineStateGLImpl.cpp
src/QueryGLImpl.cpp
src/RenderDeviceGLImpl.cpp
+ src/RenderPassGLImpl.cpp
src/SamplerGLImpl.cpp
src/ShaderGLImpl.cpp
src/ShaderResourceBindingGLImpl.cpp
diff --git a/Graphics/GraphicsEngineOpenGL/include/RenderPassGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/RenderPassGLImpl.hpp
new file mode 100644
index 00000000..e5d77333
--- /dev/null
+++ b/Graphics/GraphicsEngineOpenGL/include/RenderPassGLImpl.hpp
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2019-2020 Diligent Graphics LLC
+ * Copyright 2015-2019 Egor Yusov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * In no event and under no legal theory, whether in tort (including negligence),
+ * contract, or otherwise, unless required by applicable law (such as deliberate
+ * and grossly negligent acts) or agreed to in writing, shall any Contributor be
+ * liable for any damages, including any direct, indirect, special, incidental,
+ * or consequential damages of any character arising as a result of this License or
+ * out of the use or inability to use the software (including but not limited to damages
+ * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
+ * all other commercial damages or losses), even if such Contributor has been advised
+ * of the possibility of such damages.
+ */
+
+#pragma once
+
+/// \file
+/// Declaration of Diligent::RenderPassGLImpl class
+
+#include "RenderDeviceGL.h"
+#include "RenderPassBase.hpp"
+#include "RenderDeviceGLImpl.hpp"
+
+namespace Diligent
+{
+
+class FixedBlockMemoryAllocator;
+
+/// Render pass implementation in Direct3D11 backend.
+class RenderPassGLImpl final : public RenderPassBase<IRenderPass, RenderDeviceGLImpl>
+{
+public:
+ using TRenderPassBase = RenderPassBase<IRenderPass, RenderDeviceGLImpl>;
+
+ RenderPassGLImpl(IReferenceCounters* pRefCounters,
+ RenderDeviceGLImpl* pDevice,
+ const RenderPassDesc& Desc);
+ ~RenderPassGLImpl();
+};
+
+} // namespace Diligent
diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp
index f47163d8..bc38d364 100644
--- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp
@@ -46,6 +46,7 @@
#include "ShaderResourceBindingGLImpl.hpp"
#include "FenceGLImpl.hpp"
#include "QueryGLImpl.hpp"
+#include "RenderPassGLImpl.hpp"
#include "EngineMemory.h"
#include "StringTools.hpp"
@@ -75,7 +76,8 @@ RenderDeviceGLImpl::RenderDeviceGLImpl(IReferenceCounters* pRefCounters,
sizeof(PipelineStateGLImpl),
sizeof(ShaderResourceBindingGLImpl),
sizeof(FenceGLImpl),
- sizeof(QueryGLImpl)
+ sizeof(QueryGLImpl),
+ sizeof(RenderPassGLImpl)
}
},
// Device caps must be filled in before the constructor of Pipeline Cache is called!
@@ -517,15 +519,15 @@ void RenderDeviceGLImpl::CreateQuery(const QueryDesc& Desc, IQuery** ppQuery)
void RenderDeviceGLImpl::CreateRenderPass(const RenderPassDesc& Desc, IRenderPass** ppRenderPass)
{
- //CreateDeviceObject(
- // "RenderPass", Desc, ppRenderPass,
- // [&]() //
- // {
- // RenderPassGLImpl* pRenderPassOGL(NEW_RC_OBJ(m_RenderPassAllocator, "RenderPassGLImpl instance", RenderPassGLImpl)(this, Desc));
- // pRenderPassOGL->RenderPassInterface(IID_RenderPass, reinterpret_cast<IObject**>(ppRenderPass));
- // OnCreateDeviceObject(pRenderPassOGL);
- // } //
- //);
+ CreateDeviceObject(
+ "RenderPass", Desc, ppRenderPass,
+ [&]() //
+ {
+ RenderPassGLImpl* pRenderPassOGL(NEW_RC_OBJ(m_RenderPassAllocator, "RenderPassGLImpl instance", RenderPassGLImpl)(this, Desc));
+ pRenderPassOGL->QueryInterface(IID_RenderPass, reinterpret_cast<IObject**>(ppRenderPass));
+ OnCreateDeviceObject(pRenderPassOGL);
+ } //
+ );
}
bool RenderDeviceGLImpl::CheckExtension(const Char* ExtensionString)
diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderPassGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderPassGLImpl.cpp
new file mode 100644
index 00000000..2a9d0609
--- /dev/null
+++ b/Graphics/GraphicsEngineOpenGL/src/RenderPassGLImpl.cpp
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2019-2020 Diligent Graphics LLC
+ * Copyright 2015-2019 Egor Yusov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * In no event and under no legal theory, whether in tort (including negligence),
+ * contract, or otherwise, unless required by applicable law (such as deliberate
+ * and grossly negligent acts) or agreed to in writing, shall any Contributor be
+ * liable for any damages, including any direct, indirect, special, incidental,
+ * or consequential damages of any character arising as a result of this License or
+ * out of the use or inability to use the software (including but not limited to damages
+ * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
+ * all other commercial damages or losses), even if such Contributor has been advised
+ * of the possibility of such damages.
+ */
+
+#include "pch.h"
+
+#include "RenderPassGLImpl.hpp"
+#include "EngineMemory.h"
+
+namespace Diligent
+{
+
+RenderPassGLImpl::RenderPassGLImpl(IReferenceCounters* pRefCounters,
+ RenderDeviceGLImpl* pDevice,
+ const RenderPassDesc& Desc) :
+ TRenderPassBase{pRefCounters, pDevice, Desc}
+{
+}
+
+RenderPassGLImpl::~RenderPassGLImpl()
+{
+}
+
+} // namespace Diligent