Skip to content

Drop Render* prefix #7109

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

Closed
wants to merge 3 commits into from

Conversation

kurtkuehnert
Copy link
Contributor

Objective

  • alternative to Rename Render* to Gpu* #6968
  • Instead of changing the prefix of our reexported wgpu types from Render* to Gpu*, we omit them entirely.
  • This makes our API more in line with the wgpu one.
  • This change is only really viable if it is followed up by Separate bevy_gpu from bevy_render #7000 or a similar PR.
  • Example: RenderDevice -> Device, WgpuSettings -> Settings
  • With Separate bevy_gpu from bevy_render #7000 we can export these types at the root of the bevy_gpu crate. This allows for usages like this: gpu::Device if the type names should conflict.

Solution

  • Remove the Render* and Wgpu* prefixes of all wgpu related type names.
  • Remove the render_* and wgpu_* prefixes of all wgpu related variable names.

Changelog

  • Remove the Render* and Wgpu* prefixes of all wgpu related type names.
  • Remove the render_* and wgpu_* prefixes of all wgpu related variable names.

Migration Guide

You have to remove the Render* and Wgpu* prefixes of all wgpu related type names, as well as, the render_* and wgpu_* prefixes of all wgpu related variable names.

…ce, Context} to Gpu{Device, Queue, Adapter, AdapterInfo, Instance, Context}

renamed variable names render_{device, queue, adapter, adapter_info, instance, context} to gpu_{device, queue, adapter, adapter_info, instance, context}

renamed occurrences of the variable name `device` that refer to a `GPUDevice` to `gpu_device`

renamed occurrences of the variable name `queue` that refer to a `GPUQueue` to `gpu_queue`

type aliased GpuCommandEncoder
renamed GpuContext::command_encoder to GpuContext::gpu_command_encoder
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change X-Controversial There is active debate or serious implications around merging this PR labels Jan 6, 2023
@alice-i-cecile alice-i-cecile mentioned this pull request Oct 26, 2023
@alice-i-cecile alice-i-cecile added X-Contentious There are nontrivial implications that should be thought through and removed X-Controversial There is active debate or serious implications around merging this PR labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change X-Contentious There are nontrivial implications that should be thought through
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants