Files
dolphin/Source/Core/VideoBackends/Software/SWVertexLoader.h
T

47 lines
1022 B
C++
Raw Normal View History

// Copyright 2009 Dolphin Emulator Project
2015-05-18 01:08:10 +02:00
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
2014-12-22 10:25:05 -06:00
#include <memory>
#include <unordered_map>
2015-10-09 20:50:36 +02:00
#include <vector>
2014-12-22 10:25:05 -06:00
2014-09-07 20:06:58 -05:00
#include "Common/CommonTypes.h"
2014-02-17 05:18:15 -05:00
#include "VideoBackends/Software/NativeVertexFormat.h"
#include "VideoCommon/VertexLoaderBase.h"
2015-10-09 20:50:36 +02:00
#include "VideoCommon/VertexManagerBase.h"
class SetupUnit;
2015-10-09 20:50:36 +02:00
class SWVertexLoader : public VertexManagerBase
{
2015-10-09 20:50:36 +02:00
public:
SWVertexLoader();
~SWVertexLoader();
NativeVertexFormat* CreateNativeVertexFormat(const PortableVertexDeclaration& vdec) override;
2015-10-09 20:50:36 +02:00
protected:
void ResetBuffer(u32 stride) override;
u16* GetIndexBuffer() { return &LocalIBuffer[0]; }
2015-10-09 20:50:36 +02:00
private:
void vFlush(bool useDstAlpha) override;
std::vector<u8> LocalVBuffer;
std::vector<u16> LocalIBuffer;
InputVertexData m_Vertex;
void ParseVertex(const PortableVertexDeclaration& vdec, int index);
SetupUnit* m_SetupUnit;
bool m_TexGenSpecialCase;
public:
void SetFormat(u8 attributeIndex, u8 primitiveType);
};