Skip to content

Commit

Permalink
Fix the X11 example.
Browse files Browse the repository at this point in the history
  • Loading branch information
mackron committed Mar 10, 2023
1 parent 6f0c459 commit bf5b4e6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/01_Triangle/01_Triangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ int main(int argc, char** argv)

gl.glXMakeCurrent(pDisplay, windowX11, glbGetRC());

/* Set the initial viewport size. Use the size from the window. */
XWindowAttributes windowAttributes;
XGetWindowAttributes(pDisplay, windowX11, &windowAttributes);

/* Now set the viewport. */
glViewport(0, 0, windowAttributes.width, windowAttributes.height);

/* Loop. */
for (;;) {
if (XPending(pDisplay) > 0) {
Expand Down

0 comments on commit bf5b4e6

Please sign in to comment.