ShaderRepositoryApi

Struct ShaderRepositoryApi 

Source
#[repr(C)]
pub struct ShaderRepositoryApi {
Show 31 fields pub create: Option<unsafe extern "C" fn(system_io: *mut ShaderSystemIoO, a: *mut AllocatorI, backend: *mut RendererBackendI, shader_compiler_api: *mut RendererShaderCompilerApi, tt: *mut TheTruthO) -> *mut ShaderRepositoryO>, pub destroy: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, resource_buffer: *mut RendererResourceCommandBufferO)>, pub set_the_truth: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, tt: *mut TheTruthO)>, pub create_truth_types: Option<unsafe extern "C" fn(tt: *mut TheTruthO)>, pub import_truth_declaration_from_config: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, config: *const ConfigI, pi: *const JsonParseInfoT, name: StrhashT, validity_hash: u64, time_stamp: *const FileTimeO, filename: *const c_char) -> TtIdT>, pub destroy_truth_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT)>, pub lookup_truth_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> TtIdT>, pub lookup_declaration_validity_hash: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, id: TtIdT) -> u64>, pub load_shader_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, declaration: *mut ShaderDeclarationO, id: TtIdT)>, pub last_modified: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, id: TtIdT, modified: *mut FileTimeO)>, pub host_save_state: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, carray: *mut *mut c_char, a: *mut AllocatorI)>, pub client_load_state: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, tt: *mut TheTruthO, state: *mut *const c_char)>, pub create_shader_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, a: *mut AllocatorI) -> *mut ShaderDeclarationO>, pub destroy_shader_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, declaration: *mut ShaderDeclarationO)>, pub generate_system_includes: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, output_path: *const c_char)>, pub update_shaders_from_directory: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, dir: *const c_char, recursive: bool, allocator: *mut AllocatorI, res_buf: *mut RendererResourceCommandBufferO)>, pub allocator: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO) -> *mut AllocatorI>, pub refresh_truth_shaders: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO)>, pub lookup_or_create_shader: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderO>, pub lookup_or_create_system: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderSystemO>, pub create_shader_from_blob: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, res_buf: *mut RendererResourceCommandBufferO, shader_blob: *const ShaderBlobHeaderT) -> *mut ShaderO>, pub compile_shader: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, res_buf: *mut RendererResourceCommandBufferO, shader: *mut ShaderO, active_shader_stages: u32, active_systems_bitmask: u64, active_system_names: *const StrhashT, active_systems: *mut *const ShaderDeclarationO, num_active_systems: u32, declarations: *mut *const ShaderDeclarationO, num_declarations: u32, validity_hash: u64) -> bool>, pub create_from_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, res_buf: *mut RendererResourceCommandBufferO, declaration: TtIdT, name: StrhashT, generated_code: *mut ShaderDeclarationO, creation_graph_data: *const ShaderCreationGraphDataO) -> bool>, pub background_create_from_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, declaration: TtIdT, name: StrhashT, generated_code: *mut ShaderDeclarationO, creation_graph_data: *const ShaderCreationGraphDataO, callback: *const ShaderSystemBackgroundCreateI)>, pub destroy_shader: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT)>, pub destroy_system: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT)>, pub lookup_shader: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderO>, pub lookup_system: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderSystemO>, pub recycle_resources: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO)>, pub shader_state_override: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, state_override: ShaderStateOverrides) -> RendererHandleT>, pub lookup_shader_blob: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT, size: *mut u64) -> *const ShaderBlobHeaderT>,
}

Fields§

