mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
OpenGL: change StreamBuffer in a streaming way
This is a bit slower on map_and_* because of flushing and _very_ much slower on buffer(sub)?data because of a new memcpy. But this design allow us to decode directly into a gpu buffer, eg vertexloader will profit :)
This commit is contained in:
@ -32,10 +32,10 @@ public:
|
||||
StreamBuffer(u32 type, size_t size);
|
||||
~StreamBuffer();
|
||||
|
||||
void Alloc(size_t size, u32 stride = 0);
|
||||
size_t Upload(u8 *data, size_t size);
|
||||
u8* Map(size_t size, u32 stride = 0);
|
||||
size_t Unmap(size_t used_size); // returns the offset of the beginning of the uploaded block
|
||||
|
||||
u32 getBuffer() { return m_buffer; }
|
||||
inline u32 getBuffer() { return m_buffer; }
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
Reference in New Issue
Block a user