OpenGL: C and D same code - different results

Bill Baxter dnewsgroup at billbaxter.com
Wed Feb 7 15:51:54 PST 2007


Lionello Lunesu wrote:
> No tips, since I'm pretty new at this myself, but I've just finished 
> translating nVidia's glsl_pseudo_instancing* sample from C++ to D, and 
> believe it or not, D's version is actually faster (albeit by a mere 1%).
> 
> That really surprised me, since the MSVC 2005 compiler is really good at 
> FPU stuff, plus that whole-program-optimization thing they have.
> 
> So I'm confident there must be something else going on in your case. A 
> literal translation to D should not cause big differences. Well, no 
> negative differences anyway ;)
> 
> By the way, the C++ version had many uninitialized variables. Thanks, 
> Walter, for making floats default to NaN. It's really easy to track the 
> source of a uninited variable this way!
> 
> L.
> 
> (*If anybody wants that app, just say it)


I'd be interested in seeing the code.

--bb



More information about the Digitalmars-d mailing list