Im trying to emulate NES PAR and i have problems.
What im doing is the following:
Im using StretchRect() as main d3d method to render since it supports Point Sampling and Linear interpolation:
- i got an offscreen surface of 256x240 where i render nes graphics -> off_screen
- 1 offscreen surface of 512x480 -> A
- 1 offscreen surface of 584x480 -> B
- Swapchain back buffer is 584 x 480 -> back_buffer
So i do:
The result?
It's not smooth neither horizontal nor vertical scrolling.
I think my resize window function it is well.
At window x > 1 its looks better, but it's not smooth neither.
Any help??
What im doing is the following:
Im using StretchRect() as main d3d method to render since it supports Point Sampling and Linear interpolation:
- i got an offscreen surface of 256x240 where i render nes graphics -> off_screen
- 1 offscreen surface of 512x480 -> A
- 1 offscreen surface of 584x480 -> B
- Swapchain back buffer is 584 x 480 -> back_buffer
So i do:
Code:
StretchRectRect(off_screen, 0, A,0, D3DTEXF_POINT); //Apply point sampling
StretchRectRect(A, 0, B,0, D3DTEXTF_LINEAR); //Apply Linear Interpolation
StretchRectRect(B, 0, back_buffer,0, D3DTEXTF_NONE); //Copy to back buffer
StretchRectRect(A, 0, B,0, D3DTEXTF_LINEAR); //Apply Linear Interpolation
StretchRectRect(B, 0, back_buffer,0, D3DTEXTF_NONE); //Copy to back buffer
The result?
It's not smooth neither horizontal nor vertical scrolling.
I think my resize window function it is well.
At window x > 1 its looks better, but it's not smooth neither.
Any help??