Fix an intel LG warning by orphaning text memory
authorDavid Gow <david@ingeniumdigital.com>
Sun, 1 Jun 2014 07:58:07 +0000 (15:58 +0800)
committerDavid Gow <david@ingeniumdigital.com>
Sun, 1 Jun 2014 07:58:07 +0000 (15:58 +0800)
bin/ipdf
src/graphicsbuffer.cpp
src/screen.cpp

index 1fb8dd3..e0fb8e8 100755 (executable)
Binary files a/bin/ipdf and b/bin/ipdf differ
index 750fc8b..37d9b12 100644 (file)
@@ -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);
 }
index a49fa08..6d67820 100644 (file)
@@ -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;
 }

UCC git Repository :: git.ucc.asn.au