mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
StreamBuffer: Make factory function return a std::unique_ptr
This commit is contained in:
parent
ec71452706
commit
d20ba76ab3
5 changed files with 22 additions and 20 deletions
|
@ -3,6 +3,7 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -36,8 +37,8 @@ namespace OGL
|
|||
const u32 MAX_IBUFFER_SIZE = 2*1024*1024;
|
||||
const u32 MAX_VBUFFER_SIZE = 32*1024*1024;
|
||||
|
||||
static StreamBuffer *s_vertexBuffer;
|
||||
static StreamBuffer *s_indexBuffer;
|
||||
static std::unique_ptr<StreamBuffer> s_vertexBuffer;
|
||||
static std::unique_ptr<StreamBuffer> s_indexBuffer;
|
||||
static size_t s_baseVertex;
|
||||
static size_t s_index_offset;
|
||||
|
||||
|
@ -65,8 +66,8 @@ void VertexManager::CreateDeviceObjects()
|
|||
|
||||
void VertexManager::DestroyDeviceObjects()
|
||||
{
|
||||
delete s_vertexBuffer;
|
||||
delete s_indexBuffer;
|
||||
s_vertexBuffer.reset();
|
||||
s_indexBuffer.reset();
|
||||
}
|
||||
|
||||
void VertexManager::PrepareDrawBuffers(u32 stride)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue