3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/deps/core_graphics/enums/PrimitiveMode.h"
8#include "mc/deps/minecraft_renderer/renderer/MeshData.h"
14namespace mce {
class Color; }
16namespace mce {
class Mesh; }
29 enum class UploadMode :
int {
35 enum class SupplementaryFieldAutoGenerationMode :
int {
37 NormalsAndTangents = 1,
47 ::ll::TypedStorage<1, 1, bool> mIsFormatFixed;
48 ::ll::TypedStorage<8, 288, ::mce::MeshData> mMeshData;
49 ::ll::TypedStorage<1, 1, bool> mHasNormals;
50 ::ll::TypedStorage<8, 8, uint64> mNextReserve;
51 ::ll::TypedStorage<4, 20, ::std::optional<::glm::vec4>> mNextNormal;
52 ::ll::TypedStorage<4, 36, ::std::optional<::glm::vec2>[3]> mNextUV;
53 ::ll::TypedStorage<4, 8, ::std::optional<uint>> mNextColor;
54 ::ll::TypedStorage<2, 4, ::std::optional<ushort>> mNextBoneId;
55 ::ll::TypedStorage<2, 4, ::std::optional<ushort>> mNextPBRTextureIdx;
56 ::ll::TypedStorage<4, 8, ::std::optional<uint>> mNextMERS;
57 ::ll::TypedStorage<1, 1, bool> mIndexPhase;
58 ::ll::TypedStorage<4, 12, ::Vec3> mPostTransformOffset;
59 ::ll::TypedStorage<4, 12, ::Vec3> mPostTransformScale;
60 ::ll::TypedStorage<1, 1, uchar> mQuadFacing;
61 ::ll::TypedStorage<1, 1, bool> mQuadTwoSided;
62 ::ll::TypedStorage<8, 24, ::std::vector<::TessellatorQuadInfo>> mQuadInfoList;
63 ::ll::TypedStorage<4, 12, ::Vec3> mFaceCenterAccumulator;
64 ::ll::TypedStorage<4, 4, int> mCurQuadVertex;
65 ::ll::TypedStorage<1, 1, bool> mApplyTransform;
66 ::ll::TypedStorage<4, 64, ::glm::mat4x4> mTransformMatrix;
67 ::ll::TypedStorage<1, 1, bool> mNoColor;
68 ::ll::TypedStorage<1, 1, bool> mVoidBeginEnd;
69 ::ll::TypedStorage<1, 1, bool> mForceTessellateIntercept;
73 ::std::function<void(::Tessellator
const&, ::mce::MaterialPtr
const&, ::mce::TexturePtr
const&)>>
74 mInterceptTessellator;
75 ::ll::TypedStorage<4, 4, uint> mCount;
76 ::ll::TypedStorage<4, 4, uint> mMaxVertexCount;
77 ::ll::TypedStorage<1, 1, bool> mTessellating;
78 ::ll::TypedStorage<1, 1, bool> mBuildFaceData;
79 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::mce::Mesh>> mPreGeneratedMesh;
80 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::mce::BufferResourceService>> mBufferResourceService;
90 MCAPI
explicit Tessellator(::std::weak_ptr<::mce::BufferResourceService> bufferResourceService);
92 MCAPI
void _tex(::Vec2
const& coord,
int unit);
94 MCAPI
void addPostTransformOffset(
float x,
float y,
float z);
97 begin(::Tessellator::DebugContextCallback debugContextCallback,
int reservedVertices,
bool buildFaceData);
100 ::Tessellator::DebugContextCallback debugContextCallback,
101 ::mce::PrimitiveMode mode,
102 int reservedVertices,
108 MCAPI
void color(::mce::Color
const& c);
110 MCAPI
void color(
float r,
float g,
float b,
float a);
113 end(::Tessellator::UploadMode uploadMode,
114 ::std::string_view debugName,
115 ::Tessellator::SupplementaryFieldAutoGenerationMode supplementaryFieldGenerationMode);
117 MCAPI
void normal(
float x,
float y,
float z,
float w);
119 MCAPI
void postTransformScale(::Vec3
const& scale);
121 MCAPI
void quad(uint i1, uint i2, uint i3, uint i4);
123 MCAPI
void resetTransform(
bool setToIdentity);
125 MCAPI
void rotateAroundPivot(::Vec3
const& pivotOffset,
float angle, ::Vec3
const& rotationAxis,
bool preTransform);
127 MCAPI
void simpleQuad(
138 MCAPI
void tex1(::Vec2
const& v);
140 MCAPI
void triggerIntercept(::mce::MaterialPtr
const& material, ::mce::TexturePtr
const& texture);
144 MCAPI
void vertex(
float x,
float y,
float z);
146 MCAPI
void vertexUV(
float x,
float y,
float z,
float u,
float v);
148 MCAPI ~Tessellator();
154 MCAPI
void* $ctor(::std::weak_ptr<::mce::BufferResourceService> bufferResourceService);
Definition Tessellator.h:5
Definition MaterialPtr.h:15
Definition TexturePtr.h:19
Definition TessellatorQuadInfo.h:5
Definition Tessellator.h:17
Definition BufferResourceService.h:7