Performance with HardwareBuffer.writeData()

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Ephon
Gnoblar
Posts: 18
Joined: Tue Jan 18, 2005 8:33 pm

Performance with HardwareBuffer.writeData()

Post by Ephon »

Hi

Will there be much better performance with writing the buffer only once in one large chunk, than writing the buffer several times with small chunks, and just adjusting the offset for each write?
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Yes.. or use lock() to get the memory pointer and only write the areas that you want to change (if the buffer is really big and you only need to change some areas) then unlock() .

Multiple write calls is worst as it locks/unlocks the buffer multiple times.

But in general you want to overwrite the entire buffer, yes.
Ephon
Gnoblar
Posts: 18
Joined: Tue Jan 18, 2005 8:33 pm

Post by Ephon »

Ok, thanks