opentk / LearnOpenTK

A port of learnopengl.com's tutorials to OpenTK and C#.
Creative Commons Attribution 4.0 International
461 stars 115 forks source link

Parameter of the OnFramebufferResize method in Chapter 1/2 is wrong #95

Open cneicy opened 3 months ago

cneicy commented 3 months ago

OpenTK4 https://opentk.net/learn/chapter1/2-hello-triangle.html?tabs=onload-opentk4%2Conrender-opentk4%2Cresize-opentk4#some-new-functions What in sample is

protected override void OnFramebufferResize(ResizeEventArgs e)
{
    base.OnFramebufferResize(e);

    GL.Viewport(0, 0, e.Width, e.Height);
}

but the parameter in source is

protected virtual void OnFramebufferResize(FramebufferResizeEventArgs e)
{
  Action<FramebufferResizeEventArgs> framebufferResize = this.FramebufferResize;
  if (framebufferResize == null)
      return;
  framebufferResize(e);
}
NogginBops commented 3 months ago

Thanks for the report! Will fix when I get to fixing website stuff.

NogginBops commented 3 months ago

I'd like to keep this open until I've actually fixed the issue :)

AncientTree commented 3 months ago

Thanks for saving my time.