dolphin/Source/Core/VideoBackends/D3D/VertexManager.h

46 lines
905 B
C
Raw Normal View History

// Copyright 2008 Dolphin Emulator Project
2015-05-17 17:08:10 -06:00
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "VideoCommon/VertexManagerBase.h"
namespace DX11
{
class VertexManager : public ::VertexManager
{
public:
VertexManager();
~VertexManager();
2014-03-10 23:55:00 -06:00
NativeVertexFormat* CreateNativeVertexFormat() override;
void CreateDeviceObjects() override;
void DestroyDeviceObjects() override;
protected:
2014-03-10 23:55:00 -06:00
virtual void ResetBuffer(u32 stride) override;
u16* GetIndexBuffer() { return &LocalIBuffer[0]; }
private:
void PrepareDrawBuffers(u32 stride);
void Draw(u32 stride);
// temp
2014-03-10 23:55:00 -06:00
void vFlush(bool useDstAlpha) override;
u32 m_vertexDrawOffset;
u32 m_indexDrawOffset;
u32 m_currentBuffer;
u32 m_bufferCursor;
2014-10-25 11:14:28 -06:00
enum { MAX_BUFFER_COUNT = 2 };
ID3D11Buffer* m_buffers[MAX_BUFFER_COUNT];
std::vector<u8> LocalVBuffer;
std::vector<u16> LocalIBuffer;
};
} // namespace