Skip to content

Commit c4a8179

Browse files
Updated NuklearDemo (close #235)
1 parent ce5130f commit c4a8179

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ This sample demonstrates the integration of the engine with [dear imgui](https:/
406406

407407
![](Samples/NuklearDemo/Screenshot.png)
408408

409-
This sample demonstrates the integration of the engine with [nuklear](https://github.com/vurtun/nuklear) UI library.
409+
This sample demonstrates the integration of the engine with [nuklear](https://github.com/Immediate-Mode-UI/Nuklear) UI library.
410410

411411

412412
## [Hello AR](Android/HelloAR)
@@ -477,7 +477,7 @@ See [Apache 2.0 license](License.txt).
477477

478478
This project has some third-party dependencies, each of which may have independent licensing:
479479

480-
* [nuklear](https://github.com/vurtun/nuklear): A single-header ANSI C gui library ([MIT or Public domain license](https://github.com/DiligentGraphics/nuklear/blob/master/Readme.md)).
480+
* [nuklear](https://github.com/Immediate-Mode-UI/Nuklear): A single-header ANSI C gui library ([MIT or Public domain license](https://github.com/Immediate-Mode-UI/Nuklear/blob/master/LICENSE)).
481481
* [glfw](https://github.com/glfw/glfw): A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input ([zlib License](https://github.com/DiligentGraphics/glfw/blob/master/LICENSE.md)).
482482
* [ImGuizmo](https://github.com/CedricGuillemet/ImGuizmo): Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui ([MIT](https://github.com/CedricGuillemet/ImGuizmo/blob/master/LICENSE)).
483483

Samples/NuklearDemo/src/NkDiligent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -353,7 +353,7 @@ nk_diligent_render(struct nk_diligent_context* nk_dlg_ctx,
353353
config.circle_segment_count = 22;
354354
config.curve_segment_count = 22;
355355
config.arc_segment_count = 22;
356-
config.null = nk_dlg_ctx->null;
356+
config.tex_null = nk_dlg_ctx->null;
357357

358358
// setup buffers to load vertices and elements
359359
struct nk_buffer vbuf, ibuf;

Samples/NuklearDemo/src/NkInputWin32.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,7 +27,7 @@
2727

2828
#define NK_INCLUDE_FIXED_TYPES
2929
#define NK_INCLUDE_STANDARD_VARARGS
30-
#include "../../../ThirdParty/nuklear/nuklear.h"
30+
#include "../../../ThirdParty/Nuklear/nuklear.h"
3131

3232
#include "WinHPreface.h"
3333
#include <Windows.h>

Samples/NuklearDemo/src/NuklearDemo.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@
3131

3232
#define NK_INCLUDE_FIXED_TYPES
3333
#define NK_INCLUDE_STANDARD_VARARGS
34-
#include "../../../ThirdParty/nuklear/nuklear.h"
34+
#include "../../../ThirdParty/Nuklear/nuklear.h"
3535

3636
#include "NkDiligent.h"
3737

38-
#include "../../../ThirdParty/nuklear/demo/style.c"
39-
#include "../../../ThirdParty/nuklear/demo/overview.c"
38+
#include "../../../ThirdParty/Nuklear/demo/common/style.c"
4039

40+
static const struct nk_color nk_white = {255, 255, 255, 255};
41+
#include "../../../ThirdParty/Nuklear/demo/common/overview.c"
4142

4243
namespace Diligent
4344
{

Samples/NuklearDemo/src/NuklearDemoWin32.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -29,7 +29,7 @@
2929

3030
#define NK_INCLUDE_FIXED_TYPES
3131
#define NK_INCLUDE_STANDARD_VARARGS
32-
#include "../../../ThirdParty/nuklear/nuklear.h"
32+
#include "../../../ThirdParty/Nuklear/nuklear.h"
3333

3434
#include "WinHPreface.h"
3535
#include <Windows.h>

ThirdParty/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required (VERSION 3.10)
33
file(RELATIVE_PATH SAMPLES_DIR "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/..")
44

55
if (NOT DILIGENT_NUKLEAR_DIR)
6-
set(DILIGENT_NUKLEAR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/nuklear" CACHE PATH "nuklear source directory")
6+
set(DILIGENT_NUKLEAR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Nuklear" CACHE PATH "nuklear source directory")
77
endif()
88
if (NOT EXISTS "${DILIGENT_NUKLEAR_DIR}/nuklear.h")
99
message(FATAL_ERROR "${DILIGENT_NUKLEAR_DIR}/nuklear.h does not exist. This indicates that nuklear submodule is not checked out or DILIGENT_NUKLEAR_DIR variable contains invalid path.")

ThirdParty/Nuklear

0 commit comments

Comments
 (0)