3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/renderer/SupplementaryFieldAutoGenerationMode.h"
7#include "mc/deps/core/math/Vec3.h"
8#include "mc/deps/core_graphics/enums/PrimitiveMode.h"
9#include "mc/deps/minecraft_renderer/renderer/MeshData.h"
15namespace mce {
class Color; }
17namespace mce {
class Mesh; }
30 enum class UploadMode :
int {
43 ::ll::TypedStorage<1, 1, bool> mIsFormatFixed;
44 ::ll::TypedStorage<8, 336, ::mce::MeshData> mMeshData;
45 ::ll::TypedStorage<1, 1, bool> mHasNormals;
46 ::ll::TypedStorage<8, 8, uint64> mNextReserve;
47 ::ll::TypedStorage<4, 20, ::std::optional<::glm::vec4>> mNextNormal;
48 ::ll::TypedStorage<4, 36, ::std::optional<::glm::vec2>[3]> mNextUV;
49 ::ll::TypedStorage<4, 8, ::std::optional<uint>> mNextColor;
50 ::ll::TypedStorage<2, 4, ::std::optional<ushort>> mNextBoneId;
51 ::ll::TypedStorage<2, 4, ::std::optional<ushort>> mNextPBRTextureIdx;
52 ::ll::TypedStorage<4, 8, ::std::optional<uint>> mNextMERS;
53 ::ll::TypedStorage<1, 2, ::std::optional<uchar>> mNextGeoType;
54 ::ll::TypedStorage<1, 1, bool> mIndexPhase;
55 ::ll::TypedStorage<4, 12, ::Vec3> mPostTransformOffset;
56 ::ll::TypedStorage<4, 12, ::Vec3> mPostTransformScale;
57 ::ll::TypedStorage<1, 1, uchar> mQuadFacing;
58 ::ll::TypedStorage<1, 1, bool> mQuadTwoSided;
59 ::ll::TypedStorage<8, 24, ::std::vector<::TessellatorQuadInfo>> mQuadInfoList;
60 ::ll::TypedStorage<4, 12, ::Vec3> mFaceCenterAccumulator;
61 ::ll::TypedStorage<4, 4, int> mCurQuadVertex;
62 ::ll::TypedStorage<1, 1, bool> mApplyTransform;
63 ::ll::TypedStorage<4, 64, ::glm::mat4x4> mTransformMatrix;
64 ::ll::TypedStorage<1, 1, bool> mNoColor;
65 ::ll::TypedStorage<1, 1, bool> mVoidBeginEnd;
66 ::ll::TypedStorage<1, 1, bool> mForceTessellateIntercept;
70 ::std::function<void(::Tessellator
const&, ::mce::MaterialPtr
const&, ::mce::TexturePtr
const&)>>
71 mInterceptTessellator;
72 ::ll::TypedStorage<4, 4, uint> mCount;
73 ::ll::TypedStorage<4, 4, uint> mMaxVertexCount;
74 ::ll::TypedStorage<1, 1, bool> mTessellating;
75 ::ll::TypedStorage<1, 1, bool> mBuildFaceData;
76 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::mce::Mesh>> mPreGeneratedMesh;
77 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::mce::BufferResourceService>> mBufferResourceService;
87 MCAPI
explicit Tessellator(::std::weak_ptr<::mce::BufferResourceService> bufferResourceService);
89 MCAPI
void addRotation(
float angle, ::Vec3
const& axis);
91 MCAPI
void addTranslation(::Vec3
const& offset);
94 ::Tessellator::DebugContextCallback debugContextCallback,
95 ::mce::PrimitiveMode mode,
100 MCAPI
void beginOverride(::Tessellator::DebugContextCallback debugContextCallback);
104 MCAPI
void color(::mce::Color
const& c);
106 MCAPI
void color(
float r,
float g,
float b,
float a);
109 end(::Tessellator::UploadMode uploadMode,
110 ::std::string_view debugName,
111 ::SupplementaryFieldAutoGenerationMode supplementaryFieldGenerationMode);
113 MCAPI
void quad(uint i1, uint i2, uint i3, uint i4);
115 MCAPI
void resetTransform(
bool setToIdentity);
117 MCAPI
void rotateAroundPivot(::Vec3
const& pivotOffset,
float angle, ::Vec3
const& rotationAxis,
bool preTransform);
119 MCAPI
void setTessellateIntercept(
120 ::std::function<
void(::Tessellator
const&, ::mce::MaterialPtr
const&, ::mce::TexturePtr
const&)> callback
123 MCAPI
void simpleQuad(
134 MCAPI
void tex2(::Vec2
const& v);
136 MCAPI
void triggerIntercept(::mce::MaterialPtr
const& material, ::mce::TexturePtr
const& texture);
138 MCAPI
void vertex(
float x,
float y,
float z);
140 MCAPI ~Tessellator();
146 MCAPI
void* $ctor(::std::weak_ptr<::mce::BufferResourceService> bufferResourceService);
Definition Tessellator.h:5
Definition MaterialPtr.h:14
Definition TexturePtr.h:7
Definition TessellatorQuadInfo.h:5
Definition Tessellator.h:15
Definition BufferResourceService.h:7