Skip to content

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

@cneicy

Description

@cneicy

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions