I have just started using JOGL, and am using it to draw images in 2d using the glOrtho function. My problem is that the first 25 horizontal lines of pixels are drawn out of the frame. So if I were to draw something at (0, 0) it wouldn’t be shown. Does anyone know how to fix this?
So when you say (0, 0) do you mean top left or bottom left? If it’s the former, is it possible that you’re drawing under the window’s title bar? If it’s the later I really have no idea.
Top left, but even when I set the frame to undecorated the problem still exists.
Are you accounting for the difference in (0,0) for opengl. I believe that for rastering and texturing, the origin is the bottom left and the image extends up and to the right (instead of down/right).
No, (0, 0) is at top left. I don’t know why that is. I can do a quick “band-aid” fix by using glTranslate(0.0, 25, 0.0) before I draw anything. However, I would prefer not to use this method, so if anyone figures this problem out please post. Thanks!