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 // prevent constructor by default
40 QuadBuffer();
41
42 public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI explicit QuadBuffer(uint64 estimatedQuadCount);
46
47 MCAPI ~QuadBuffer();
48 // NOLINTEND
49
50 public:
51 // constructor thunks
52 // NOLINTBEGIN
53 MCAPI void* $ctor(uint64 estimatedQuadCount);
54 // NOLINTEND
55
56 public:
57 // destructor thunk
58 // NOLINTBEGIN
59 MCFOLD void $dtor();
60 // NOLINTEND
61 };
62
63public:
64 // member functions
65 // NOLINTBEGIN
66 MCAPI void blit(
67 ::ScreenContext& screenContext,
68 ::mce::TexturePtr const& tex,
69 ::IntRectangle const& rect,
70 ::mce::MaterialPtr const* optionalMat
71 );
72
73 MCAPI void blit(
74 ::ScreenContext& screenContext,
75 ::std::variant<::std::monostate, ::mce::TexturePtr, ::mce::ClientTexture, ::mce::ServerTexture> const& texture,
76 int x,
77 int y,
78 int sx,
79 int sy,
80 int w,
81 int h,
82 int sw,
83 int sh,
84 ::mce::MaterialPtr const* optionalMat,
85 float us,
86 float vs
87 );
88
89 MCAPI void blit(
90 ::ScreenContext& screenContext,
91 ::mce::TexturePtr const& texture,
92 int x,
93 int y,
94 int sx,
95 int sy,
96 int w,
97 int h,
98 int sw,
99 int sh,
100 ::mce::MaterialPtr const* optionalMat,
101 float us,
102 float vs
103 );
104
105 MCAPI void blitQuadBuffer(
106 ::ScreenRenderer::QuadBuffer const& quadBuffer,
107 float quadW,
108 float quadH,
109 ::ScreenContext& screenContext,
110 ::mce::TexturePtr const& texture,
111 ::mce::MaterialPtr const* optionalMat
112 );
113
114 MCAPI void
115 fill(::ScreenContext& screenContext, float x0, float y0, float x1, float y1, ::mce::Color const& color) const;
116
117 MCAPI void fillGradient(
118 ::ScreenContext& screenContext,
119 float x0,
120 float y0,
121 float x1,
122 float y1,
123 ::mce::Color const& color1,
124 ::mce::Color const& color2
125 );
126
127 MCAPI void fillHorizontalGradient(
128 ::ScreenContext& screenContext,
129 float x0,
130 float y0,
131 float x1,
132 float y1,
133 ::mce::Color const& color1,
134 ::mce::Color const& color2
135 );
136
137 MCAPI void fillStencil(::ScreenContext& screenContext, float x0, float y0, float x1, float y1) const;
138
139 MCAPI bool tessellateQuadBuffer(
140 ::ScreenRenderer::QuadBuffer const& quadBuffer,
141 float quadW,
142 float quadH,
143 ::Tessellator& tessellator,
144 ::mce::TexturePtr const& texture
145 );
146 // NOLINTEND
147
148public:
149 // static functions
150 // NOLINTBEGIN
151 MCAPI static void loadMaterials();
152
153 MCAPI static ::ScreenRenderer& singleton();
154 // NOLINTEND
155
156public:
157 // static variables
158 // NOLINTBEGIN
159 MCAPI static ::std::add_lvalue_reference_t<::mce::MaterialPtr[]> mScreenMaterials();
160
161 MCAPI static ::std::unique_ptr<::ScreenRenderer>& singletonPtr();
162 // NOLINTEND
163};
Definition ScreenContext.h:5
Definition ScreenRenderer.h:15
Definition ScreenRenderer.h:5
Definition Tessellator.h:5
Definition Vec2.h:5
Definition Color.h:13
Definition MaterialPtr.h:14
Definition TexturePtr.h:7
Definition IntRectangle.h:5
Definition ClientTexture.h:7
Definition ServerTexture.h:7