Explorar el Código

Fixed a crash and memory leak on the ribbon code

OpenGL needs to unlock buffers on inverse order to work.
Anis hace 10 años
padre
commit
830ab77628
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      Engine/source/T3D/fx/ribbon.cpp

+ 3 - 3
Engine/source/T3D/fx/ribbon.cpp

@@ -672,9 +672,9 @@ void Ribbon::createBuffers(SceneRenderState *state, GFXVertexBufferHandle<GFXVer
    Point3F pointA = verts[count-1].point;
    Point3F pointB = verts[0].point;
 
-   verts.unlock();
    pb.unlock();
-
+   verts.unlock();
+ 
    Point3F diffSize = pointA - pointB;
 
    Box3F objBox;
@@ -704,4 +704,4 @@ void Ribbon::createBuffers(SceneRenderState *state, GFXVertexBufferHandle<GFXVer
    }
 
    mUpdateBuffers = false;
-}
+}