Skip to content

Commit e3e8f74

Browse files
fix: fix issue with hard coded values
1 parent 65b6eb8 commit e3e8f74

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Velaptor/OpenGL/GLWindow.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,8 @@ private void Init(uint width, uint height)
420420
this.glInputContext.Mice[0].MouseMove += GLMouseMove_MouseMove;
421421
this.glInputContext.Mice[0].Scroll += GLMouseInput_MouseScroll;
422422

423-
// Manually invoke the resize to set the viewport
424-
// This will make sure that no strange issues occur during initialization.
425-
// One strange issue was without this line and a window size of exactly 1280 x 720,
426-
// all rendering would not occur. This prevents this issue from occurring.
427-
GLWindow_Resize(new Vector2D<int>(1280, 720));
423+
// Manually invoke the resize to update the rest of the system such as the viewport.
424+
GLWindow_Resize(new Vector2D<int>((int)width, (int)height));
428425

429426
this.appService.Init();
430427
}

0 commit comments

Comments
 (0)