Skip to content

Commit f15b671

Browse files
committed
make Nabla compile again, ifdef a lot of OpenGL old backend, correct template StringLiteral field reference in ISystem.h, correct some lambda crap, correct CMake code. TODO: a lot of OpenGL backend files to remove from our codebase
1 parent 03e58a1 commit f15b671

29 files changed

+140
-55
lines changed

include/nbl/system/DynamicLibraryFunctionPointer.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// This file is part of the "Nabla Engine".
33
// For conditions of distribution and use, see copyright notice in nabla.h
44

5+
#if 0 // kill it
6+
57
#ifndef __NBL_SYSTEM_DYNAMIC_LIBRARY_FUNCTION_POINTER_H_INCLUDED__
68
#define __NBL_SYSTEM_DYNAMIC_LIBRARY_FUNCTION_POINTER_H_INCLUDED__
79

@@ -89,4 +91,6 @@ class NBL_API DynamicLibraryFunctionPointer
8991

9092
#define NBL_SYSTEM_DECLARE_DYNLIB_FUNCPTR(FUNC_NAME) nbl::system::DynamicLibraryFunctionPointer<decltype(FUNC_NAME),NBL_CORE_UNIQUE_STRING_LITERAL_TYPE(#FUNC_NAME)> p ## FUNC_NAME;
9193

92-
#endif
94+
#endif
95+
96+
#endif

include/nbl/system/ISystem.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,15 @@ class NBL_API2 ISystem : public core::IReferenceCounted
112112
};
113113

114114
//! Compile time resource ID
115-
template<typename StringLiteralPath>
115+
template<nbl::core::StringLiteral Path>
116116
inline core::smart_refctd_ptr<const IFile> loadBuiltinData() const
117117
{
118118
#ifdef _NBL_EMBED_BUILTIN_RESOURCES_
119-
return impl_loadEmbeddedBuiltinData(StringLiteralPath::value,nbl::builtin::get_resource<StringLiteralPath>());
119+
120+
return impl_loadEmbeddedBuiltinData(Path.value, nbl::builtin::get_resource<Path>());
120121
#else
121122
future_t<core::smart_refctd_ptr<IFile>> future;
122-
createFile(future, StringLiteralPath::value,core::bitflag(IFileBase::ECF_READ)|IFileBase::ECF_MAPPABLE);
123+
createFile(future, STRING_LITERAL::value,core::bitflag(IFileBase::ECF_READ)|IFileBase::ECF_MAPPABLE);
123124
return future.get();
124125
#endif
125126
}

include/nbl/video/CEGL.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if 0 // KILL IT
2+
13
#ifndef _NBL_C_EGL_H_INCLUDED_
24
#define _NBL_C_EGL_H_INCLUDED_
35

@@ -59,3 +61,4 @@ class NBL_API CEGL
5961
}
6062

6163
#endif
64+
#endif

include/nbl/video/CEGLCaller.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if 0 // kill it
2+
13
#ifndef _NBL_C_EGL_CALLER_H_INCLUDED_
24
#define _NBL_C_EGL_CALLER_H_INCLUDED_
35

@@ -98,4 +100,6 @@ NBL_SYSTEM_DECLARE_DYNAMIC_FUNCTION_CALLER_CLASS(CEGLCaller,CEGLLoader,NBL_EGL_F
98100
#undef NBL_EGL_FUNC_LIST
99101
}
100102

103+
#endif
104+
101105
#endif

include/nbl/video/COpenGLImage.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// This file is part of the "Nabla Engine".
33
// For conditions of distribution and use, see copyright notice in nabla.h
44

5+
#if 0
6+
57
#ifndef __NBL_VIDEO_C_OPEN_GL_IMAGE_H_INCLUDED__
68
#define __NBL_VIDEO_C_OPEN_GL_IMAGE_H_INCLUDED__
79

@@ -79,3 +81,4 @@ class COpenGLImage final : public IGPUImage, public IOpenGLMemoryAllocation
7981

8082
#endif
8183

84+
#endif

include/nbl/video/COpenGLSync.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#ifndef _NBL_C_OPENGL_SYNC_H_INCLUDED_
1+
#if 0 // kill it
2+
3+
#ifndef _NBL_C_OPENGL_SYNC_H_INCLUDED_
24
#define _NBL_C_OPENGL_SYNC_H_INCLUDED_
35

46
#include "nbl/core/IReferenceCounted.h"
@@ -70,4 +72,6 @@ class NBL_API COpenGLSync final : public core::IReferenceCounted
7072

7173
}
7274

75+
#endif
76+
7377
#endif

include/nbl/video/declarations.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
#include "nbl/video/alloc/StreamingTransientDataBuffer.h"
2121

