Jump to content

  • Log In with Google      Sign In   
  • Create Account


Accurate Texture Rendering When Stretching Window


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Psychopathetica   Members   -  Reputation: 186

Like
0Likes
Like

Posted 09 February 2013 - 12:43 PM

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, 09 February 2013 - 12:51 PM.


Sponsor:

#2 MichaelNIII   Members   -  Reputation: 195

Like
0Likes
Like

Posted 10 February 2013 - 09:22 PM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS