mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
fc00598785
They were only called at once, so no need to seperate them. This also removes the only dereference of the NativeVertexFormat in VideoCommon, so backends may just return nullptr.
46 lines
940 B
C++
46 lines
940 B
C++
// Copyright 2008 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include "VideoCommon/VertexManagerBase.h"
|
|
|
|
namespace DX11
|
|
{
|
|
|
|
class VertexManager : public VertexManagerBase
|
|
{
|
|
public:
|
|
VertexManager();
|
|
~VertexManager();
|
|
|
|
NativeVertexFormat* CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) override;
|
|
void CreateDeviceObjects() override;
|
|
void DestroyDeviceObjects() override;
|
|
|
|
protected:
|
|
void ResetBuffer(u32 stride) override;
|
|
u16* GetIndexBuffer() { return &LocalIBuffer[0]; }
|
|
|
|
private:
|
|
|
|
void PrepareDrawBuffers(u32 stride);
|
|
void Draw(u32 stride);
|
|
// temp
|
|
void vFlush(bool useDstAlpha) override;
|
|
|
|
u32 m_vertexDrawOffset;
|
|
u32 m_indexDrawOffset;
|
|
u32 m_currentBuffer;
|
|
u32 m_bufferCursor;
|
|
|
|
enum { MAX_BUFFER_COUNT = 2 };
|
|
ID3D11Buffer* m_buffers[MAX_BUFFER_COUNT];
|
|
|
|
std::vector<u8> LocalVBuffer;
|
|
std::vector<u16> LocalIBuffer;
|
|
};
|
|
|
|
} // namespace
|