Euphoria
viewporthandler.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 
5 #include "base/rect.h"
6 #include "core/viewport.h"
7 
8 
9 namespace eu::render
10 {
11  struct ShaderProgram;
12  struct Init;
13 
14  enum class ViewportType
15  {
17  };
18 
20  {
22  std::vector<ShaderProgram*> shaders;
23 
25  int window_width = 0;
26  int window_height = 0;
27 
28  // only used if type != pixel
29  float virtual_width = 800.0f;
30  float virtual_height = 600.0f;
31 
33 
35 
36  void
37  add(ShaderProgram* shader);
38 
39  void
40  set_size(int width, int height);
41 
42  void
43  clear_black();
44 
45  [[nodiscard]] core::Viewport
46  get_full_viewport() const;
47  };
48 }
Definition: rect.h:27
void set_size(int width, int height)
ViewportHandler(render::Init *i, Rectf *s)
std::vector< ShaderProgram * > shaders
core::Viewport get_full_viewport() const
void add(ShaderProgram *shader)