mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
rename vertex_buffer to instanceable
This commit is contained in:
parent
0ba48ed83a
commit
62d1e710a5
3 changed files with 7 additions and 7 deletions
|
@ -40,7 +40,7 @@ struct UniformAttributeArgs {
|
|||
#[darling(default)]
|
||||
pub shader_def: Option<bool>,
|
||||
#[darling(default)]
|
||||
pub vertex_buffer: Option<bool>,
|
||||
pub instanceable: Option<bool>,
|
||||
}
|
||||
|
||||
#[proc_macro_derive(Uniforms, attributes(uniform))]
|
||||
|
@ -139,10 +139,10 @@ pub fn derive_uniforms(input: TokenStream) -> TokenStream {
|
|||
texture_and_sampler_name_strings.push(sampler.clone());
|
||||
texture_and_sampler_name_idents.push(f.ident.clone());
|
||||
texture_and_sampler_name_idents.push(f.ident.clone());
|
||||
let is_vertex_buffer_member = match attrs {
|
||||
let is_instanceable = match attrs {
|
||||
Some(attrs) => {
|
||||
match attrs.vertex_buffer {
|
||||
Some(vertex_buffer) => vertex_buffer,
|
||||
match attrs.instanceable {
|
||||
Some(instanceable) => instanceable,
|
||||
None => false,
|
||||
}
|
||||
},
|
||||
|
@ -153,7 +153,7 @@ pub fn derive_uniforms(input: TokenStream) -> TokenStream {
|
|||
uniform_name: #uniform,
|
||||
texture_name: #texture,
|
||||
sampler_name: #sampler,
|
||||
is_vertex_buffer_member: #is_vertex_buffer_member,
|
||||
is_instanceable: #is_instanceable,
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ pub struct FieldInfo {
|
|||
pub uniform_name: &'static str,
|
||||
pub texture_name: &'static str,
|
||||
pub sampler_name: &'static str,
|
||||
pub is_vertex_buffer_member: bool,
|
||||
pub is_instanceable: bool,
|
||||
}
|
||||
|
||||
pub trait AsFieldBindType {
|
||||
|
|
|
@ -13,7 +13,7 @@ const LOCAL_TO_WORLD_FIELD_INFOS: &[FieldInfo] = &[FieldInfo {
|
|||
uniform_name: "Object",
|
||||
texture_name: "",
|
||||
sampler_name: "",
|
||||
is_vertex_buffer_member: false,
|
||||
is_instanceable: false,
|
||||
}];
|
||||
|
||||
impl AsUniforms for bevy_transform::prelude::LocalToWorld {
|
||||
|
|
Loading…
Reference in a new issue