• Advertisement
Sign in to follow this  

Wondering why everything is running so slow...

This topic is 1311 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I was casually tweaking some stuff, and suddely the performance dropped like hell, so i decided to look into it, and this popped up:

 

287mck1.png 1526087.jpg

 

Anyone else had stuff go that wrong?

 

-MIGI0027

Share this post


Link to post
Share on other sites
Advertisement

Sort of, I had things just not work, and I tracked it down to this:

pD2DGaussianBlurEffect->SetValue(D2D1_GAUSSIANBLUR_PROP_STANDARD_DEVIATION, 3);

Seems simple enough right?  Nothing scary there.  Well silly me not checking HRESULTS for this sample code.  You see, that function is a generic set property function that can take anything.  And you see, that's supposed to be a floating point number.  Rather than do the sane thing, and just not set the value and keep the old one, the effect gets flagged as invalid, which causes it to not render.

 

The true moral of the story is to always check your HRESULTs, but it still irks me how that operates.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement