Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cneicy opened this issue Jul 6, 2024 · 3 comments
Open

Comments

@cneicy
Copy link

cneicy commented Jul 6, 2024

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
Copy link
Member

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

@cneicy cneicy closed this as completed Jul 6, 2024
@NogginBops
Copy link
Member

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

@NogginBops NogginBops reopened this Jul 6, 2024
@AncientTree
Copy link

Thanks for saving my time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants