Black Bar on right and bottom

There is a black bar on both the right side and(or) the bottom side of my view window if the background of the view window is white. Any one has any idea about this problem, please let me know. Of course, the picture we draw in view is using OpenGL. Thanks a lot!

Use a call to glViewport to match the OpenGL viewport dimension to the size of the window which contains it.

Yeah. I did this. The problem is that this problem is not always there. It happens in some computers especially on lab tops. Is the problem related to the video card?

I’m not completely sure about this, but i had a similar problem some time ago, and found it was caused by the window’s borders. Ie when you create a 640x480 window with a caption and a few pixels border, the viewport is lesser than 640x480. I had to increase the requested window size to fix that.

Y.

http://support.microsoft.com/support/kb/articles/Q272/2/22.ASP

Thank you all for your suggestions. I will try them.