From: <jo...@us...> - 2003-09-10 20:51:25
|
Update of /cvsroot/crystal/CS/include/cstool In directory sc8-pr-cvs1:/tmp/cvs-serv30007/include/cstool Modified Files: rendermeshlist.h Log Message: - Jorrit did some code cleanup in the engine renderloop code. Also removed a few warnings. - Jorrit performed the following small optimizations in relation to the renderloop stuff: - Avoided a memory allocation of a transformation for every single technique. - Avoided a memory allocation of the callback structure every frame. - Changed csRenderMeshList::GetSortedMeshList() so that it now updates a csArray<csRenderMesh*> instead of returning a table that has to be deleted every time. This avoids a lot of memory allocation overhead. In the generic render step code we now maintain a permanent array (permanent for that step) to keep these meshes in. This avoids having to construct/grow the array all the time. Index: rendermeshlist.h =================================================================== RCS file: /cvsroot/crystal/CS/include/cstool/rendermeshlist.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rendermeshlist.h 10 Sep 2003 09:33:11 -0000 1.3 +++ rendermeshlist.h 10 Sep 2003 20:51:21 -0000 1.4 @@ -53,10 +53,9 @@ /** * Get a sorted list of meshes, sorted by renderpriority, and if needed - * do a sort within the RP. The array should be deleted by delete [] when - * you are finished with it. + * do a sort within the RP. */ - csRenderMesh** GetSortedMeshList (int &n); + void GetSortedMeshList (csArray<csRenderMesh*>& meshes); private: /// This struct contains one entry in the RP infoqueue |