Jump to content
Posted 27 January 2012 - 12:03 PM
Posted 27 January 2012 - 12:36 PM
Posted 27 January 2012 - 04:27 PM
You can render the backbuffer in the optimal resolution of your game (in your case 1024x768) and then use IDirect3DDevice9::StretchRect() method to scale the entire frame according your output resolution.
Posted 27 January 2012 - 04:33 PM
Posted 27 January 2012 - 05:10 PM
Posted 27 January 2012 - 11:57 PM
you need to setup your projection matrix in your own units, rather than pixels. Instead of specifying 640x480, you specify, for example 4.0x3.0, and everything else in your game (units movement, distance calculation, etc) must conform to that measurement you've set. That means a unit that moves at 4.0/sec will move across the screen in one second.
Posted 29 January 2012 - 04:44 AM
IDirect3DDevice9::StretchRect() method can be used to scale to both up-res and down-res. So you can stretch a 1024x768 screen to 640x480...
g_engine->p_device->CreateTexture(1024,768 1,D3DUSAGE_RENDERTARGET,D3DFMT_R5G6B5,D3DPOOL_DEFAULT,&this->p_RenderTexture,NULL); this->p_RenderTexture->GetSurfaceLevel(0,&this->p_RenderSurface);
Posted 29 January 2012 - 11:35 AM