go-gl/gl

Resizing window does not adjust relative coordinates

Closed this issue · 2 comments

So I have a simple triangle geometry like so

+0.0, +0.5, +0.0, // Top
+0.5, -0.5, +0.0,  // Bottom Right
-0.5, -0.5, +0.0,   // Bottom Left

When I first run the program the shape is render as expected.
n

However when I resize the window by either the width or height it appears the origin is no longer centered in the window.

w
h

I expect that the triangle should stay centered in the screen, as the geometry is specified in relative coordinates.

I am not sure what is causing the observed behavior, gl or glfw. Any suggestions as to what is causing this?

@jeff-emanuel Thanks, you were right. I have never used glfw to create a window, and I didn't know that you would need to set up that up also.