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

Add delta_time_seconds to a few renderers #628

Merged
merged 7 commits into from
Aug 30, 2024

Conversation

RobLoach
Copy link
Contributor

@RobLoach RobLoach commented Apr 2, 2024

This change adds delta_time_seconds to a few of the renderers. Would love some help on supporting some of the others.

  • allegro5
  • d3d11
  • d3d12
  • d3d9
  • gdi
  • gdi_native_nuklear
  • gdip
  • glfw_opengl2
  • glfw_opengl3
  • glfw_opengl4
  • glfw_vulkan
  • sdl2surface_rawfb
  • sdl_opengl2
  • sdl_opengl3
  • sdl_opengles2
  • sdl_renderer
  • sfml_opengl2
  • sfml_opengl3
  • wayland_rawfb
  • x11
  • x11_opengl2
  • x11_opengl3
  • x11_rawfb
  • wayland rawfb
  • sdl rawfb
  • x11_xft

Fixes #627

@RobLoach RobLoach force-pushed the delta_time_seconds branch from 5d4d93a to 6eaec7c Compare August 28, 2024 15:35
Comment on lines +78 to +79
Uint64 now = SDL_GetTicks64();
sdl.ctx.delta_time_seconds = (float)(now - sdl.time_of_last_frame) / 1000;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PROP65 What do you think of this pattern? Saves a bit of floating-point maths.

@RobLoach RobLoach marked this pull request as ready for review August 29, 2024 15:10
@RobLoach RobLoach merged commit f7847e6 into Immediate-Mode-UI:master Aug 30, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

Add delta_time_seconds to each renderer
1 participant