19 #if !defined(__NORI_GUI_H)
22 #include <nori/common.h>
23 #include <nanogui/screen.h>
24 #include <nanogui/renderpass.h>
25 #include <nanogui/shader.h>
26 #include <nanogui/canvas.h>
27 #include <nori/render.h>
34 void draw_contents()
override;
36 void set_scale(
float scale) {
41 nanogui::ref<nanogui::Shader> m_shader;
42 nanogui::ref<nanogui::Texture> m_texture;
43 nanogui::ref<nanogui::RenderPass> m_renderPass;
50 void draw_contents()
override;
52 virtual bool keyboard_event(
int key,
int scancode,
int action,
int modifiers)
override;
53 virtual bool drop_event(
const std::vector<std::string>& filenames)
override;
57 void requestLayoutUpdate() {
58 m_requiresLayoutUpdate =
true;
61 void adjustWindow(
Vector2i blockSize);
63 void openXML(
const std::string& filename);
64 void openEXR(
const std::string& filename);
68 nanogui::ref<NoriCanvas> m_render_canvas;
69 nanogui::ref<nanogui::Shader> m_shader;
70 nanogui::ref<nanogui::RenderPass> m_renderPass;
71 nanogui::Slider* m_slider =
nullptr;
72 nanogui::ProgressBar* m_progressBar =
nullptr;
73 nanogui::ref<nanogui::Texture> m_texture;
74 bool m_requiresLayoutUpdate =
false;
76 Widget* panel =
nullptr;
Weighted pixel storage for a rectangular subregion of an image.