Just one comment about the content below. The C++ class example doesn't
fit the argument, as in unmanaged C++ you explicitly make your variables
reference or value based upon how you define them, allocate them, and
pass them around. The default is value if you don't define any pointers
or use any dereferencing operators.

Pete

___________________________________________________________________
 Pete Brown - Lead Systems Architect, MCSD 5, 6; MCAD .NET
 Applied Information Sciences, Inc. - Greenbelt, MD
 Personal Site: http://www.irritatedVowel.com
   (.net, wallpaper, games, model railroading, birds, photography)

-----Original Message-----
From: Unmoderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Frans Bouma
Sent: Monday, May 17, 2004 4:19 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Large structures

> Taken
> 
> But in this particular case, being heavy matrix opreations in 
> 3d, this kills your performance.

        If you want performance, write a shader and do your matrix
manipulations on the GPU or call into a C++ matrix lib. I also don't
really see why classes would kill performance really. Admitted, in C++ I
used structs for coordinates and some own written math lib for working
with those structs, however a struct is a class in C++ anyway (they're
synonyms, IIRC) so why would:

public class Vertex3
{
        public float X;
        public float Y;
        public float Z;
}

        be slow in .NET? Graphic programming can only be done fast if
you parallellize operations by delegating the tasks to specialized
units, often a library written to do a given kind of operation really
fast (optimized math lib) or for example a DX helper lib, or better: a
shader which does manipulation of your data down the pipe in hardware. I
don't think 3D vector math in C# will be that performant over a C++
version. 


[snip]

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to