mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 22:09:19 -07:00
613781c765
Based on the feedback from pull request #1767 I have put in most of degasus's suggestions in here now. I think we have a real winner here as moving the code to VertexManagerBase for a function has allowed OGL to utilize zfreeze now :) Correct use of the vertex pointer has also corrected most of the issue found in pull request #1767 that JMC47 stated. Which also for me now has Mario Tennis working with no polygon spikes on the characters anymore! Shadows are still an issue and probably in the other games with shadow problems. Rebel Strike also seems better but random skybox glitches can show up.
46 lines
904 B
C++
46 lines
904 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]; }
|
|
|
|
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
|