Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 20 Jan 2005
Offline Last Active May 01 2014 06:22 PM

Topics I've Started

The name of that floating-up fading number UI thingy?

19 March 2013 - 04:02 PM

When a numeric value appears above an opponent for the amount of damage you've done, and floats up slowly while fading out. Or when you gain XP, or earn money, or a myriad of other things. Is there a common name for this floating value thingy?

Mitigating the Effects of a Learning Curve

09 April 2012 - 07:38 PM

I'm a professional developer, but I find myself in a position where I'm using technologies, APIs, and languages that I have little experience with. Though I'm excited about the project, I'm honestly kind of dreading it. My project is a substantial one, and I'd like to do it right the first time. Are there any tips or tricks to help avoid making poor architectural and coding decisions, so I can avoid having to go back and redo things once I figure out the "proper way"? I have no problem with reading documentation and reference material, but it only gets you so far.

Distance between AABB (cube centered at origin) and a line segment

23 September 2011 - 05:53 PM

I've already got a test to determine that the line segment does not intersect with the cube, but now I need to determine the distance. I've got a few ideas, but I'm looking for the fastest known solution. Any suggestions?

Revisit D3D11 interop with Direct2D?

15 November 2010 - 05:58 PM

I just read this whole thread which was very informative, and I'm wondering if there is any new information on this since the thread is more than a year old. Ultimately, I want to use DirectWrite to draw text with SlimDX.Direct11. Unless there's something better now?

Lots of vector related questions

06 November 2010 - 09:58 AM

Essentially, I want to know the best (fastest) way to perform vector operations in C# (add, sub, dot, cross, etc). I'm using SlimDX. I discovered, using .Net reflector, that SlimDX implements vector operations directly, rather than passing them to DirectX (which is good). But the fact that I see this in the reflector's disassembler window:

public static Vector4 Add(Vector4 left, Vector4 right)
Vector4 vector;
vector.X = left.X + right.X;
vector.Y = left.Y + right.Y;
vector.Z = left.Z + right.Z;
vector.W = left.W + right.W;
return vector;

led me to believe (from experience with VC++/CLI) that the packed-single versions of the SSE instructions aren't used, and it instead does one scalar addition at a time. So I decide to get an actual x86 disassembly, and I'm disappointed to find this:

old-school FPU instructions!

It's not using SSE instructions AT ALL!

I have a library that uses packed-single SSE instructions to do the most common ops, and I wrote it using VC++ intrinsic functions. It is, of course, native. Problem here is that switching from .Net to native code incurs overhead (as I've seen from ANTS profiler and in benchmarks).

I've heard of SlimGen, and know that it was made by some of the same guys that work on SlimDX. I'm wondering, why doesn't SlimDX use SlimGen to inject (or however it works) SSE packed-single versions of the vector operations? I noticed SlimGen is for .Net 2.0. Is it not possible with .Net 4.0?

AND the last question! Unfortunately, most vectors I see in use aren't vec4, but vec3. I can't load/store the whole vec3 into an XMM register with one instruction (or can I?) without going over boundaries (MOVAPS is gonna move 16 bytes, but we only have 12). I'd rather avoid using a bunch of instructions to load and shuffle individual (or pairs of) floating point values. How can I best solve this problem? Convert everything to vec4? Just use scalar instructions?

Thanks in advance