OpenGL drawing area is smaller than inside area of window

Hello,
i am making a game and suddenly there appeared a bug with the window from nowhere. Or I just didn’t realise it was there before…

The drawing area of the window (where opengl things are drawn, I hope you know what I mean) is smaller than the inside area of the window. Here is a screenshot of the window:

[ATTACH=CONFIG]811[/ATTACH]

The padding between the drawing area and the inside border of the window is exactly as width as the border of the window. When I click inside the window, the action is also only recognized by the window procedure when i click inside the drawing area… I have no idea what is going on here. I tried to resize my window. I tried to change the width and height in glOrtho(…). I checked the window is not resized after opengl is initialized, so I have no more options I could try from my experience…

I hope somebody has an answer to this. Thank you in advance!

FandLa

Have you checked your glViewport call? By default it should be the size of your window, but you may be putting bad values in there (e.g by scaling down the return from a GetClientRect by the frame dimensions). Also perhaps check if you have scissor enabled.

Thank you for your answer.
It was caused by another problem: I didn’t return the value of DefWindowProc(…) in the window’s procedure. :doh:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.