Nux

Merge lp:~unity-team/nux/nux.static-buffer-hint into lp:nux/2.0

Proposed by Jay Taoko
Status: Merged
Approved by: Jay Taoko
Approved revision: 595
Merged at revision: 595
Proposed branch: lp:~unity-team/nux/nux.static-buffer-hint
Merge into: lp:nux/2.0
Diff against target: 21 lines (+2/-2)
1 file modified
NuxGraphics/GLVertexResourceManager.cpp (+2/-2)
To merge this branch: bzr merge lp:~unity-team/nux/nux.static-buffer-hint
Reviewer Review Type Date Requested Status
Jay Taoko (community) Approve
Review via email: mp+97111@code.launchpad.net

Description of the change

* Using static vertex buffer hints.

To post a comment you must log in.
Revision history for this message
Jay Taoko (jaytaoko) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NuxGraphics/GLVertexResourceManager.cpp'
2--- NuxGraphics/GLVertexResourceManager.cpp 2012-02-18 21:32:06 +0000
3+++ NuxGraphics/GLVertexResourceManager.cpp 2012-03-12 22:05:22 +0000
4@@ -263,7 +263,7 @@
5
6 //Release the previous vertex buffer if any.
7 _vertex_buffer.Release();
8- _vertex_buffer = GetGraphicsDisplay()->GetGpuDevice()->CreateVertexBuffer(_Size, VBO_USAGE_DYNAMIC);
9+ _vertex_buffer = GetGraphicsDisplay()->GetGpuDevice()->CreateVertexBuffer(_Size, VBO_USAGE_STATIC);
10 LoadVertexData(SourceVtxBuffer);
11 }
12 else
13@@ -351,7 +351,7 @@
14
15 //Release the previous vertex buffer if any.
16 _index_buffer.Release();
17- _index_buffer = GetGraphicsDisplay()->GetGpuDevice()->CreateIndexBuffer(_Size, VBO_USAGE_DYNAMIC,
18+ _index_buffer = GetGraphicsDisplay()->GetGpuDevice()->CreateIndexBuffer(_Size, VBO_USAGE_STATIC,
19 (SourceIdxBuffer->GetStride() == 2) ? INDEX_FORMAT_USHORT : INDEX_FORMAT_UINT);
20 LoadIndexData(SourceIdxBuffer);
21 }

Subscribers

People subscribed via source and target branches

to all changes: