mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 08:39:13 +01:00
937844b9e3
Initial port of original zfreeze branch (3.5-1729) by neobrain into most recent build of Dolphin. Makes Rogue Squadron 2 very playable at full speed thanks to recent core speedups made to Dolphin. Works on DirectX Video plugin only for now. Enjoy! and Merry Xmas!!
47 lines
956 B
C++
47 lines
956 B
C++
// Copyright 2013 Dolphin Emulator Project
|
|
// 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();
|
|
|
|
NativeVertexFormat* CreateNativeVertexFormat() override;
|
|
void CreateDeviceObjects() override;
|
|
void DestroyDeviceObjects() override;
|
|
|
|
protected:
|
|
virtual void ResetBuffer(u32 stride) override;
|
|
u16* GetIndexBuffer() { return &LocalIBuffer[0]; }
|
|
u8* GetVertexBuffer() { return &LocalVBuffer[0]; }
|
|
|
|
private:
|
|
|
|
void PrepareDrawBuffers(u32 stride);
|
|
void Draw(u32 stride);
|
|
// temp
|
|
void vFlush(bool useDstAlpha) override;
|
|
|
|
u32 m_vertexDrawOffset;
|
|
u32 m_indexDrawOffset;
|
|
u32 m_currentBuffer;
|
|
u32 m_bufferCursor;
|
|
|
|
enum { MAX_BUFFER_COUNT = 2 };
|
|
ID3D11Buffer* m_buffers[MAX_BUFFER_COUNT];
|
|
|
|
std::vector<u8> LocalVBuffer;
|
|
std::vector<u16> LocalIBuffer;
|
|
};
|
|
|
|
} // namespace
|