From: David Gow Date: Sun, 1 Jun 2014 07:58:07 +0000 (+0800) Subject: Fix an intel LG warning by orphaning text memory X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=af1f07330cb8f4d448cc75ee720b633338eba1e8;p=ipdf%2Fcode.git Fix an intel LG warning by orphaning text memory --- diff --git a/bin/ipdf b/bin/ipdf index 1fb8dd3..e0fb8e8 100755 Binary files a/bin/ipdf and b/bin/ipdf differ diff --git a/src/graphicsbuffer.cpp b/src/graphicsbuffer.cpp index 750fc8b..37d9b12 100644 --- a/src/graphicsbuffer.cpp +++ b/src/graphicsbuffer.cpp @@ -100,6 +100,11 @@ void GraphicsBuffer::SetUsage(GraphicsBuffer::BufferUsage bufUsage) void GraphicsBuffer::Invalidate() { m_invalidated = true; + if (!m_buffer_shape_dirty) + { + // Orphan the block of memory we're pointing to. + Upload(m_buffer_size, nullptr); + } // Apparently not supported. //glInvalidateBufferData(m_buffer_handle); } diff --git a/src/screen.cpp b/src/screen.cpp index a49fa08..6d67820 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -425,6 +425,8 @@ void Screen::DebugFontFlush() glDisable(GL_BLEND); + m_debug_font_vertices.Invalidate(); + m_debug_font_indices.Invalidate(); m_debug_font_vertex_head = 0; m_debug_font_index_head = 0; }