dolphin/Source/Core/VideoBackends/D3D12/VertexManager.h
Lioncash 6b08194728 D3D12: Get rid of safe deletion macros
Anything these macros provided can be obsoleted by using
the correct standard library types.
2016-02-16 02:09:06 -05:00

49 lines
1.0 KiB
C++

// Copyright 2008 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <memory>
#include "VideoCommon/VertexManagerBase.h"
namespace DX12
{
class D3DStreamBuffer;
class VertexManager final : public VertexManagerBase
{
public:
VertexManager();
~VertexManager();
NativeVertexFormat* CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) override;
void CreateDeviceObjects() override;
void DestroyDeviceObjects() override;
void SetIndexBuffer();
protected:
void ResetBuffer(u32 stride) override;
private:
void PrepareDrawBuffers(u32 stride);
void Draw(u32 stride);
void vFlush(bool use_dst_alpha) override;
u32 m_vertex_draw_offset;
u32 m_index_draw_offset;
std::unique_ptr<D3DStreamBuffer> m_vertex_stream_buffer;
std::unique_ptr<D3DStreamBuffer> m_index_stream_buffer;
bool m_vertex_stream_buffer_reallocated = false;
bool m_index_stream_buffer_reallocated = false;
std::vector<u8> m_index_cpu_buffer;
std::vector<u8> m_vertex_cpu_buffer;
};
} // namespace