2222
// platform and API specific stuff
23-
#include "nbl/video/COpenGL_Connection.h"
23+
//#include "nbl/video/COpenGL_Connection.h"
2424
#include "nbl/video/CVulkanConnection.h"
25-
#include "nbl/video/COpenGL_Swapchain.h"
25+
//#include "nbl/video/COpenGL_Swapchain.h"
2626
#include "nbl/video/CVulkanSwapchain.h"
27-
#include "nbl/video/COpenGLImage.h"
27+
//#include "nbl/video/COpenGLImage.h"
2828
#include "nbl/video/CVulkanImage.h"
2929
#include "nbl/video/surface/CSurfaceGL.h"
3030
#include "nbl/video/surface/CSurfaceVulkan.h"

include/nbl/video/surface/CSurfaceGL.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if 0 // kill it
2+
13
#ifndef __NBL_I_SURFACE_GL_H_INCLUDED__
24
#define __NBL_I_SURFACE_GL_H_INCLUDED__
35

@@ -124,4 +126,6 @@ using CSurfaceGLAndroid = CSurfaceGL<ui::IWindowAndroid>;
124126

125127
}
126128

127-
#endif
129+
#endif
130+
131+
#endif

src/nbl/CMakeLists.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ option(_NBL_COMPILE_WITH_PNG_LOADER_ "Compile with PNG Loader" ON)
116116
option(_NBL_COMPILE_WITH_PNG_WRITER_ "Compile with PNG Writer" ON)
117117
option(_NBL_COMPILE_WITH_TGA_LOADER_ "Compile with TGA Loader" ON)
118118
option(_NBL_COMPILE_WITH_TGA_WRITER_ "Compile with TGA Writer" ON)
119-
option(_NBL_COMPILE_WITH_OPENEXR_LOADER_ "Compile with OpenEXR Loader" ON)
120-
option(_NBL_COMPILE_WITH_OPENEXR_WRITER_ "Compile with OpenEXR Writer" ON)
119+
option(_NBL_COMPILE_WITH_OPENEXR_LOADER_ "Compile with OpenEXR Loader" OFF) # TMP OFF COMPILE ERRORS ON V143 ON MASTER
120+
option(_NBL_COMPILE_WITH_OPENEXR_WRITER_ "Compile with OpenEXR Writer" OFF) # TMP OFF COMPILE ERRORS ON V143 ON MASTER
121121
option(_NBL_COMPILE_WITH_GLI_LOADER_ "Compile with GLI Loader" ON)
122122
option(_NBL_COMPILE_WITH_GLI_WRITER_ "Compile with GLI Writer" ON)
123-
option(_NBL_COMPILE_WITH_GLTF_LOADER_ "Compile with GLTF Loader" ON)
124-
option(_NBL_COMPILE_WITH_GLTF_WRITER_ "Compile with GLTF Writer" ON)
123+
option(_NBL_COMPILE_WITH_GLTF_LOADER_ "Compile with GLTF Loader" OFF) # TMP OFF COMPILE ERRORS ON V143 ON MASTER
124+
option(_NBL_COMPILE_WITH_GLTF_WRITER_ "Compile with GLTF Writer" OFF) # TMP OFF COMPILE ERRORS ON V143 ON MASTER
125125
set(_NBL_EG_PRFNT_LEVEL 0 CACHE STRING "EasterEgg Profanity Level")
126126

127127
if(NBL_BUILD_ANDROID)
@@ -316,26 +316,26 @@ set(NBL_VIDEO_SOURCES
316316
${NBL_ROOT_PATH}/src/nbl/video/IDeviceMemoryAllocation.cpp
317317
${NBL_ROOT_PATH}/src/nbl/video/IDeviceMemoryBacked.cpp
318318

319-
# OpenGL
320-
${NBL_ROOT_PATH}/src/nbl/video/IOpenGL_FunctionTable.cpp
321-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLPipelineCache.cpp
322-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLImage.cpp
323-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLImageView.cpp
324-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLBuffer.cpp
325-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLBufferView.cpp
326-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLSpecializedShader.cpp
327-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLSampler.cpp
328-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLCommandBuffer.cpp
329-
${NBL_ROOT_PATH}/src/nbl/video/SOpenGLContextLocalCache.cpp
330-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLSync.cpp
331-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLShader.cpp
332-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLRenderpassIndependentPipeline.cpp
333-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLFramebuffer.cpp
334-
${NBL_ROOT_PATH}/src/nbl/video/COpenGL_Connection.cpp
335-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLComputePipeline.cpp
336-
${NBL_ROOT_PATH}/src/nbl/video/COpenGLQueryPool.cpp
337-
${NBL_ROOT_PATH}/src/nbl/video/COpenGL_Swapchain.cpp
338-
${NBL_ROOT_PATH}/src/nbl/video/debug/COpenGLDebugCallback.cpp
319+
# OpenGL KILL IT
320+
#${NBL_ROOT_PATH}/src/nbl/video/IOpenGL_FunctionTable.cpp
321+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLPipelineCache.cpp
322+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLImage.cpp
323+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLImageView.cpp
324+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLBuffer.cpp
325+
##${NBL_ROOT_PATH}/src/nbl/video/COpenGLBufferView.cpp
326+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLSpecializedShader.cpp
327+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLSampler.cpp
328+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLCommandBuffer.cpp
329+
#${NBL_ROOT_PATH}/src/nbl/video/SOpenGLContextLocalCache.cpp
330+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLSync.cpp
331+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLShader.cpp
332+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLRenderpassIndependentPipeline.cpp
333+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLFramebuffer.cpp
334+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGL_Connection.cpp
335+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLComputePipeline.cpp
336+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGLQueryPool.cpp
337+
#${NBL_ROOT_PATH}/src/nbl/video/COpenGL_Swapchain.cpp
338+
#${NBL_ROOT_PATH}/src/nbl/video/debug/COpenGLDebugCallback.cpp
339339

340340
# Vulkan
341341
${NBL_ROOT_PATH}/src/nbl/video/CVulkanSwapchain.cpp

src/nbl/asset/IAssetManager.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,38 +234,38 @@ void IAssetManager::insertBuiltinAssets()
234234
};
235235
auto fileSystem = getSystem();
236236

