Re: casting PositionNormalColored[] to byte[]
- From: Stephan Rose <kermos.remove.no.spam@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 02 Aug 2006 12:42:00 +0200
On 2 Aug 2006 03:13:29 -0700, flopturnriver@xxxxxxxxx wrote:
My first solution did indeed copy individually vertices to the buffer.
After that i did made that subset and passed it at once to the buffer.
That did made it much faster. But I want more... more FPS... ;-). And
because the copy is a performance penalty...
But isn't it possible with unsafe code? Because, in c++ terms, is see
that pncs is just a pointer to the beginning of an array of structures.
So why can't i make an byte[] pointer that has the same address?
Oh, why didn't they made the buffer.Write(PositionNormalColored[]
value, int offset, int count)!!!
Copying an array with 350 vertices is rather insignificant
performance-wise. If you want to avoid the Copy then structure your
data in such a way that you don't need to copy.
Also remember, premature optimization is not a good thing! Write your
engine, get it functional, then identify your bottlenecks and worry
about optimizing the things that truly need it.
.
- Follow-Ups:
- Re: casting PositionNormalColored[] to byte[]
- From: flopturnriver
- Re: casting PositionNormalColored[] to byte[]
- References:
- casting PositionNormalColored[] to byte[]
- From: flopturnriver
- Re: casting PositionNormalColored[] to byte[]
- From: Stephan Rose
- Re: casting PositionNormalColored[] to byte[]
- From: flopturnriver
- casting PositionNormalColored[] to byte[]
- Prev by Date: Re: casting PositionNormalColored[] to byte[]
- Next by Date: Re: casting PositionNormalColored[] to byte[]
- Previous by thread: Re: casting PositionNormalColored[] to byte[]
- Next by thread: Re: casting PositionNormalColored[] to byte[]
- Index(es):
Relevant Pages
|