2013-04-18 03:29:41 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2008-12-26 17:02:46 +00:00
|
|
|
#ifndef _VERTEXMANAGER_H
|
|
|
|
#define _VERTEXMANAGER_H
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2008-12-25 21:44:56 +00:00
|
|
|
#include "CPMemory.h"
|
2008-12-08 04:46:09 +00:00
|
|
|
#include "VertexLoader.h"
|
|
|
|
|
2010-10-03 00:41:06 +00:00
|
|
|
#include "VertexManagerBase.h"
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2010-10-03 00:41:06 +00:00
|
|
|
namespace DX9
|
|
|
|
{
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2010-10-03 00:41:06 +00:00
|
|
|
class VertexManager : public ::VertexManager
|
|
|
|
{
|
2010-11-29 16:16:48 +00:00
|
|
|
public:
|
2010-11-26 09:25:08 +00:00
|
|
|
NativeVertexFormat* CreateNativeVertexFormat();
|
2010-11-29 16:16:48 +00:00
|
|
|
void GetElements(NativeVertexFormat* format, D3DVERTEXELEMENT9** elems, int* num);
|
2012-10-20 13:22:15 +00:00
|
|
|
void CreateDeviceObjects();
|
|
|
|
void DestroyDeviceObjects();
|
2010-10-03 00:41:06 +00:00
|
|
|
private:
|
2012-10-26 14:34:02 +00:00
|
|
|
u32 m_vertex_buffer_cursor;
|
|
|
|
u32 m_vertex_buffer_size;
|
|
|
|
u32 m_index_buffer_cursor;
|
|
|
|
u32 m_index_buffer_size;
|
|
|
|
u32 m_buffers_count;
|
|
|
|
u32 m_current_vertex_buffer;
|
2012-10-27 02:18:09 +00:00
|
|
|
u32 m_current_stride;
|
2012-10-26 14:34:02 +00:00
|
|
|
u32 m_current_index_buffer;
|
|
|
|
LPDIRECT3DVERTEXBUFFER9 *m_vertex_buffers;
|
|
|
|
LPDIRECT3DINDEXBUFFER9 *m_index_buffers;
|
|
|
|
void PrepareDrawBuffers(u32 stride);
|
|
|
|
void DrawVertexBuffer(int stride);
|
|
|
|
void DrawVertexArray(int stride);
|
2010-10-03 00:41:06 +00:00
|
|
|
// temp
|
|
|
|
void vFlush();
|
|
|
|
};
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2010-10-03 00:41:06 +00:00
|
|
|
}
|
2008-12-26 17:02:46 +00:00
|
|
|
|
|
|
|
#endif
|