You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, December 11th 2009, 8:32pm

Qt (+ openGL) + resolution

So, I need to make 800x600 output with my software (full screen).
Using QWiget::showFullScreen(); doesn't give you change to change display resolution to 800x600.

Is there way to (with openGL?) change display resolution from default to 800x600 (like most of the fullscreen games does)

Thanks for your replies.

2

Saturday, December 12th 2009, 3:31pm

As far as I can say, it is no object to OpenGL to define the resolution, it is supposed to be done by the windowmanager of your OS, but I might be wrong, I started learning OpenGL just ~1a ago.

Edit:
In case you mean the OpenGL resolution, just update the OpenGl viewport range.

3

Saturday, December 12th 2009, 5:14pm

I used winapi to change screen resolution, it works:

Source code

1
2
3
4
5
DEVMODE *dm=new DEVMODE();
EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,dm);
dm->dmPelsWidth=(unsigned long)800;
dm->dmPelsHeight=(unsigned long)600;
ChangeDisplaySettings(dm,CDS_FULLSCREEN);