aboutsummaryrefslogtreecommitdiff
path: root/src/API.cpp
diff options
context:
space:
mode:
authorlbavoil <[email protected]>2018-03-15 11:08:34 +0100
committerlbavoil <[email protected]>2018-03-15 11:08:34 +0100
commit636807e68a85a978473764d171ed0c7cc36f9be6 (patch)
tree784a3d4fa8f48b4c085dd959678505b2af12f425 /src/API.cpp
parentRemove test folder (diff)
downloadhbaoplus-636807e68a85a978473764d171ed0c7cc36f9be6.tar.xz
hbaoplus-636807e68a85a978473764d171ed0c7cc36f9be6.zip
HBAO+ 4.0.0.23740451
Diffstat (limited to 'src/API.cpp')
-rw-r--r--src/API.cpp113
1 files changed, 1 insertions, 112 deletions
diff --git a/src/API.cpp b/src/API.cpp
index a7163c1..12cc4ad 100644
--- a/src/API.cpp
+++ b/src/API.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+* Copyright (c) 2008-2018, NVIDIA CORPORATION. All rights reserved.
*
* NVIDIA CORPORATION and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
@@ -16,10 +16,6 @@
#include "Renderer_DX12.h"
#endif
-#if SUPPORT_GL
-#include "Renderer_GL.h"
-#endif
-
//--------------------------------------------------------------------------------
inline static
GFSDK_SSAO_CustomHeap InitNewDelete(const GFSDK_SSAO_CustomHeap* pCustomHeap)
@@ -85,113 +81,6 @@ GFSDK_SSAO_DECL(GFSDK_SSAO_Status, GFSDK_SSAO_CreateContext_D3D11,
#endif
-#if SUPPORT_GL
-
-//--------------------------------------------------------------------------------
-inline static
-bool CheckGLFunctionPointers(const GFSDK_SSAO_GLFunctions& GL)
-{
- return (
- GL.glActiveTexture &&
- GL.glAttachShader &&
- GL.glBindBuffer &&
- GL.glBindBufferBase &&
- GL.glBindFramebuffer &&
- GL.glBindFragDataLocation &&
- GL.glBindTexture &&
- GL.glBindVertexArray &&
- GL.glBlendColor &&
- GL.glBlendEquationSeparate &&
- GL.glBlendFuncSeparate &&
- GL.glBufferData &&
- GL.glBufferSubData &&
- GL.glColorMaski &&
- GL.glCompileShader &&
- GL.glCreateShader &&
- GL.glCreateProgram &&
- GL.glDeleteBuffers &&
- GL.glDeleteFramebuffers &&
- GL.glDeleteProgram &&
- GL.glDeleteShader &&
- GL.glDeleteTextures &&
- GL.glDeleteVertexArrays &&
- GL.glDisable &&
- GL.glDrawBuffers &&
- GL.glEnable &&
- GL.glDrawArrays &&
- GL.glFramebufferTexture &&
- GL.glFramebufferTexture2D &&
- GL.glFramebufferTextureLayer &&
- GL.glGenBuffers &&
- GL.glGenFramebuffers &&
- GL.glGenTextures &&
- GL.glGenVertexArrays &&
- GL.glGetError &&
- GL.glGetBooleani_v &&
- GL.glGetFloatv &&
- GL.glGetIntegerv &&
- GL.glGetIntegeri_v &&
- GL.glGetProgramiv &&
- GL.glGetProgramInfoLog &&
- GL.glGetShaderiv &&
- GL.glGetShaderInfoLog &&
- GL.glGetString &&
- GL.glGetUniformBlockIndex &&
- GL.glGetUniformLocation &&
- GL.glGetTexLevelParameteriv &&
- GL.glIsEnabled &&
- GL.glIsEnabledi &&
- GL.glLinkProgram &&
- GL.glPolygonOffset &&
- GL.glShaderSource &&
- GL.glTexImage2D &&
- GL.glTexImage3D &&
- GL.glTexParameteri &&
- GL.glUniform1i &&
- GL.glUniformBlockBinding &&
- GL.glUseProgram &&
- GL.glViewport);
-}
-
-//--------------------------------------------------------------------------------
-GFSDK_SSAO_DECL(GFSDK_SSAO_Status, GFSDK_SSAO_CreateContext_GL,
- GFSDK_SSAO_Context_GL** ppAOContext,
- const GFSDK_SSAO_GLFunctions* pGLFunctions,
- const GFSDK_SSAO_CustomHeap* pCustomHeap,
- GFSDK_SSAO_Version HeaderVersion)
-{
- if (!ppAOContext)
- {
- return GFSDK_SSAO_NULL_ARGUMENT;
- }
-
- if (!pGLFunctions)
- {
- return GFSDK_SSAO_NULL_ARGUMENT;
- }
-
- if (!CheckGLFunctionPointers(*pGLFunctions))
- {
- return GFSDK_SSAO_GL_NULL_FUNCTION_POINTER;
- }
-
- GFSDK_SSAO_CustomHeap NewDelete = InitNewDelete(pCustomHeap);
-
- void *pStorage = AllocateAndZeroMemory(NewDelete, sizeof(GFSDK::SSAO::GL::Renderer));
- if (!pStorage)
- {
- return GFSDK_SSAO_MEMORY_ALLOCATION_FAILED;
- }
-
- GFSDK::SSAO::GL::Renderer* pAOContext = new(pStorage) GFSDK::SSAO::GL::Renderer(*pGLFunctions, NewDelete);
-
- *ppAOContext = pAOContext;
-
- return pAOContext->Create(HeaderVersion);
-}
-
-#endif
-
#if SUPPORT_D3D12
//--------------------------------------------------------------------------------