| 16 | class RenderWindow; |
| 17 | |
| 18 | class DisplayViewSystem |
| 19 | { |
| 20 | public: |
| 21 | // Default texture unit for displaying most of things |
| 22 | static constexpr int DISPLAY_TEXTURE_UNIT_1 = 1; |
| 23 | // Second display texture used when we want to blend between two displays |
| 24 | static constexpr int DISPLAY_TEXTURE_UNIT_2 = 2; |
| 25 | // Texture unit reserved for the compute shader screenshoter |
| 26 | static constexpr int DISPLAY_COMPUTE_IMAGE_UNIT = 3; |
| 27 | |
| 28 | DisplayViewSystem(std::shared_ptr<GPURenderer> renderer, RenderWindow* render_window); |
| 29 | ~DisplayViewSystem(); |
| 30 | |
| 31 | void configure_framebuffer(); |
| 32 | void resize_framebuffer(); |
| 33 | |
| 34 | DisplayViewType get_current_display_view_type(); |
| 35 | const DisplayView* get_current_display_view() const; |
| 36 | std::shared_ptr<OpenGLProgram> get_active_display_program(); |
| 37 | DisplaySettings& get_display_settings(); |
| 38 | |
| 39 | /** |
| 40 | * Applies queued changes (such as changing the display view for example) |
| 41 | * |
| 42 | * Returns true if the display view was changed. False otherwise |
| 43 | */ |
| 44 | bool update_selected_display_view(); |
| 45 | |
| 46 | /** |
| 47 | * Returns true if the current display view needs the adaptive sampling buffers for |
| 48 | * displaying |
| 49 | */ |
| 50 | bool current_display_view_needs_adaptive_sampling_buffers(); |
| 51 | |
| 52 | /** |
| 53 | * Displays the currently active texture view onto the viewport |
| 54 | */ |
| 55 | void display(); |
| 56 | |
| 57 | /** |
| 58 | * Queues a change of display view that will take effect upon calling update() |
| 59 | */ |
| 60 | void queue_display_view_change(DisplayViewType display_view); |
| 61 | |
| 62 | bool get_render_low_resolution() const; |
| 63 | /** |
| 64 | * Sets whether or not thje next display() call will display the given texture |
| 65 | * as a low render resolution texture or not |
| 66 | */ |
| 67 | void set_render_low_resolution(bool low_resolution_or_not); |
| 68 | |
| 69 | void resize(int new_render_width, int new_render_height); |
| 70 | |
| 71 | /** |
| 72 | * Updates the uniforms of an arbitrary input program given the state of the renderer and the applications settings given |
| 73 | */ |
| 74 | static void update_display_program_uniforms(const DisplayViewSystem* display_view_system, std::shared_ptr<OpenGLProgram> program, std::shared_ptr<GPURenderer> renderer, std::shared_ptr<ApplicationSettings> application_settings); |
| 75 |
nothing calls this directly
no outgoing calls
no test coverage detected