From 30170575c828c5b11dfdaa0ef05e58e0a24c486e Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 31 Jan 2013 23:11:53 +0100 Subject: [PATCH] create StreamBuffer class for ogl upload --- Source/Plugins/Plugin_VideoOGL/CMakeLists.txt | 1 + .../Plugin_VideoOGL/Plugin_VideoOGL.vcxproj | 2 + .../Plugin_VideoOGL.vcxproj.filters | 3 + .../Src/ProgramShaderCache.cpp | 44 +++---- .../Plugin_VideoOGL/Src/ProgramShaderCache.h | 4 +- .../Plugin_VideoOGL/Src/StreamBuffer.cpp | 91 ++++++++++++++ .../Plugin_VideoOGL/Src/StreamBuffer.h | 57 +++++++++ .../Plugin_VideoOGL/Src/VertexManager.cpp | 117 +++++------------- .../Plugin_VideoOGL/Src/VertexManager.h | 4 - 9 files changed, 199 insertions(+), 124 deletions(-) create mode 100644 Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp create mode 100644 Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.h diff --git a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt index 02c174544c..05b9eac08f 100644 --- a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt +++ b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt @@ -7,6 +7,7 @@ set(SRCS Src/FramebufferManager.cpp Src/ProgramShaderCache.cpp Src/RasterFont.cpp Src/Render.cpp + Src/StreamBuffer.cpp Src/TextureCache.cpp Src/TextureConverter.cpp Src/VertexShaderCache.cpp diff --git a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj index d46fe6330b..c5e741a66b 100644 --- a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj +++ b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj @@ -205,6 +205,7 @@ + Create Create @@ -228,6 +229,7 @@ + diff --git a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters index 5d8eda64ff..3437f0a8ae 100644 --- a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters +++ b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters @@ -33,6 +33,9 @@ Render + + Render + Render diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index 552a08f961..e7f2bdf43b 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -17,6 +17,7 @@ #include "ProgramShaderCache.h" #include "MathUtil.h" +#include "StreamBuffer.h" namespace OGL { @@ -25,10 +26,8 @@ static const u32 UBO_LENGTH = 1024*1024; GLuint ProgramShaderCache::CurrentProgram = 0; ProgramShaderCache::PCache ProgramShaderCache::pshaders; -GLuint ProgramShaderCache::s_ps_vs_ubo; -u32 ProgramShaderCache::s_ubo_iterator; GLintptr ProgramShaderCache::s_vs_data_offset; -float *ProgramShaderCache::s_ubo_buffer; +u8 *ProgramShaderCache::s_ubo_buffer; u32 ProgramShaderCache::s_ubo_buffer_size; bool ProgramShaderCache::s_ubo_dirty; @@ -39,6 +38,8 @@ GLuint ProgramShaderCache::PCacheEntry::prog_format = 0; u64 ProgramShaderCache::CurrentShaderProgram; +static StreamBuffer *s_buffer; + u64 Create_Pair(u32 key1, u32 key2) { return (((u64)key1) << 32) | key2; @@ -195,36 +196,23 @@ void ProgramShaderCache::SetBothShaders(GLuint PS, GLuint VS) void ProgramShaderCache::SetMultiPSConstant4fv(unsigned int offset, const float *f, unsigned int count) { s_ubo_dirty = true; - memcpy(s_ubo_buffer+(offset*4), f, count*4*sizeof(float)); + memcpy(s_ubo_buffer+(offset*4*sizeof(float)), f, count*4*sizeof(float)); } void ProgramShaderCache::SetMultiVSConstant4fv(unsigned int offset, const float *f, unsigned int count) { s_ubo_dirty = true; - memcpy(s_ubo_buffer+(offset*4)+s_vs_data_offset/sizeof(float), f, count*4*sizeof(float)); + memcpy(s_ubo_buffer+(offset*4*sizeof(float))+s_vs_data_offset, f, count*4*sizeof(float)); } void ProgramShaderCache::UploadConstants() { if(s_ubo_dirty) { - if(s_ubo_iterator + s_ubo_buffer_size >= UBO_LENGTH) { - glBufferData(GL_UNIFORM_BUFFER, UBO_LENGTH, NULL, GL_STREAM_READ); - s_ubo_iterator = 0; - } - void *ubo = glMapBufferRange(GL_UNIFORM_BUFFER, s_ubo_iterator, s_ubo_buffer_size, GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_INVALIDATE_RANGE_BIT); - if(ubo) { - memcpy(ubo, s_ubo_buffer, s_ubo_buffer_size); - glUnmapBuffer(GL_UNIFORM_BUFFER); - } else { - glBufferSubData(GL_UNIFORM_BUFFER, s_ubo_iterator, s_ubo_buffer_size, s_ubo_buffer); - } - - glBindBufferRange(GL_UNIFORM_BUFFER, 1, s_ps_vs_ubo, s_ubo_iterator, s_vs_data_offset); - glBindBufferRange(GL_UNIFORM_BUFFER, 2, s_ps_vs_ubo, s_ubo_iterator + s_vs_data_offset, s_ubo_buffer_size - s_vs_data_offset); - - s_ubo_iterator += s_ubo_buffer_size; + size_t offset = s_buffer->Upload(s_ubo_buffer, s_ubo_buffer_size); + glBindBufferRange(GL_UNIFORM_BUFFER, 1, s_buffer->getBuffer(), offset, s_vs_data_offset); + glBindBufferRange(GL_UNIFORM_BUFFER, 2, s_buffer->getBuffer(), offset + s_vs_data_offset, s_ubo_buffer_size - s_vs_data_offset); + s_ubo_dirty = false; } - s_ubo_dirty = false; } GLuint ProgramShaderCache::GetCurrentProgram(void) @@ -255,12 +243,9 @@ void ProgramShaderCache::Init(void) // We multiply by *4*4 because we need to get down to basic machine units. // So multiply by four to get how many floats we have from vec4s // Then once more to get bytes - glGenBuffers(1, &s_ps_vs_ubo); - glBindBuffer(GL_UNIFORM_BUFFER, s_ps_vs_ubo); - glBufferData(GL_UNIFORM_BUFFER, UBO_LENGTH, NULL, GL_STREAM_READ); - s_ubo_iterator = 0; + s_buffer = new StreamBuffer(GL_UNIFORM_BUFFER, UBO_LENGTH); - s_ubo_buffer = new float[s_ubo_buffer_size/sizeof(float)]; + s_ubo_buffer = new u8[s_ubo_buffer_size]; memset(s_ubo_buffer, 0, s_ubo_buffer_size); s_ubo_dirty = true; } @@ -306,9 +291,8 @@ void ProgramShaderCache::Shutdown(void) if (g_ActiveConfig.backend_info.bSupportsGLSLUBO) { - glBindBuffer(GL_UNIFORM_BUFFER, 0); - glDeleteBuffers(1, &s_ps_vs_ubo); - s_ps_vs_ubo = 0; + delete s_buffer; + s_buffer = 0; delete [] s_ubo_buffer; s_ubo_buffer = 0; } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h index ba72c24b4f..a173b23095 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h @@ -164,10 +164,8 @@ private: static GLuint CurrentProgram; static u64 CurrentShaderProgram; - static GLuint s_ps_vs_ubo; - static u32 s_ubo_iterator; static GLintptr s_vs_data_offset; - static float *s_ubo_buffer; + static u8 *s_ubo_buffer; static u32 s_ubo_buffer_size; static bool s_ubo_dirty; static void SetProgramVariables(PCacheEntry &entry); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp new file mode 100644 index 0000000000..d42375e324 --- /dev/null +++ b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp @@ -0,0 +1,91 @@ +// Copyright (C) 2003 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + + +#include "Globals.h" +#include "GLUtil.h" +#include "StreamBuffer.h" + +namespace OGL +{ + +StreamBuffer::StreamBuffer(u32 type, size_t size) +: m_buffertype(type), m_size(size), m_iterator(0) +{ + glGenBuffers(1, &m_buffer); + + m_uploadtype = MAP_AND_ORPHAN; + + Init(); +} + +StreamBuffer::~StreamBuffer() +{ + Shutdown(); + glDeleteBuffers(1, &m_buffer); +} + +void StreamBuffer::Align ( u32 stride ) +{ + if(m_iterator) { + m_iterator--; + m_iterator = m_iterator - (m_iterator % stride) + stride; + } +} + +size_t StreamBuffer::Upload ( u8* data, size_t size ) +{ + switch(m_uploadtype) { + case MAP_AND_ORPHAN: + if(m_iterator+size >= m_size) { + glBufferData(m_buffertype, m_size, NULL, GL_STREAM_DRAW); + m_iterator = 0; + } + pointer = (u8*)glMapBufferRange(m_buffertype, m_iterator, size, GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT); + if(pointer) { + memcpy(pointer, data, size); + glUnmapBuffer(m_buffertype); + } else { + ERROR_LOG(VIDEO, "buffer mapping failed"); + } + break; + } + size_t ret = m_iterator; + m_iterator += size; + return ret; +} + + +void StreamBuffer::Init() +{ + switch(m_uploadtype) { + case MAP_AND_ORPHAN: + glBindBuffer(m_buffertype, m_buffer); + glBufferData(m_buffertype, m_size, NULL, GL_STREAM_DRAW); + break; + } +} + +void StreamBuffer::Shutdown() +{ + switch(m_uploadtype) { + case MAP_AND_ORPHAN: + break; + } +} + +} diff --git a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.h b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.h new file mode 100644 index 0000000000..520f59c8ea --- /dev/null +++ b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.h @@ -0,0 +1,57 @@ +// Copyright (C) 2003 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + + +#ifndef STREAMBUFFER_H +#define STREAMBUFFER_H + +#include "VideoCommon.h" +#include "FramebufferManager.h" + +namespace OGL +{ +enum StreamType { + MAP_AND_ORPHAN +}; + +class StreamBuffer { + +public: + StreamBuffer(u32 type, size_t size); + ~StreamBuffer(); + + size_t Upload(u8 *data, size_t size); + + u32 getBuffer() { return m_buffer; } + + void Align(u32 stride); + +private: + void Init(); + void Shutdown(); + + StreamType m_uploadtype; + u32 m_buffer; + u32 m_buffertype; + size_t m_size; + u8 *pointer; + size_t m_iterator; +}; + +} + +#endif // STREAMBUFFER_H diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp index 6de135d5bd..d8cedbb6b5 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp @@ -41,6 +41,7 @@ #include "OpcodeDecoding.h" #include "FileUtil.h" #include "Debugger.h" +#include "StreamBuffer.h" #include "main.h" @@ -55,6 +56,11 @@ const u32 MAX_VBUFFER_SIZE = VertexManager::MAXVBUFFERSIZE * 16; const u32 MIN_IBUFFER_SIZE = VertexManager::MAXIBUFFERSIZE * 1 * sizeof(u16); const u32 MIN_VBUFFER_SIZE = VertexManager::MAXVBUFFERSIZE * 1; +static StreamBuffer *s_vertexBuffer; +static StreamBuffer *s_indexBuffer; +static u32 s_baseVertex; +static u32 s_offset[3]; + VertexManager::VertexManager() { CreateDeviceObjects(); @@ -75,31 +81,22 @@ void VertexManager::CreateDeviceObjects() max_Index_size *= sizeof(u16); GL_REPORT_ERROR(); - m_index_buffer_size = std::min(MAX_IBUFFER_SIZE, std::max(max_Index_size, MIN_IBUFFER_SIZE)); - m_vertex_buffer_size = std::min(MAX_VBUFFER_SIZE, std::max(max_Vertex_size, MIN_VBUFFER_SIZE)); + u32 index_buffer_size = std::min(MAX_IBUFFER_SIZE, std::max(max_Index_size, MIN_IBUFFER_SIZE)); + u32 vertex_buffer_size = std::min(MAX_VBUFFER_SIZE, std::max(max_Vertex_size, MIN_VBUFFER_SIZE)); // should be not bigger, but we need it. so try and have luck - if (m_index_buffer_size > max_Index_size) { + if (index_buffer_size > max_Index_size) { ERROR_LOG(VIDEO, "GL_MAX_ELEMENTS_INDICES to small, so try it anyway. good luck\n"); } - if (m_vertex_buffer_size > max_Vertex_size) { + if (vertex_buffer_size > max_Vertex_size) { ERROR_LOG(VIDEO, "GL_MAX_ELEMENTS_VERTICES to small, so try it anyway. good luck\n"); } - glGenBuffers(1, &m_vertex_buffers); - GL_REPORT_ERROR(); - glGenBuffers(1, &m_index_buffers); - GL_REPORT_ERROR(); - glBindBuffer(GL_ARRAY_BUFFER, m_vertex_buffers ); - GL_REPORT_ERROR(); - glBufferData(GL_ARRAY_BUFFER, m_vertex_buffer_size, NULL, GL_STREAM_READ ); - GL_REPORT_ERROR(); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_index_buffers ); - GL_REPORT_ERROR(); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_index_buffer_size, NULL, GL_STREAM_READ ); - GL_REPORT_ERROR(); - m_index_buffer_cursor = 0; - m_vertex_buffer_cursor = 0; + s_vertexBuffer = new StreamBuffer(GL_ARRAY_BUFFER, vertex_buffer_size); + m_vertex_buffers = s_vertexBuffer->getBuffer(); + s_indexBuffer = new StreamBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer_size); + m_index_buffers = s_indexBuffer->getBuffer(); + m_CurrentVertexFmt = NULL; m_last_vao = 0; } @@ -110,81 +107,34 @@ void VertexManager::DestroyDeviceObjects() glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0 ); GL_REPORT_ERROR(); - glDeleteBuffers(1, &m_vertex_buffers); - GL_REPORT_ERROR(); - - glDeleteBuffers(1, &m_index_buffers); + delete s_vertexBuffer; + delete s_indexBuffer; GL_REPORT_ERROR(); } void VertexManager::PrepareDrawBuffers(u32 stride) { - u8* pVertices = NULL; - u16* pIndices = NULL; int vertex_data_size = IndexGenerator::GetNumVerts() * stride; int triangle_index_size = IndexGenerator::GetTriangleindexLen(); int line_index_size = IndexGenerator::GetLineindexLen(); int point_index_size = IndexGenerator::GetPointindexLen(); - int index_data_size = (triangle_index_size + line_index_size + point_index_size) * sizeof(u16); - m_vertex_buffer_cursor--; - m_vertex_buffer_cursor = m_vertex_buffer_cursor - (m_vertex_buffer_cursor % stride) + stride; + s_vertexBuffer->Align(stride); + u32 offset = s_vertexBuffer->Upload(LocalVBuffer, vertex_data_size); - if (m_vertex_buffer_cursor >= m_vertex_buffer_size - vertex_data_size || m_index_buffer_cursor >= m_index_buffer_size - index_data_size) + s_baseVertex = offset / stride; + + if(triangle_index_size) { - m_vertex_buffer_cursor = 0; - m_index_buffer_cursor = 0; - glBufferData(GL_ARRAY_BUFFER, m_vertex_buffer_size, NULL, GL_STREAM_READ); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_index_buffer_size, NULL, GL_STREAM_READ); + s_offset[0] = s_indexBuffer->Upload((u8*)TIBuffer, triangle_index_size * sizeof(u16)); } - - pVertices = (u8*)glMapBufferRange(GL_ARRAY_BUFFER, m_vertex_buffer_cursor, vertex_data_size, GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_INVALIDATE_RANGE_BIT); - if(pVertices) + if(line_index_size) { - memcpy(pVertices, LocalVBuffer, vertex_data_size); - glUnmapBuffer(GL_ARRAY_BUFFER); + s_offset[1] = s_indexBuffer->Upload((u8*)LIBuffer, line_index_size * sizeof(u16)); } - else // could that happen? out-of-memory? + if(point_index_size) { - glBufferSubData(GL_ARRAY_BUFFER, m_vertex_buffer_cursor, vertex_data_size, LocalVBuffer); - } - - pIndices = (u16*)glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, m_index_buffer_cursor , index_data_size, GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_INVALIDATE_RANGE_BIT); - if(pIndices) - { - if(triangle_index_size) - { - memcpy(pIndices, TIBuffer, triangle_index_size * sizeof(u16)); - pIndices += triangle_index_size; - } - if(line_index_size) - { - memcpy(pIndices, LIBuffer, line_index_size * sizeof(u16)); - pIndices += line_index_size; - } - if(point_index_size) - { - memcpy(pIndices, PIBuffer, point_index_size * sizeof(u16)); - } - glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER); - } - else // could that happen? out-of-memory? - { - if(triangle_index_size) - { - triangle_index_size *= sizeof(u16); - glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, m_index_buffer_cursor, triangle_index_size, TIBuffer); - } - if(line_index_size) - { - line_index_size *= sizeof(u16); - glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, m_index_buffer_cursor + triangle_index_size, line_index_size, LIBuffer); - } - if(point_index_size) - { - point_index_size *= sizeof(u16); - glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, m_index_buffer_cursor + triangle_index_size + line_index_size, point_index_size, PIBuffer); - } + s_offset[2] = s_indexBuffer->Upload((u8*)PIBuffer, point_index_size * sizeof(u16)); } } @@ -193,23 +143,19 @@ void VertexManager::Draw(u32 stride) int triangle_index_size = IndexGenerator::GetTriangleindexLen(); int line_index_size = IndexGenerator::GetLineindexLen(); int point_index_size = IndexGenerator::GetPointindexLen(); - int StartIndex = m_index_buffer_cursor; - int basevertex = m_vertex_buffer_cursor / stride; if (triangle_index_size > 0) { - glDrawElementsBaseVertex(GL_TRIANGLES, triangle_index_size, GL_UNSIGNED_SHORT, (u8*)NULL+StartIndex, basevertex); - StartIndex += triangle_index_size * sizeof(u16); + glDrawElementsBaseVertex(GL_TRIANGLES, triangle_index_size, GL_UNSIGNED_SHORT, (u8*)NULL+s_offset[0], s_baseVertex); INCSTAT(stats.thisFrame.numIndexedDrawCalls); } if (line_index_size > 0) { - glDrawElementsBaseVertex(GL_LINES, line_index_size, GL_UNSIGNED_SHORT, (u8*)NULL+StartIndex, basevertex); - StartIndex += line_index_size * sizeof(u16); + glDrawElementsBaseVertex(GL_LINES, line_index_size, GL_UNSIGNED_SHORT, (u8*)NULL+s_offset[1], s_baseVertex); INCSTAT(stats.thisFrame.numIndexedDrawCalls); } if (point_index_size > 0) { - glDrawElementsBaseVertex(GL_POINTS, point_index_size, GL_UNSIGNED_SHORT, (u8*)NULL+StartIndex, basevertex); + glDrawElementsBaseVertex(GL_POINTS, point_index_size, GL_UNSIGNED_SHORT, (u8*)NULL+s_offset[2], s_baseVertex); INCSTAT(stats.thisFrame.numIndexedDrawCalls); } } @@ -362,9 +308,6 @@ void VertexManager::vFlush() } GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true); - m_index_buffer_cursor += (IndexGenerator::GetTriangleindexLen() + IndexGenerator::GetLineindexLen() + IndexGenerator::GetPointindexLen()) * sizeof(u16); - m_vertex_buffer_cursor += IndexGenerator::GetNumVerts() * stride; - ResetBuffer(); #if defined(_DEBUG) || defined(DEBUGFAST) if (g_ActiveConfig.iLog & CONF_SAVESHADERS) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.h b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.h index 4d820692b9..6a33799d98 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.h @@ -57,10 +57,6 @@ private: void Draw(u32 stride); void vFlush(); void PrepareDrawBuffers(u32 stride); - u32 m_vertex_buffer_cursor; - u32 m_vertex_buffer_size; - u32 m_index_buffer_cursor; - u32 m_index_buffer_size; NativeVertexFormat *m_CurrentVertexFmt; };