Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/nanogui/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ class Color;
namespace sample
{
using WindowHandle = void*;
WindowHandle NANOGUI_EXPORT create_window(int& w, int& h, const std::string& caption, bool resizable, bool fullscreen, bool header);
WindowHandle NANOGUI_EXPORT create_window(int& w, int& h, const std::string& caption, bool resizable, bool fullscreen, bool header = false);
Vector2i NANOGUI_EXPORT get_window_pos(WindowHandle w);
Vector2i NANOGUI_EXPORT get_cursor_pos();
void NANOGUI_EXPORT set_window_topmost(WindowHandle w, bool top, bool always);
Expand Down
1 change: 1 addition & 0 deletions include/nanogui/layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <nanogui/object.h>
#include <cstdio>
#include <unordered_map>
#include <stdexcept>

NAMESPACE_BEGIN(nanogui)

Expand Down
2 changes: 1 addition & 1 deletion include/nanogui/nanovg_vk.h
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ static VKNVGPipeline *vknvg_createPipeline(VKNVGcontext *vk, VKNVGCreatePipeline
VkPipelineViewportStateCreateInfo vp = {VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO};
vp.viewportCount = 1;
vp.scissorCount = 1;

#define VK_DYNAMIC_STATE_RANGE_SIZE 2
VkDynamicState dynamicStateEnables[VK_DYNAMIC_STATE_RANGE_SIZE] = {
VK_DYNAMIC_STATE_VIEWPORT,
VK_DYNAMIC_STATE_SCISSOR};
Expand Down
4 changes: 3 additions & 1 deletion python/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ PYBIND11_MODULE(nanogui, m) {
handle->refresh = refresh;

handle->thread = std::thread([]{
auto window = nanogui::sample::create_window(1600, 900, "NanoGUI Python", true, false);
int w = 1600;
int h = 900;
auto window = nanogui::sample::create_window(w, h, "NanoGUI Python", true, false);
nanogui::sample::create_context();

Screen screen({ 1600, 900 }, "NanoGUI Python", false);
Expand Down
1 change: 1 addition & 0 deletions src/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <nanogui/theme.h>
#include <nanovg.h>
#include <nanogui/entypo.h>
#include <stdexcept>

NAMESPACE_BEGIN(nanogui)

Expand Down
4 changes: 4 additions & 0 deletions src/vulkan/vulkan_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ static VkInstance createVkInstance(bool enable_debug_layer) {
};
inst_info.enabledLayerCount = sizeof(instance_validation_layers) / sizeof(instance_validation_layers[0]);
inst_info.ppEnabledLayerNames = instance_validation_layers;

// validation layer with recent SDK not working
inst_info.enabledLayerCount = 0;
inst_info.ppEnabledLayerNames = nullptr;
}
VkInstance inst;
VkResult res;
Expand Down