237-
buildInGLSLShader(fileSystem->loadBuiltinData<NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/specialized_shader/fullscreentriangle.vert")>(),
237+
buildInGLSLShader(fileSystem->loadBuiltinData<typename NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/specialized_shader/fullscreentriangle.vert")>(),
238238
asset::IShader::ESS_VERTEX,
239239
{
240240
"nbl/builtin/specialized_shader/fullscreentriangle.vert"
241241
});
242-
buildInGLSLShader(fileSystem->loadBuiltinData<NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/lambertian/singletexture/specialized_shader.vert")>(),
242+
buildInGLSLShader(fileSystem->loadBuiltinData<typename NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/lambertian/singletexture/specialized_shader.vert")>(),
243243
asset::IShader::ESS_VERTEX,
244244
{
245245
"nbl/builtin/material/lambertian/singletexture/specialized_shader.vert",
246246
"nbl/builtin/material/debug/vertex_uv/specialized_shader.vert"
247247
});
248-
buildInGLSLShader(fileSystem->loadBuiltinData<NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/lambertian/singletexture/specialized_shader.frag")>(), // it somehow adds an extra "tt" raw string to the end of the returned value, beware
248+
buildInGLSLShader(fileSystem->loadBuiltinData<typename NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/lambertian/singletexture/specialized_shader.frag")>(), // it somehow adds an extra "tt" raw string to the end of the returned value, beware
249249
asset::IShader::ESS_FRAGMENT,
250250
{
251251
"nbl/builtin/material/lambertian/singletexture/specialized_shader.frag"
252252
});
253253

254-
buildInGLSLShader(fileSystem->loadBuiltinData<NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/debug/vertex_normal/specialized_shader.vert")>(),
254+
buildInGLSLShader(fileSystem->loadBuiltinData<typename NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/debug/vertex_normal/specialized_shader.vert")>(),
255255
asset::IShader::ESS_VERTEX,
256256
{
257257
"nbl/builtin/material/debug/vertex_normal/specialized_shader.vert"});
258-
buildInGLSLShader(fileSystem->loadBuiltinData<NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/debug/vertex_color/specialized_shader.vert")>(),
258+
buildInGLSLShader(fileSystem->loadBuiltinData<typename NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/debug/vertex_color/specialized_shader.vert")>(),
259259
asset::IShader::ESS_VERTEX,
260260
{
261261
"nbl/builtin/material/debug/vertex_color/specialized_shader.vert"
262262
});
263-
buildInGLSLShader(fileSystem->loadBuiltinData<NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/debug/vertex_uv/specialized_shader.frag")>(),
263+
buildInGLSLShader(fileSystem->loadBuiltinData<typename NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/debug/vertex_uv/specialized_shader.frag")>(),
264264
asset::IShader::ESS_FRAGMENT,
265265
{
266266
"nbl/builtin/material/debug/vertex_uv/specialized_shader.frag"
267267
});
268-
buildInGLSLShader(fileSystem->loadBuiltinData<NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/debug/vertex_normal/specialized_shader.frag")>(),
268+
buildInGLSLShader(fileSystem->loadBuiltinData<typename NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("nbl/builtin/material/debug/vertex_normal/specialized_shader.frag")>(),
269269
asset::IShader::ESS_FRAGMENT,
270270
{
271271
"nbl/builtin/material/debug/vertex_normal/specialized_shader.frag",

0 commit comments

Comments
 (0)