Batch #10256 by ragnarok-clanker: forced by an admin (0 lower score(s), 8 changed function(s)); checked with 113 compiled unit(s), including every includer of Source/Contents/Models/ModelActor.h, Source/Contents/Models/ModelNode.h, Source/Contents/Models/ModelRendering.h, Source/Contents/World/World.h, Source/Contents/World/WorldModelLoading.h.
51 lines
1.7 KiB
C++
51 lines
1.7 KiB
C++
#ifndef RAGNAROK_SOURCE_CONTENTS_MODELS_MODELRENDERING_H
|
|
#define RAGNAROK_SOURCE_CONTENTS_MODELS_MODELRENDERING_H
|
|
|
|
#include "Render/Primitives/RenderPrimitive.h"
|
|
|
|
#include <array>
|
|
|
|
struct RenderProjection;
|
|
struct RenderQueues;
|
|
class RenderCommandPool;
|
|
class RenderVertexPool;
|
|
class C3dNode;
|
|
struct ModelTextureTransform;
|
|
|
|
struct ModelFaceState {
|
|
/* 0000 */ std::uint32_t colors[3];
|
|
/* 000C */ float uv[3][2];
|
|
};
|
|
|
|
struct ModelRenderContext {
|
|
const RenderProjection& projection;
|
|
RenderCommandPool& commands;
|
|
RenderVertexPool& vertices;
|
|
RenderQueues& queues;
|
|
const int& width;
|
|
const int& height;
|
|
const bool& depthAlpha;
|
|
const float& depthStart;
|
|
const float& depthEnd;
|
|
const bool& overrideColor;
|
|
const bool& integerColor;
|
|
const float* overrideScale;
|
|
const float* colorScale;
|
|
|
|
std::array<RenderVertex, 30000> legacyProjected{};
|
|
std::array<RenderVertex, 30000> modernProjected{};
|
|
|
|
ModelRenderContext(
|
|
const RenderProjection& projection, RenderCommandPool& commands, RenderVertexPool& vertices, RenderQueues& queues, const int& width, const int& height,
|
|
const bool& depthAlpha, const float& depthStart, const float& depthEnd, const bool& overrideColor, const bool& integerColor, const float* overrideScale,
|
|
const float* colorScale
|
|
);
|
|
};
|
|
|
|
bool ModelTriangleVisible(const RenderVertex* a, const RenderVertex* b, const RenderVertex* c, const ModelRenderContext& context);
|
|
void TransformModelUV(float& u, float& v, const ModelTextureTransform& transform);
|
|
void DrawModelNode(C3dNode& node, const float* matrix, unsigned char reversed, bool clip, unsigned char commandMode, ModelRenderContext& context, bool modern);
|
|
|
|
static_assert(sizeof(ModelFaceState) == 36);
|
|
|
|
#endif
|