2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:29:41 -06:00
|
|
|
// Refer to the license.txt file included.
|
2010-06-13 13:50:06 -06:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2010-06-13 13:50:06 -06:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "VideoCommon/VertexManagerBase.h"
|
2010-06-13 13:50:06 -06:00
|
|
|
|
2010-10-02 18:41:06 -06:00
|
|
|
namespace DX11
|
|
|
|
{
|
2010-06-13 13:50:06 -06:00
|
|
|
|
2010-10-02 18:41:06 -06:00
|
|
|
class VertexManager : public ::VertexManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
VertexManager();
|
2011-06-11 13:37:21 -06:00
|
|
|
~VertexManager();
|
2010-10-02 18:41:06 -06:00
|
|
|
|
2014-03-10 23:55:00 -06:00
|
|
|
NativeVertexFormat* CreateNativeVertexFormat() override;
|
|
|
|
void CreateDeviceObjects() override;
|
|
|
|
void DestroyDeviceObjects() override;
|
2012-10-20 07:22:15 -06:00
|
|
|
|
2014-01-23 07:27:18 -07:00
|
|
|
protected:
|
2014-03-10 23:55:00 -06:00
|
|
|
virtual void ResetBuffer(u32 stride) override;
|
2014-01-23 07:27:18 -07:00
|
|
|
u16* GetIndexBuffer() { return &LocalIBuffer[0]; }
|
|
|
|
|
2012-10-20 07:22:15 -06:00
|
|
|
private:
|
2013-10-28 23:23:17 -06:00
|
|
|
|
2014-10-25 11:04:33 -06:00
|
|
|
void PrepareDrawBuffers(u32 stride);
|
2012-10-26 08:34:02 -06:00
|
|
|
void Draw(u32 stride);
|
2010-10-02 18:41:06 -06:00
|
|
|
// temp
|
2014-03-10 23:55:00 -06:00
|
|
|
void vFlush(bool useDstAlpha) override;
|
2010-10-19 20:17:16 -06:00
|
|
|
|
2014-10-25 11:04:33 -06:00
|
|
|
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 };
|
2014-10-25 11:04:33 -06:00
|
|
|
ID3D11Buffer* m_buffers[MAX_BUFFER_COUNT];
|
2011-03-14 03:38:29 -06:00
|
|
|
|
2014-01-23 07:27:18 -07:00
|
|
|
std::vector<u8> LocalVBuffer;
|
|
|
|
std::vector<u16> LocalIBuffer;
|
2010-10-02 18:41:06 -06:00
|
|
|
};
|
2010-06-13 13:50:06 -06:00
|
|
|
|
|
|
|
} // namespace
|