• Advertisement
Sign in to follow this  

Accurate Texture Rendering When Stretching Window

This topic is 1808 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

I created a Nintendo Emulator using DirectX. And how I plotted the pixels was to create a texture using D3DXCreateTexture so I don't use a file, locked the texture, copied the array to the texture and unlocked. Just one problem. When I created the texture using D3DXCreateTexture, I had no choice but to make the size 256 x 256 since the NES's resolution is 256x240. Any bigger and I'll end up seeing weird anomalies such as double screen squashed up on top. Now as for the polygon size, it's perfect at 256 x 256, 512x512, etc. but if I make it any other size, it stretches the pixels weird and doesn't look right. Like a pixelated atari version of Mario. Ive messed with other NES emulators where stretching was perfect no matter what size and was wondering if I'm lacking a certain filter or setting to where it'll be perfect no matter what I stretch it to. Thanks in advance.

 

Also note I'm only currently using this:

 

    Device.SetTextureStageState 0, D3DTSS_MINFILTER, D3DTEXF_POINT
    Device.SetTextureStageState 0, D3DTSS_MAGFILTER, D3DTEXF_POINT

Edited by Psychopathetica

Share this post


Link to post
Share on other sites
Advertisement

You could try.

 

In your window message loop call Device->Reset on  "Resize" or "SizeChanged" and make sure you change the backbuffer width and height to the updated width and height of your window.

Share this post


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

  • Advertisement