2013-04-18 06:29:41 +03:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 06:46:09 +02:00
|
|
|
|
2008-12-26 19:02:46 +02:00
|
|
|
#ifndef _VERTEXMANAGER_H
|
|
|
|
#define _VERTEXMANAGER_H
|
2008-12-08 06:46:09 +02:00
|
|
|
|
2008-12-25 23:44:56 +02:00
|
|
|
#include "CPMemory.h"
|
2008-12-08 06:46:09 +02:00
|
|
|
#include "VertexLoader.h"
|
|
|
|
|
2010-10-03 03:41:06 +03:00
|
|
|
#include "VertexManagerBase.h"
|
2008-12-08 06:46:09 +02:00
|
|
|
|
2010-10-03 03:41:06 +03:00
|
|
|
namespace DX9
|
|
|
|
{
|
2008-12-08 06:46:09 +02:00
|
|
|
|
2010-10-03 03:41:06 +03:00
|
|
|
class VertexManager : public ::VertexManager
|
|
|
|
{
|
2010-11-29 18:16:48 +02:00
|
|
|
public:
|
2010-11-26 11:25:08 +02:00
|
|
|
NativeVertexFormat* CreateNativeVertexFormat();
|
2010-11-29 18:16:48 +02:00
|
|
|
void GetElements(NativeVertexFormat* format, D3DVERTEXELEMENT9** elems, int* num);
|
2012-10-20 16:22:15 +03:00
|
|
|
void CreateDeviceObjects();
|
|
|
|
void DestroyDeviceObjects();
|
2010-10-03 03:41:06 +03:00
|
|
|
private:
|
2012-10-26 17:34:02 +03: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 05:18:09 +03:00
|
|
|
u32 m_current_stride;
|
2012-10-26 17:34:02 +03: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 03:41:06 +03:00
|
|
|
// temp
|
|
|
|
void vFlush();
|
|
|
|
};
|
2008-12-08 06:46:09 +02:00
|
|
|
|
2010-10-03 03:41:06 +03:00
|
|
|
}
|
2008-12-26 19:02:46 +02:00
|
|
|
|
|
|
|
#endif
|