§create: Option<unsafe extern "C" fn(system_io: *mut ShaderSystemIoO, a: *mut AllocatorI, backend: *mut RendererBackendI, shader_compiler_api: *mut RendererShaderCompilerApi, tt: *mut TheTruthO) -> *mut ShaderRepositoryO>§destroy: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, resource_buffer: *mut RendererResourceCommandBufferO)>§set_the_truth: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, tt: *mut TheTruthO)>§create_truth_types: Option<unsafe extern "C" fn(tt: *mut TheTruthO)>§import_truth_declaration_from_config: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, config: *const ConfigI, pi: *const JsonParseInfoT, name: StrhashT, validity_hash: u64, time_stamp: *const FileTimeO, filename: *const c_char) -> TtIdT>§destroy_truth_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT)>§lookup_truth_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> TtIdT>§lookup_declaration_validity_hash: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, id: TtIdT) -> u64>§load_shader_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, declaration: *mut ShaderDeclarationO, id: TtIdT)>§last_modified: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, id: TtIdT, modified: *mut FileTimeO)>§host_save_state: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, carray: *mut *mut c_char, a: *mut AllocatorI)>§client_load_state: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, tt: *mut TheTruthO, state: *mut *const c_char)>§create_shader_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, a: *mut AllocatorI) -> *mut ShaderDeclarationO>§destroy_shader_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, declaration: *mut ShaderDeclarationO)>§generate_system_includes: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, output_path: *const c_char)>§update_shaders_from_directory: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, dir: *const c_char, recursive: bool, allocator: *mut AllocatorI, res_buf: *mut RendererResourceCommandBufferO)>§allocator: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO) -> *mut AllocatorI>§refresh_truth_shaders: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO)>§lookup_or_create_shader: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderO>§lookup_or_create_system: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderSystemO>§create_shader_from_blob: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, res_buf: *mut RendererResourceCommandBufferO, shader_blob: *const ShaderBlobHeaderT) -> *mut ShaderO>§compile_shader: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, res_buf: *mut RendererResourceCommandBufferO, shader: *mut ShaderO, active_shader_stages: u32, active_systems_bitmask: u64, active_system_names: *const StrhashT, active_systems: *mut *const ShaderDeclarationO, num_active_systems: u32, declarations: *mut *const ShaderDeclarationO, num_declarations: u32, validity_hash: u64) -> bool>§create_from_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, res_buf: *mut RendererResourceCommandBufferO, declaration: TtIdT, name: StrhashT, generated_code: *mut ShaderDeclarationO, creation_graph_data: *const ShaderCreationGraphDataO) -> bool>§background_create_from_declaration: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, declaration: TtIdT, name: StrhashT, generated_code: *mut ShaderDeclarationO, creation_graph_data: *const ShaderCreationGraphDataO, callback: *const ShaderSystemBackgroundCreateI)>§destroy_shader: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT)>§destroy_system: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT)>§lookup_shader: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderO>§lookup_system: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderSystemO>§recycle_resources: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO)>§shader_state_override: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, state_override: ShaderStateOverrides) -> RendererHandleT>§lookup_shader_blob: Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT, size: *mut u64) -> *const ShaderBlobHeaderT>

Implementations§

Source§

impl ShaderRepositoryApi

Source

pub unsafe fn create( &self, system_io: *mut ShaderSystemIoO, a: *mut AllocatorI, backend: *mut RendererBackendI, shader_compiler_api: *mut RendererShaderCompilerApi, tt: *mut TheTruthO, ) -> *mut ShaderRepositoryO

Source

pub unsafe fn destroy( &self, inst: *mut ShaderRepositoryO, resource_buffer: *mut RendererResourceCommandBufferO, )

Source

pub unsafe fn set_the_truth( &self, inst: *mut ShaderRepositoryO, tt: *mut TheTruthO, )

Source

pub unsafe fn create_truth_types(&self, tt: *mut TheTruthO)

Source

pub unsafe fn import_truth_declaration_from_config( &self, inst: *mut ShaderRepositoryO, config: *const ConfigI, pi: *const JsonParseInfoT, name: StrhashT, validity_hash: u64, time_stamp: *const FileTimeO, filename: *const c_char, ) -> TtIdT

Source

pub unsafe fn destroy_truth_declaration( &self, inst: *mut ShaderRepositoryO, name: StrhashT, )

Source

pub unsafe fn lookup_truth_declaration( &self, inst: *mut ShaderRepositoryO, name: StrhashT, ) -> TtIdT

Source

pub unsafe fn lookup_declaration_validity_hash( &self, inst: *mut ShaderRepositoryO, id: TtIdT, ) -> u64

Source

pub unsafe fn load_shader_declaration( &self, inst: *mut ShaderRepositoryO, declaration: *mut ShaderDeclarationO, id: TtIdT, )

Source

pub unsafe fn last_modified( &self, inst: *mut ShaderRepositoryO, id: TtIdT, modified: *mut FileTimeO, )

Source

