2013-04-18 03:29:41 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "VideoBackends/D3D/LineGeometryShader.h"
|
|
|
|
#include "VideoBackends/D3D/PointGeometryShader.h"
|
|
|
|
#include "VideoCommon/VertexManagerBase.h"
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2010-10-03 00:41:06 +00:00
|
|
|
namespace DX11
|
|
|
|
{
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2010-10-03 00:41:06 +00:00
|
|
|
class VertexManager : public ::VertexManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
VertexManager();
|
2011-06-11 19:37:21 +00:00
|
|
|
~VertexManager();
|
2010-10-03 00:41:06 +00:00
|
|
|
|
2014-03-11 05:55:00 +00:00
|
|
|
NativeVertexFormat* CreateNativeVertexFormat() override;
|
|
|
|
void CreateDeviceObjects() override;
|
|
|
|
void DestroyDeviceObjects() override;
|
2012-10-20 13:22:15 +00:00
|
|
|
|
2014-01-23 14:27:18 +00:00
|
|
|
protected:
|
2014-03-11 05:55:00 +00:00
|
|
|
virtual void ResetBuffer(u32 stride) override;
|
2014-01-23 14:27:18 +00:00
|
|
|
u16* GetIndexBuffer() { return &LocalIBuffer[0]; }
|
|
|
|
|
2012-10-20 13:22:15 +00:00
|
|
|
private:
|
2013-10-29 05:23:17 +00:00
|
|
|
|
2012-10-26 14:34:02 +00:00
|
|
|
void PrepareDrawBuffers();
|
|
|
|
void Draw(u32 stride);
|
2010-10-03 00:41:06 +00:00
|
|
|
// temp
|
2014-03-11 05:55:00 +00:00
|
|
|
void vFlush(bool useDstAlpha) override;
|
2010-10-20 02:17:16 +00:00
|
|
|
|
2012-10-26 14:34:02 +00:00
|
|
|
u32 m_vertex_buffer_cursor;
|
|
|
|
u32 m_vertex_draw_offset;
|
|
|
|
u32 m_index_buffer_cursor;
|
2014-01-15 20:44:46 +00:00
|
|
|
u32 m_index_draw_offset;
|
2012-10-26 14:34:02 +00:00
|
|
|
u32 m_current_vertex_buffer;
|
|
|
|
u32 m_current_index_buffer;
|
2012-10-20 13:22:15 +00:00
|
|
|
typedef ID3D11Buffer* PID3D11Buffer;
|
2012-10-26 14:34:02 +00:00
|
|
|
PID3D11Buffer* m_index_buffers;
|
|
|
|
PID3D11Buffer* m_vertex_buffers;
|
2011-03-14 09:38:29 +00:00
|
|
|
|
|
|
|
LineGeometryShader m_lineShader;
|
|
|
|
PointGeometryShader m_pointShader;
|
2014-01-23 14:27:18 +00:00
|
|
|
|
|
|
|
std::vector<u8> LocalVBuffer;
|
|
|
|
std::vector<u16> LocalIBuffer;
|
2010-10-03 00:41:06 +00:00
|
|
|
};
|
2010-06-13 19:50:06 +00:00
|
|
|
|
|
|
|
} // namespace
|