OSDN Git Service

Fixed non vbo rendering.
authorLatif Khalifa <latifer@streamgrid.net>
Thu, 21 Jul 2011 20:27:58 +0000 (20:27 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Thu, 21 Jul 2011 20:27:58 +0000 (20:27 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@999 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/GUI/Rendering/Rendering.cs

index 8c9d8a0..3d13151 100644 (file)
@@ -1949,6 +1949,7 @@ namespace Radegast.Rendering
                 if (!useVBO)\r
                 {\r
                     Vertex[] verts = face.Vertices.ToArray();\r
+                    ushort[] indices = face.Indices.ToArray();\r
 \r
                     unsafe\r
                     {\r
@@ -1958,7 +1959,7 @@ namespace Radegast.Rendering
                             GL.NormalPointer(NormalPointerType.Float, FaceData.VertexSize, (IntPtr)normalPtr);\r
                             GL.TexCoordPointer(2, TexCoordPointerType.Float, FaceData.VertexSize, (IntPtr)texPtr);\r
                             GL.VertexPointer(3, VertexPointerType.Float, FaceData.VertexSize, verts);\r
-                            GL.DrawElements(BeginMode.Triangles, data.Indices.Length, DrawElementsType.UnsignedShort, data.Indices);\r
+                            GL.DrawElements(BeginMode.Triangles, indices.Length, DrawElementsType.UnsignedShort, indices);\r
                         }\r
                     }\r
                 }\r