Files
dolphin/Source/Core/VideoCommon/VertexLoader.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
C++
Raw Normal View History

// Copyright 2008 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2008-12-08 04:46:09 +00:00
#pragma once
2008-12-08 04:46:09 +00:00
// Top vertex loaders
// Metroid Prime: P I16-flt N I16-s16 T0 I16-u16 T1 i16-flt
#include <string>
2008-12-08 04:46:09 +00:00
2014-09-07 20:06:58 -05:00
#include "Common/CommonTypes.h"
#include "VideoCommon/VertexLoaderBase.h"
class VertexLoader;
2015-06-19 15:18:16 -04:00
typedef void (*TPipelineFunction)(VertexLoader* loader);
2014-07-08 15:58:25 +02:00
class VertexLoader : public VertexLoaderBase
2008-07-12 17:40:22 +00:00
{
public:
VertexLoader(const TVtxDesc& vtx_desc, const VAT& vtx_attr);
2008-12-08 04:46:09 +00:00
2022-11-22 16:54:05 -08:00
int RunVertices(const u8* src, u8* dst, int count) override;
// They are used for the communication with the loader functions
2015-01-19 18:33:08 +01:00
float m_posScale;
float m_tcScale[8];
int m_tcIndex;
int m_colIndex;
2014-08-24 23:53:28 -04:00
// Matrix components are first in GC format but later in PC format - we need to store it
// temporarily
// when decoding each vertex.
u8 m_curtexmtx[8];
int m_texmtxwrite;
int m_texmtxread;
bool m_vertexSkip;
int m_skippedVertices;
int m_remaining;
private:
2014-02-23 15:14:27 +01:00
// Pipeline.
TPipelineFunction m_PipelineStages[64]; // TODO - figure out real max. it's lower.
int m_numPipelineStages;
2008-12-08 04:46:09 +00:00
void CompileVertexTranslator();
2008-12-08 04:46:09 +00:00
void WriteCall(TPipelineFunction);
2008-07-12 17:40:22 +00:00
};