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\$
  • \$\begingroup\$ What kind of sampling filtering do you have enabled when drawing this? \$\endgroup\$ – János Turánszki May 11 '14 at 13:32
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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.