Advertisement

OpenGL acts funny when I create a huge viewport...

Started by February 28, 2005 07:52 PM
3 comments, last by Mezmirous 19 years, 11 months ago
So I got tired of my stupid Windows XP screensaver, so I made a goal to create my own screensaver. I run a dual monitor system on a Radeon 7500 (crap, I know). I made a nify little OpenGL screensaver in C++, and used it for a while... I really liked it. It was running at 2048x768 resoultion just fine and smoothly. Recently, I decided to increase the resolution of my system to 2560x960 (two monitors running 1280x960)... and my screensaved stopped functioning properly. What's odd, is that I can see one little column of pixels on the far left side working. It's odd... the window is created fine and everything... both monitors turn completly black, except for that column of pixels on the far left. It's the screensaver... but it's only 1 column of pixels. I don't understand it. I've tried shrinking my viewport to not take up the whole window and that doesn't seem to do anything. Any input would be appreciated.
Sounds an awful lot like a hardware problem, probably triggered by going over the 2048 mark. You might be able to work around it by adjusting the glViewport and drawing the scene in two parts.

Failing that, you could create a full screen black window, then create a child window within that of not more than 2048 width for the OpenGL rendering.

It's possible that that won't work either if the hardware simply won't do 3D properly at that resolution, in which case you may have to make the screensaver adjust the resolution. I'd recommend making it black out the screen (again, no GL required) for a few seconds before changing the res, in case the user (ie, you) wants to jog the mouse and cancel it, because a res change can take a few seconds.
Advertisement
Quote:
Original post by posit
Sounds an awful lot like a hardware problem, probably triggered by going over the 2048 mark. You might be able to work around it by adjusting the glViewport and drawing the scene in two parts.

Failing that, you could create a full screen black window, then create a child window within that of not more than 2048 width for the OpenGL rendering.

It's possible that that won't work either if the hardware simply won't do 3D properly at that resolution, in which case you may have to make the screensaver adjust the resolution. I'd recommend making it black out the screen (again, no GL required) for a few seconds before changing the res, in case the user (ie, you) wants to jog the mouse and cancel it, because a res change can take a few seconds.


But I've created a viewport running at my old resolution, and it still doesn't work. I was expecting to create a viewport on a smaller resolution and just have a big black border... but it's just the same 1 column of pixels problem.

Also, I can't create 2 seperate viewports, since it's a screesaver - windows creates the window itself and then just gives me an hWnd to play with.
Have you checked your calculations for setting up the viewport (dimenstions)? A limitation of the used numeric type (integer types) for example?
Newbie programmers think programming is hard.Amature programmers think programming is easy.Professional programmers know programming is hard.
lol, if you're really in for some fun times you could just track idle-time in a stand-alone program, and create the full-screen GL window with two viewports. Of course you'de have to tell windows to shut up about launching the screen saver, but that's just a simple trip to the control panel.

Only thing I could think of.

This topic is closed to new replies.

Advertisement