pub unsafe fn host_save_state( &self, inst: *mut ShaderRepositoryO, carray: *mut *mut c_char, a: *mut AllocatorI, )

Source

pub unsafe fn client_load_state( &self, inst: *mut ShaderRepositoryO, tt: *mut TheTruthO, state: *mut *const c_char, )

Source

pub unsafe fn create_shader_declaration( &self, inst: *mut ShaderRepositoryO, a: *mut AllocatorI, ) -> *mut ShaderDeclarationO

Source

pub unsafe fn destroy_shader_declaration( &self, inst: *mut ShaderRepositoryO, declaration: *mut ShaderDeclarationO, )

Source

pub unsafe fn generate_system_includes( &self, inst: *mut ShaderRepositoryO, output_path: *const c_char, )

Source

pub unsafe fn update_shaders_from_directory( &self, inst: *mut ShaderRepositoryO, dir: *const c_char, recursive: bool, allocator: *mut AllocatorI, res_buf: *mut RendererResourceCommandBufferO, )

Source

pub unsafe fn allocator(&self, inst: *mut ShaderRepositoryO) -> *mut AllocatorI

Source

pub unsafe fn refresh_truth_shaders(&self, inst: *mut ShaderRepositoryO)

Source

pub unsafe fn lookup_or_create_shader( &self, inst: *mut ShaderRepositoryO, name: StrhashT, ) -> *mut ShaderO

Source

pub unsafe fn lookup_or_create_system( &self, inst: *mut ShaderRepositoryO, name: StrhashT, ) -> *mut ShaderSystemO

Source

pub unsafe fn create_shader_from_blob( &self, inst: *mut ShaderRepositoryO, res_buf: *mut RendererResourceCommandBufferO, shader_blob: *const ShaderBlobHeaderT, ) -> *mut ShaderO

Source

pub unsafe fn compile_shader( &self, inst: *mut ShaderRepositoryO, res_buf: *mut RendererResourceCommandBufferO, shader: *mut ShaderO, active_shader_stages: u32, active_systems_bitmask: u64, active_system_names: *const StrhashT, active_systems: *mut *const ShaderDeclarationO, num_active_systems: u32, declarations: *mut *const ShaderDeclarationO, num_declarations: u32, validity_hash: u64, ) -> bool

Source

pub unsafe fn create_from_declaration( &self, inst: *mut ShaderRepositoryO, res_buf: *mut RendererResourceCommandBufferO, declaration: TtIdT, name: StrhashT, generated_code: *mut ShaderDeclarationO, creation_graph_data: *const ShaderCreationGraphDataO, ) -> bool

Source

pub unsafe fn background_create_from_declaration( &self, inst: *mut ShaderRepositoryO, declaration: TtIdT, name: StrhashT, generated_code: *mut ShaderDeclarationO, creation_graph_data: *const ShaderCreationGraphDataO, callback: *const ShaderSystemBackgroundCreateI, )

Source

pub unsafe fn destroy_shader( &self, inst: *mut ShaderRepositoryO, name: StrhashT, )

Source

pub unsafe fn destroy_system( &self, inst: *mut ShaderRepositoryO, name: StrhashT, )

Source

pub unsafe fn lookup_shader( &self, inst: *mut ShaderRepositoryO, name: StrhashT, ) -> *mut ShaderO

Source

pub unsafe fn lookup_system( &self, inst: *mut ShaderRepositoryO, name: StrhashT, ) -> *mut ShaderSystemO

Source

pub unsafe fn recycle_resources(&self, inst: *mut ShaderRepositoryO)

Source

pub unsafe fn shader_state_override( &self, inst: *mut ShaderRepositoryO, state_override: ShaderStateOverrides, ) -> RendererHandleT

Source

pub unsafe fn lookup_shader_blob( &self, inst: *mut ShaderRepositoryO, name: StrhashT, size: *mut u64, ) -> *const ShaderBlobHeaderT

Trait Implementations§

Source§

impl Api for ShaderRepositoryApi

Source§

impl Clone for ShaderRepositoryApi

Source§

fn clone(&self) -> ShaderRepositoryApi

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for ShaderRepositoryApi

Source§

fn default() -> ShaderRepositoryApi

Returns the “default value” for a type. Read more
Source§

impl Copy for ShaderRepositoryApi

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.