Changing resolution in Direct3D9 *solved*

Started by
11 comments, last by utilae 19 years, 1 month ago
D3DXMatrixOrthoOffCenterLH(&Ortho2D,0,g_d3dpp.BackBufferWidth,g_d3dpp.BackBufferHeight,0,0.0,1.0);

If you want to use a 1024x768 virtual screen, then this won't do it. This will set the virtual coordinates to match your actual screen res, which isn't what you want (I think).

To be clear, what I think you want is to have all your objects laid out as if you have a 1024x768 display and if physically the display is actually 800x600, things should just be scaled accordingly. If that is the case, then rather than the backbuffer size, you should use 1024x768 in the line above.

If that's not what you wanted, then ignore everything I've said. :)
Stay Casual,KenDrunken Hyena
Advertisement
Quote:Original post by DrunkenHyena
To be clear, what I think you want is to have all your objects laid out as if you have a 1024x768 display and if physically the display is actually 800x600, things should just be scaled accordingly. If that is the case, then rather than the backbuffer size, you should use 1024x768 in the line above.

Yes, that is what I want. I changed the ortho projection to 1024x768 like you said, but I still have the problem of a 800x600 yellow area (my app) in a 1024x768 black area.

My windows screen resolution is 1152x864. My matrix is at 1024x768. My back buffer is at 800x600. So do I need to change my windows screen resolution some how and then change it back when the app exits (to fix my problem).

HTML5, iOS and Android Game Development using Corona SDK and moai SDK

Hi, I am still having the problem of a 800x600 yellow area (my app) in a 1024x768 black area.

Anyone got any ideas on this?

EDIT: Problem solved. It turns out that when the monitor is in a certain resolution for the first time, the screen needs to be adjusted.

[Edited by - utilae on March 15, 2005 11:44:36 PM]

HTML5, iOS and Android Game Development using Corona SDK and moai SDK

This topic is closed to new replies.

Advertisement