Skip to content

Commit 0cbb83e

Browse files
Merge pull request #197 from Devsh-Graphics-Programming/mesh_loaders
Mesh loaders
2 parents 643b8d8 + 8f6c7bc commit 0cbb83e

File tree

103 files changed

+4505
-5304
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4505
-5304
lines changed

01_HelloCoreSystemAsset/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +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-
// always include nabla first before std:: headers
6-
#include "nabla.h"
5+
// <nabla.h> public interface and common examples API, always include first before std:: headers
6+
#include "nbl/examples/examples.hpp"
77

88
#include "nbl/system/IApplicationFramework.h"
99

03_DeviceSelectionAndSharedSources/Testers.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#ifndef _NBL_TESTERS_H_INCLUDED_
55
#define _NBL_TESTERS_H_INCLUDED_
66

7-
#include "nbl/application_templates/MonoDeviceApplication.hpp"
8-
#include "nbl/application_templates/MonoAssetManagerAndBuiltinResourceApplication.hpp"
7+
#include "nbl/examples/examples.hpp"
98

109
using namespace nbl;
1110

03_DeviceSelectionAndSharedSources/main.cpp

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

5-
#include "nbl/application_templates/MonoDeviceApplication.hpp"
6-
#include "nbl/application_templates/MonoAssetManagerAndBuiltinResourceApplication.hpp"
5+
6+
#include "nbl/examples/examples.hpp"
7+
// TODO: why isn't this in `nabla.h` ?
78
#include "nbl/asset/metadata/CHLSLMetadata.h"
8-
#include "CommonPCH/PCH.hpp"
9+
910

1011
using namespace nbl;
11-
using namespace core;
12-
using namespace system;
13-
using namespace asset;
14-
using namespace video;
12+
using namespace nbl::core;
13+
using namespace nbl::hlsl;
14+
using namespace nbl::system;
15+
using namespace nbl::asset;
16+
using namespace nbl::ui;
17+
using namespace nbl::video;
18+
using namespace nbl::examples;
1519

1620
// TODO[Przemek]: update comments
1721

@@ -22,10 +26,10 @@ using namespace video;
2226
constexpr bool ENABLE_TESTS = false;
2327

2428
// This time we create the device in the base class and also use a base class to give us an Asset Manager and an already mounted built-in resource archive
25-
class DeviceSelectionAndSharedSourcesApp final : public application_templates::MonoDeviceApplication, public application_templates::MonoAssetManagerAndBuiltinResourceApplication
29+
class DeviceSelectionAndSharedSourcesApp final : public application_templates::MonoDeviceApplication, public BuiltinResourcesApplication
2630
{
2731
using device_base_t = application_templates::MonoDeviceApplication;
28-
using asset_base_t = application_templates::MonoAssetManagerAndBuiltinResourceApplication;
32+
using asset_base_t = BuiltinResourcesApplication;
2933
public:
3034
// Yay thanks to multiple inheritance we cannot forward ctors anymore
3135
DeviceSelectionAndSharedSourcesApp(const path& _localInputCWD, const path& _localOutputCWD, const path& _sharedInputCWD, const path& _sharedOutputCWD) :

05_StreamingAndBufferDeviceAddressApp/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
// I've moved out a tiny part of this example into a shared header for reuse, please open and read it.
77
#include "nbl/application_templates/MonoDeviceApplication.hpp"
8-
#include "nbl/application_templates/MonoAssetManagerAndBuiltinResourceApplication.hpp"
8+
#include "nbl/examples/common/BuiltinResourcesApplication.hpp"
99

1010

1111
using namespace nbl;
@@ -20,10 +20,10 @@ using namespace video;
2020

2121

2222
// In this application we'll cover buffer streaming, Buffer Device Address (BDA) and push constants
23-
class StreamingAndBufferDeviceAddressApp final : public application_templates::MonoDeviceApplication, public application_templates::MonoAssetManagerAndBuiltinResourceApplication
23+
class StreamingAndBufferDeviceAddressApp final : public application_templates::MonoDeviceApplication, public examples::BuiltinResourcesApplication
2424
{
2525
using device_base_t = application_templates::MonoDeviceApplication;
26-
using asset_base_t = application_templates::MonoAssetManagerAndBuiltinResourceApplication;
26+
using asset_base_t = examples::BuiltinResourcesApplication;
2727

2828
// This is the first example that submits multiple workloads in-flight.
2929
// What the shader does is it computes the minimum distance of each point against K other random input points.

06_HelloGraphicsQueue/main.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
// For conditions of distribution and use, see copyright notice in nabla.h
44

55

6-
// I've moved out a tiny part of this example into a shared header for reuse, please open and read it.
7-
#include "nbl/application_templates/MonoDeviceApplication.hpp"
8-
#include "nbl/application_templates/MonoAssetManagerAndBuiltinResourceApplication.hpp"
6+
#include "nbl/examples/examples.hpp"
97

108
#include "nbl/ext/ScreenShot/ScreenShot.h"
119

1210

1311
using namespace nbl;
14-
using namespace core;
15-
using namespace system;
16-
using namespace asset;
17-
using namespace video;
12+
using namespace nbl::core;
13+
using namespace nbl::hlsl;
14+
using namespace nbl::system;
15+
using namespace nbl::asset;
16+
using namespace nbl::ui;
17+
using namespace nbl::video;
18+
using namespace nbl::examples;
19+
1820

1921
// Here we showcase the use of Graphics Queue only
2022
// Steps we take in this example:
@@ -26,10 +28,10 @@ using namespace video;
2628
// - save the smallImg to disk
2729
//
2830
// all without using IUtilities.
29-
class HelloGraphicsQueueApp final : public application_templates::MonoDeviceApplication, public application_templates::MonoAssetManagerAndBuiltinResourceApplication
31+
class HelloGraphicsQueueApp final : public application_templates::MonoDeviceApplication, public BuiltinResourcesApplication
3032
{
3133
using device_base_t = application_templates::MonoDeviceApplication;
32-
using asset_base_t = application_templates::MonoAssetManagerAndBuiltinResourceApplication;
34+
using asset_base_t = BuiltinResourcesApplication;
3335

3436
public:
3537
// Yay thanks to multiple inheritance we cannot forward ctors anymore.

06_MeshLoaders/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)