<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I did several patches about D3DXMAtrixStack. All were uncorrect.<br><br>The idea of Henri to implement it is this one:<br>it is very time -comsumming to allocate or to free memory. So one needs to do that as less as possible.<br><br>So, we start with a stack with predefined size. When the stack is full, one multiplies by 2 its size. When one releases items enough of the stack, one divides its size by 2.<br><br>Here are patches that implemented that idea.<br><br>When looking at your patch, I saw that in my patch, in the D3dxMatrixstackImpl_release function, I do not free the memory of the array of matrix. It should be done.<br><br>In the tests patch, I did not check if d3dxmatrixstackcreate fails. If it fails, tests should be skipped. At the end of the test, I did not call the _Release function. It should be done too.<br><br>Maybe, you should use these patches
 and try to improve them.<br><br>All the tests passed on my Windows XP box.<br><br>David<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><jeje@jeje-desktop.(none)><pre></pre></jeje@jeje-desktop.(none)></blockquote></td></tr></table><br>