ImageViewerUi.h 769 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Ui.h>
  7. namespace anki {
  8. class ImageViewerUi
  9. {
  10. public:
  11. ImageResourcePtr m_image;
  12. Bool m_open = false;
  13. ImageViewerUi();
  14. void drawWindow(UiCanvas& canvas, Vec2 initialPos, Vec2 initialSize, ImGuiWindowFlags windowFlags = 0);
  15. private:
  16. ShaderProgramResourcePtr m_imageProgram;
  17. Array<ShaderProgramPtr, 2> m_imageGrPrograms;
  18. U32 m_crntMip = 0;
  19. F32 m_zoom = 1.0f;
  20. F32 m_depth = 0.0f;
  21. Bool m_pointSampling = true;
  22. Array<Bool, 4> m_colorChannel = {true, true, true, true};
  23. F32 m_maxColorValue = 1.0f;
  24. U32 m_imageUuid = 0;
  25. };
  26. } // end namespace anki