GraphicsDevice.setDeviceMode() & screen res

Hi guys,

GraphicsDevice.setDeviceMode() doesn’t behave quite as I expected it to. I thought that if I pass it a DeviceMode with width 800, height 600 that the screen resolution would change to those settings. (I do this from within full screen mode, and I’ve confirmed that the DeviceMode is available.) What actually happens is that after making the call, the border region of the screen goes black (normally I use 1600x1200), and there is a 800x600 region in the center which has my game. What I want is for the screen resolution to change to 800x600 so that the game takes up the whole screen.

Is there a way to do what I’m trying to do? If so, can anybody point me in the right direction?

Thanks,
Willie

i think you mean DisplayMode :wink:

Are you using a TFT display?
They normally just reduce the screen area, as the concept of resolution doesn’t realy apply in the same way.

Ah yes, you are right, I do mean setDisplayMode(). :slight_smile:

As far as TFT, I don’t know what that means. (I looked up the acronym and saw “Thin Film Transitor”.) My monitor is a laptop LCD monitor if that answers your question.

Other games on my laptop are able to accomplish the effect I see, though they aren’t Java games. For example Empire Earth does it. I assume it does it through DirectX and am wondering if I can do the same thing through Java. I assume the GraphicsDevice implementation that I’m using just makes DirectX calls anyway?

Anyway…

yeah, LCD/TFT/whatever :wink:

In my experience (which is very limited WRT laptops), changing resolution on TFT/LCD displays often gives very dodgy results
(especially if you are switching to a resolution that isn’t a clean division of the ‘normal resolution’,
e.g. 640x480 on a display designed for 1024x768 will look distorted, but 512x384 will be ok)

Try your app. on a CRT, I bet it works as expected.

I’m entirely sure Abuse was correct, and this is just your LCD settings.

Most modern 3d cards will use their built-in hardware for anti-aliasing/bilinear filtering/whatever to display lower resolutions using the full screen (actually I can remember lots of not-really-3d cards doing a similar thing, although not quite as smoothly). It’s like using a normal CRT - slightly blurry compared to the sharpness of an LCD.

On all GF cards it’s a graphics driver option, called something like “fullscreen zoom” in Display -> Advanced.

IIRC it’s not optional under linux on GF cards.

IMHO there’s no reason to have it turned off these days, assuming your card is fairly modern; their implementation is more than good enough for games (and it’s quite nice to get everything on your desktop anti-aliased in hardware :)).