Horde3D

Next-Generation Graphics Engine
It is currently 28.11.2024, 23:52

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: 08.09.2009, 21:46 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
There's a bug in Beta4, when cloning a geometry resource. In this case the cloned geometry data block is to big.

The following patch fixes this issue:

Code:
Index: egGeometry.cpp
===================================================================
--- egGeometry.cpp   (revision 188)
+++ egGeometry.cpp   (working copy)
@@ -59,9 +59,9 @@
 
    // Make a deep copy of the data
    res->_indexData = new char[_indexCount * _16BitIndices ? 2 : 4];
-   res->_vertPosData = new Vec3f[_vertCount * sizeof( Vec3f )];
-   res->_vertTanData = new Vec3f[_vertCount * sizeof( Vec3f ) * 3];
-   res->_vertStaticData = new VertexDataStatic[_vertCount * sizeof( VertexDataStatic )];
+   res->_vertPosData = new Vec3f[_vertCount];
+   res->_vertTanData = new Vec3f[_vertCount * 3];
+   res->_vertStaticData = new VertexDataStatic[_vertCount];
    memcpy( res->_indexData, _indexData, _indexCount * _16BitIndices ? 2 : 4 );
    memcpy( res->_vertPosData, _vertPosData, _vertCount * sizeof( Vec3f ) );
    memcpy( res->_vertTanData, _vertTanData, _vertCount * sizeof( Vec3f ) * 3 );


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group