get_field_info is now static

This commit is contained in:
Carter Anderson 2020-03-22 13:08:20 -07:00
parent 0e18c4b70b
commit 08cd5964a4
3 changed files with 3 additions and 3 deletions

View File

@ -293,7 +293,7 @@ pub fn derive_uniforms(input: TokenStream) -> TokenStream {
});
impl bevy::render::shader::AsUniforms for #struct_name {
fn get_field_infos(&self) -> &[bevy::render::shader::FieldInfo] {
fn get_field_infos() -> &'static [bevy::render::shader::FieldInfo] {
#field_infos_ident
}

View File

@ -9,7 +9,7 @@ use crate::{
};
pub trait AsUniforms {
fn get_field_infos(&self) -> &[FieldInfo];
fn get_field_infos() -> &'static [FieldInfo];
fn get_uniform_bytes(&self, name: &str) -> Option<Vec<u8>>;
fn get_uniform_texture(&self, name: &str) -> Option<Handle<Texture>>;
fn get_shader_defs(&self) -> Option<Vec<String>>;

View File

@ -53,7 +53,7 @@ static VERTEX_BUFFER_DESCRIPTOR: Lazy<VertexBufferDescriptor> =
});
impl AsUniforms for bevy_transform::prelude::LocalToWorld {
fn get_field_infos(&self) -> &[FieldInfo] {
fn get_field_infos() -> &'static [FieldInfo] {
LOCAL_TO_WORLD_FIELD_INFOS
}