0
\$\begingroup\$

I'm getting some odd lines on my screen in my program: issue

They seem to be in a static location on the screen and occur at regular intervals. They are also on the horizontal too but are harder to see in the image.

So far I have tried:

turning anti-aliasing off, turning multi-sampling off, rendering my images at full size (no scaling) and using texture sizes of a power of 2.

And none of that seems to work. Right now I am working on adding fonts in, but this issue means that lines of the fonts can disappear (the bottom of an 'o' the middle of a 'B' (so it looks like a 'D'), etc).

\$\endgroup\$
1
  • \$\begingroup\$ What kind of sampling filtering do you have enabled when drawing this? \$\endgroup\$ Commented May 11, 2014 at 13:32

1 Answer 1

2
\$\begingroup\$

A frequent cause of this is running in windowed mode, and making the back buffer a different size to the client area. D3D will automatically stretch the back buffer to fill the client area, but it doesn't do it with a good quality filter.

This is easily fixed either by using AdjustWindowRectEx() when creating the window, or by calling GetClientRect() to get the client area size when creating the back buffer.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ A simple answer that works, and it's not even my birthday. Thank you! :) \$\endgroup\$
    – Nexian
    Commented May 11, 2014 at 15:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .