Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
In your example OpenGL app that is created when you create a new opengl project you have a function called OnRenderFrame. It takes a FrameEventArgs parameter. This parameter is not set or has some other problem. The parameter is called "e" so if I inspect e.Time int the debugger I get a really large number or a really small number. This works correctly in the OnUpdateFrame function.
If OnRenderFrame is not supposed to get a FrameEventArgs then please remove it from the default code to avoid confusion.
If the parameter is supposed to be set then please figure out why it is not.
In case it matters I've been testing on my Xoom.
OnRenderFrame is supposed to get a FrameEventArgs parameter. Can you elaborate on what you mean by "is not set"?
@Ben: Via Comment #0:
> The parameter is called "e" so if I inspect e.Time int the debugger I get
> a really large number or a really small number.
In this context, then, "not set" or "empty" means that FrameEventArgs.Time is 0 (or very close to 0).
That said, a value "very close to 0" may in fact be appropriate:
> Gets a double that indicates how many seconds of time elapsed since the previous event.
At 60 frames/second, e.Time should be 0.016. However, IIRC it's possible to ask OpenTK to render frames "as fast as possible", in which case values less than 0.016 should be expected.
Furthermore, if you do have this stuck in a debugger, it would not be surprising for "very large values" from e.Time if the debugger had stopped the world for "a long time."
Though this could likewise be a debugger bug, e.g. Bug #1949 (among other's, IIRC).
I just created OpenGL project for Unified API and observed behaviour looks good for me.
I set breakpoint inside:
protected override void OnRenderFrame (FrameEventArgs e)
and e.Time is always equals 0. This is correct, because this method called from another method like this:
void DrawFrame ()
OnRenderFrame (new FrameEventArgs ());
So I can't reproduce "get a really large number or a really small number", because of this I am going to close this issue. If you still have any troubles with this issue, just reopen it.