LeviLamina
Loading...
Searching...
No Matches
ScreenRenderer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class ScreenContext;
8class Tessellator;
9class Vec2;
10struct IntRectangle;
11namespace mce { class Color; }
12namespace mce { class MaterialPtr; }
13namespace mce { class TexturePtr; }
14namespace mce { struct ClientTexture; }
15namespace mce { struct ServerTexture; }
16// clang-format on
17
18class ScreenRenderer {
19public:
20 // ScreenRenderer inner types declare
21 // clang-format off
22 class QuadBuffer;
23 // clang-format on
24
25 // ScreenRenderer inner types define
26 enum class ScreenMaterial : int {
27 Blit = 0,
28 Fill = 1,
29 FillGradient = 2,
30 ColorBlit = 3,
31 ColorBlitBlur = 4,
32 BlitCurrentShaderColor = 5,
33 StencilFill = 6,
34 ScreenMatCount = 7,
35 };
36
37 class QuadBuffer : public ::std::vector<::Vec2> {
38 public:
39 // member functions
40 // NOLINTBEGIN
41 MCNAPI ~QuadBuffer();
42 // NOLINTEND
43
44 public:
45 // destructor thunk
46 // NOLINTBEGIN
47 MCNAPI void $dtor();
48 // NOLINTEND
49 };
50
51public:
52 // member functions
53 // NOLINTBEGIN
54 MCAPI void blit(
55 ::ScreenContext& screenContext,
56 ::mce::TexturePtr const& tex,
57 ::IntRectangle const& rect,
58 ::mce::MaterialPtr const* optionalMat
59 );
60
61 MCAPI void blit(
62 ::ScreenContext& screenContext,
63 ::std::variant<::std::monostate, ::mce::TexturePtr, ::mce::ClientTexture, ::mce::ServerTexture> const& texture,
64 ::IntRectangle const& rect,
65 ::mce::MaterialPtr const* optionalMat
66 );
67
68 MCAPI void blit(
69 ::ScreenContext& screenContext,
70 ::std::variant<::std::monostate, ::mce::TexturePtr, ::mce::ClientTexture, ::mce::ServerTexture> const& texture,
71 int x,
72 int y,
73 int sx,
74 int sy,
75 int w,
76 int h,
77 int sw,
78 int sh,
79 ::mce::MaterialPtr const* optionalMat,
80 float us,
81 float vs
82 );
83
84 MCAPI void blit(
85 ::ScreenContext& screenContext,
86 ::mce::TexturePtr const& texture,
87 int x,
88 int y,
89 int sx,
90 int sy,
91 int w,
92 int h,
93 int sw,
94 int sh,
95 ::mce::MaterialPtr const* optionalMat,
96 float us,
97 float vs
98 );
99
100 MCAPI void blitQuadBuffer(
101 ::ScreenRenderer::QuadBuffer const& quadBuffer,
102 float quadW,
103 float quadH,
104 ::ScreenContext& screenContext,
105 ::mce::TexturePtr const& texture,
106 ::mce::MaterialPtr const* optionalMat
107 );
108
109 MCAPI void
110 drawRect(::ScreenContext& screenContext, int x0, int y0, int x1, int y1, ::mce::Color const& color, int thickness);
111
112 MCAPI void
113 fill(::ScreenContext& screenContext, float x0, float y0, float x1, float y1, ::mce::Color const& color) const;
114
115 MCAPI void fillGradient(
116 ::ScreenContext& screenContext,
117 float x0,
118 float y0,
119 float x1,
120 float y1,
121 ::mce::Color const& color1,
122 ::mce::Color const& color2
123 );
124
125 MCAPI void fillHorizontalGradient(
126 ::ScreenContext& screenContext,
127 float x0,
128 float y0,
129 float x1,
130 float y1,
131 ::mce::Color const& color1,
132 ::mce::Color const& color2
133 );
134
135 MCAPI void fillStencil(::ScreenContext& screenContext, float x0, float y0, float x1, float y1) const;
136
137 MCAPI bool tessellateQuadBuffer(
138 ::ScreenRenderer::QuadBuffer const& quadBuffer,
139 float quadW,
140 float quadH,
141 ::Tessellator& tessellator,
142 ::mce::TexturePtr const& texture
143 );
144 // NOLINTEND
145
146public:
147 // static functions
148 // NOLINTBEGIN
149 MCAPI static void loadMaterials();
150
151 MCAPI static ::ScreenRenderer& singleton();
152 // NOLINTEND
153
154public:
155 // static variables
156 // NOLINTBEGIN
157 MCAPI static ::std::add_lvalue_reference_t<::mce::MaterialPtr[]> mScreenMaterials();
158
159 MCAPI static ::std::unique_ptr<::ScreenRenderer>& singletonPtr();
160 // NOLINTEND
161};
Definition ScreenContext.h:5
Definition ScreenRenderer.h:37
Definition ScreenRenderer.h:5
Definition Tessellator.h:5
Definition IntRectangle.h:5