aboutsummaryrefslogtreecommitdiffhomepage
path: root/optix_base
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2021-02-27 20:55:19 +0100
committerAndrzej Janik <[email protected]>2024-02-11 20:45:51 +0100
commit1b9ba2b2333746c5e2b05a2bf24fa6ec3828dcdf (patch)
tree0b77ca4a41d4f232bd181e2bddc886475c608784 /optix_base
parent60d2124a16a7a2a1a6be3707247afe82892a4163 (diff)
downloadZLUDA-3.tar.gz
ZLUDA-3.zip
Nobody expects the Red Teamv3
Too many changes to list, but broadly: * Remove Intel GPU support from the compiler * Add AMD GPU support to the compiler * Remove Intel GPU host code * Add AMD GPU host code * More device instructions. From 40 to 68 * More host functions. From 48 to 184 * Add proof of concept implementation of OptiX framework * Add minimal support of cuDNN, cuBLAS, cuSPARSE, cuFFT, NCCL, NVML * Improve ZLUDA launcher for Windows
Diffstat (limited to 'optix_base')
-rw-r--r--optix_base/Cargo.toml14
-rw-r--r--optix_base/README2
-rw-r--r--optix_base/include/wrapper.hpp2
-rw-r--r--optix_base/include/wrapper6.hpp6
-rw-r--r--optix_base/src/lib.rs316
-rw-r--r--optix_base/src/optix.rs3381
-rw-r--r--optix_base/src/optix6.rs16049
7 files changed, 19770 insertions, 0 deletions
diff --git a/optix_base/Cargo.toml b/optix_base/Cargo.toml
new file mode 100644
index 0000000..45ab8c8
--- /dev/null
+++ b/optix_base/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+name = "optix_base"
+version = "0.0.0"
+authors = ["Andrzej Janik <[email protected]>"]
+edition = "2018"
+
+[lib]
+proc-macro = true
+
+[dependencies]
+quote = "1.0"
+syn = { version = "1.0.93", features = ["full", "visit", "visit-mut"] }
+proc-macro2 = "1.0"
+rustc-hash = "1.1"
diff --git a/optix_base/README b/optix_base/README
new file mode 100644
index 0000000..9d1e1d6
--- /dev/null
+++ b/optix_base/README
@@ -0,0 +1,2 @@
+bindgen include/wrapper.hpp -o src/optix.rs --no-layout-tests --size_t-is-usize --default-enum-style=newtype --no-derive-debug --whitelist-type="Optix.*" --whitelist-function "optix.*" --whitelist-var "OPTIX.*" -- -I"F:\dev\OptiX SDK 7.4.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\include
+bindgen include/wrapper6.hpp -o src/optix6.rs --new-type-alias=RTobject --no-layout-tests --size_t-is-usize --default-enum-style=newtype --no-derive-debug --whitelist-type="RT.*" --whitelist-function "rt.*" --whitelist-var "RT.*" -- -I"F:\dev\OptiX SDK 6.5.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\include" "-D__int64=long long"
diff --git a/optix_base/include/wrapper.hpp b/optix_base/include/wrapper.hpp
new file mode 100644
index 0000000..0cbf13b
--- /dev/null
+++ b/optix_base/include/wrapper.hpp
@@ -0,0 +1,2 @@
+#include <optix_host.h>
+#include <optix_function_table.h>
diff --git a/optix_base/include/wrapper6.hpp b/optix_base/include/wrapper6.hpp
new file mode 100644
index 0000000..92359d8
--- /dev/null
+++ b/optix_base/include/wrapper6.hpp
@@ -0,0 +1,6 @@
+#include <optix_host.h>
+#include <optix_cuda_interop.h>
+#include <optix_d3d9_interop.h>
+#include <optix_d3d10_interop.h>
+#include <optix_d3d11_interop.h>
+#include <optix_gl_interop.h>
diff --git a/optix_base/src/lib.rs b/optix_base/src/lib.rs
new file mode 100644
index 0000000..9c43664
--- /dev/null
+++ b/optix_base/src/lib.rs
@@ -0,0 +1,316 @@
+extern crate proc_macro;
+
+use proc_macro::TokenStream;
+use proc_macro2::TokenStream as TokenStream2;
+use proc_macro2::{Ident, Span};
+use quote::{format_ident, quote, ToTokens};
+use rustc_hash::{FxHashMap, FxHashSet};
+use syn::spanned::Spanned;
+use syn::Fields;
+use syn::{
+ bracketed,
+ parse::{Parse, ParseStream},
+ parse_macro_input,
+ punctuated::Punctuated,
+ visit::Visit,
+ File, ImplItem, Item, Path, Token, Type, TypePath,
+};
+
+const OPTIX_RS: &'static str = include_str! {"optix.rs"};
+const OPTIX6_RS: &'static str = include_str! {"optix6.rs"};
+
+// This macro copies optix.rs as-is with some changes:
+// * All function declarations are filtered out
+// * All CUDA types are skipped
+#[proc_macro]
+pub fn optix_type_declarations(_: TokenStream) -> TokenStream {
+ let mut optix_module = syn::parse_str::<File>(OPTIX_RS).unwrap();
+ optix_module.items = optix_module
+ .items
+ .into_iter()
+ .filter_map(|item| match item {
+ Item::ForeignMod(_) => None,
+ Item::Type(type_) => {
+ if type_.ident.to_string().starts_with("CU") {
+ None
+ } else {
+ Some(Item::Type(type_))
+ }
+ }
+ Item::Struct(struct_) => {
+ if struct_.ident.to_string().starts_with("CU") {
+ None
+ } else {
+ Some(Item::Struct(struct_))
+ }
+ }
+ i => Some(i),
+ })
+ .collect::<Vec<_>>();
+ optix_module.into_token_stream().into()
+}
+
+// This macro accepts another macro which accepts a semicolon separated
+// list of OptiX functions
+// macro_foo!(
+// "C" fn optixDeviceContextCreate(
+// fromContext: CUcontext,
+// options: *const OptixDeviceContextOptions,
+// context: *mut OptixDeviceContext,
+// ) -> OptixResult;
+// "C" fn optixGetErrorName(result: OptixResult) -> *const ::std::os::raw::c_char
+// )
+#[proc_macro]
+pub fn optix_function_declarations(tokens: TokenStream) -> TokenStream {
+ let macro_ = parse_macro_input!(tokens as Path);
+ let optix_module = syn::parse_str::<File>(OPTIX_RS).unwrap();
+ let mut all_fns = FxHashMap::default();
+ let mut ordered_exports = Vec::new();
+ for item in optix_module.items.iter() {
+ match item {
+ Item::ForeignMod(extern_) => {
+ for item in extern_.items.iter() {
+ if let syn::ForeignItem::Fn(fn_) = item {
+ all_fns.insert(&fn_.sig.ident, &fn_.sig);
+ }
+ }
+ }
+ Item::Struct(struct_) if struct_.ident == "OptixFunctionTable" => {
+ for fn_ in struct_.fields.iter() {
+ ordered_exports.push(fn_.ident.as_ref().unwrap());
+ }
+ }
+ _ => {}
+ }
+ }
+ let fns_ = ordered_exports
+ .into_iter()
+ .fold(Vec::new(), |mut vec, export| {
+ if export.to_string().starts_with("reserved") {
+ vec.push(quote! {
+ "C" fn #export() -> ()
+ });
+ } else {
+ let fn_signature = all_fns[export];
+ let name = &fn_signature.ident;
+ let inputs = &fn_signature.inputs;
+ let output = &fn_signature.output;
+ vec.push(quote! {
+ "C" fn #name(#inputs) #output
+ });
+ }
+ vec
+ });
+ quote! {
+ #macro_ ! ( #(#fns_);* );
+ }
+ .into()
+}
+
+// This macro copies optix6.rs as-is with some changes:
+// * All function declarations are filtered out
+// * For selected enums we generate a safe version of the enum type and a conversion function
+#[proc_macro]
+pub fn optix6_type_declarations(tokens: TokenStream) -> TokenStream {
+ let type_decl = parse_macro_input!(tokens as TypeDeclInput);
+ let mut optix_module = syn::parse_str::<File>(OPTIX6_RS).unwrap();
+ optix_module.items = optix_module
+ .items
+ .into_iter()
+ .filter_map(|item| match item {
+ Item::ForeignMod(_) => None,
+ i => Some(i),
+ })
+ .collect::<Vec<_>>();
+
+ let mut safe_enum_gen = GenerateSafeEnums::new(type_decl.enums.iter());
+ syn::visit::visit_file(&mut safe_enum_gen, &optix_module);
+ let safe_enums = safe_enum_gen.generate();
+ let mut token_stream = optix_module.into_token_stream();
+ token_stream.extend(safe_enums);
+ token_stream.into()
+}
+
+struct GenerateSafeEnums<'ast> {
+ enums: FxHashMap<&'ast Ident, (Option<&'ast Type>, Vec<&'ast Ident>)>,
+}
+
+impl<'ast> GenerateSafeEnums<'ast> {
+ fn new(enums: impl Iterator<Item = &'ast Ident>) -> Self {
+ let enums = enums.map(|e| (e, (None, Vec::new()))).collect();
+ Self { enums }
+ }
+
+ fn generate(self) -> TokenStream2 {
+ let mut token_stream = TokenStream2::new();
+ for (enum_, (underlying_type, items)) in self.enums {
+ let safe_enum = format_ident!("{}Safe", enum_);
+ let underlying_type = Self::to_ident(underlying_type.unwrap());
+ token_stream.extend(quote! {
+ #[repr(#underlying_type)]
+ #[derive(Copy, Clone, PartialEq, Eq)]
+ pub enum #safe_enum {
+ #(
+ #items = #enum_ :: #items .0,
+ )*
+ }
+
+ impl #safe_enum {
+ pub fn new(e: #enum_) -> Option<Self> {
+ match e {
+ #(
+ #enum_ :: #items => Some(#safe_enum :: #items),
+ )*
+ _ => None
+ }
+ }
+ }
+
+ impl From<#safe_enum> for #enum_ {
+ fn from(value: #safe_enum) -> #enum_ {
+ match value {
+ #(
+ #safe_enum :: #items => #enum_ :: #items,
+ )*
+ }
+ }
+ }
+ });
+ }
+ token_stream
+ }
+
+ fn to_ident(ty: &Type) -> Ident {
+ if let Type::Path(ty_path) = ty {
+ match &*ty_path.path.segments.last().unwrap().ident.to_string() {
+ "c_uint" => Ident::new("u32", ty_path.span()),
+ "c_int" => Ident::new("i32", ty_path.span()),
+ _ => unimplemented!(),
+ }
+ } else {
+ panic!()
+ }
+ }
+}
+
+impl<'ast> Visit<'ast> for GenerateSafeEnums<'ast> {
+ fn visit_item_impl(&mut self, item: &'ast syn::ItemImpl) {
+ if let Type::Path(TypePath { path, .. }) = &*item.self_ty {
+ if let Some((_, entry)) = self.enums.get_mut(&path.segments[0].ident) {
+ for item in item.items.iter() {
+ if let ImplItem::Const(const_) = item {
+ entry.push(&const_.ident)
+ }
+ }
+ }
+ }
+ }
+ fn visit_item_struct(&mut self, item: &'ast syn::ItemStruct) {
+ if let Some((underlying, _)) = self.enums.get_mut(&item.ident) {
+ if let Fields::Unnamed(fields) = &item.fields {
+ *underlying = Some(&fields.unnamed[0].ty);
+ }
+ }
+ }
+}
+
+struct TypeDeclInput {
+ enums: Punctuated<Ident, Token![,]>,
+}
+
+impl Parse for TypeDeclInput {
+ fn parse(input: ParseStream) -> syn::Result<Self> {
+ let enums = Punctuated::<Ident, Token![,]>::parse_terminated(input)?;
+ Ok(TypeDeclInput { enums })
+ }
+}
+
+// This macro accepts following arguments:
+// * `normal_macro`: ident for a normal macro
+// * `override_macro`: ident for an override macro
+// * `override_fns`: list of override functions
+// Then macro goes through every function in optix6.rs, and for every fn `foo`:
+// * if `foo` is contained in `override_fns` then pass it into `override_macro`
+// * if `foo` is not contained in `override_fns` pass it to `normal_macro`
+// Both macros expected a separated list of OptiX6 functions:
+// macro_foo!(
+// "C" fn rtContextCreate(context: *mut RTcontext) -> RTresult;
+// "C" fn rtContextDestroy(context: RTcontext) -> RTresult
+// )
+#[proc_macro]
+pub fn optix6_function_declarations(tokens: TokenStream) -> TokenStream {
+ let function_decl = parse_macro_input!(tokens as FnDeclInput);
+ let override_idents = function_decl
+ .override_fns
+ .into_iter()
+ .collect::<FxHashSet<_>>();
+ let optix_module = syn::parse_str::<File>(OPTIX6_RS).unwrap();
+ let mut fns = Vec::new();
+ let mut override_fns = Vec::new();
+ for item in optix_module.items.iter() {
+ match item {
+ Item::ForeignMod(extern_) => {
+ for item in extern_.items.iter() {
+ if let syn::ForeignItem::Fn(fn_) = item {
+ let abi = &extern_.abi.name;
+ let name = &fn_.sig.ident;
+ let inputs = &fn_.sig.inputs;
+ let mut output = &fn_.sig.output;
+ let unit_return = syn::ReturnType::Type(
+ Token![->](Span::call_site()),
+ Box::new(syn::Type::Tuple(syn::TypeTuple {
+ paren_token: syn::token::Paren {
+ span: Span::call_site(),
+ },
+ elems: Punctuated::new(),
+ })),
+ );
+ if let syn::ReturnType::Default = output {
+ output = &unit_return;
+ }
+ let fn_call = quote! {
+ #abi fn #name(#inputs) #output
+ };
+ let insertion_target = if override_idents.contains(name) {
+ &mut override_fns
+ } else {
+ &mut fns
+ };
+ insertion_target.push(fn_call);
+ }
+ }
+ }
+ _ => {}
+ }
+ }
+ let macro1 = function_decl.normal_macro;
+ let macro2 = function_decl.override_macro;
+ quote! {
+ #macro1 ! ( #(#fns);* );
+ #macro2 ! ( #(#override_fns);* );
+ }
+ .into()
+}
+
+struct FnDeclInput {
+ normal_macro: Path,
+ override_macro: Path,
+ override_fns: Punctuated<Ident, Token![,]>,
+}
+
+impl Parse for FnDeclInput {
+ fn parse(input: ParseStream) -> syn::Result<Self> {
+ let normal_macro = input.parse::<Path>()?;
+ input.parse::<Token![,]>()?;
+ let override_macro = input.parse::<Path>()?;
+ input.parse::<Token![,]>()?;
+ let override_fns_content;
+ bracketed!(override_fns_content in input);
+ let override_fns = override_fns_content.parse_terminated(Ident::parse)?;
+ Ok(Self {
+ normal_macro,
+ override_macro,
+ override_fns,
+ })
+ }
+}
diff --git a/optix_base/src/optix.rs b/optix_base/src/optix.rs
new file mode 100644
index 0000000..82b9ae0
--- /dev/null
+++ b/optix_base/src/optix.rs
@@ -0,0 +1,3381 @@
+/* automatically generated by rust-bindgen 0.59.2 */
+
+pub const OPTIX_SBT_RECORD_ALIGNMENT: u32 = 16;
+pub const OPTIX_ACCEL_BUFFER_BYTE_ALIGNMENT: u32 = 128;
+pub const OPTIX_INSTANCE_BYTE_ALIGNMENT: u32 = 16;
+pub const OPTIX_AABB_BUFFER_BYTE_ALIGNMENT: u32 = 8;
+pub const OPTIX_GEOMETRY_TRANSFORM_BYTE_ALIGNMENT: u32 = 16;
+pub const OPTIX_TRANSFORM_BYTE_ALIGNMENT: u32 = 64;
+pub const OPTIX_COMPILE_DEFAULT_MAX_REGISTER_COUNT: u32 = 0;
+pub const OPTIX_COMPILE_DEFAULT_MAX_PAYLOAD_TYPE_COUNT: u32 = 8;
+pub const OPTIX_COMPILE_DEFAULT_MAX_PAYLOAD_VALUE_COUNT: u32 = 32;
+pub const OPTIX_ABI_VERSION: u32 = 55;
+#[doc = " CUDA device pointer"]
+pub type CUdeviceptr = ::std::os::raw::c_ulonglong;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixDeviceContext_t {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type representing a device context"]
+pub type OptixDeviceContext = *mut OptixDeviceContext_t;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixModule_t {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type representing a module"]
+pub type OptixModule = *mut OptixModule_t;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixProgramGroup_t {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type representing a program group"]
+pub type OptixProgramGroup = *mut OptixProgramGroup_t;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixPipeline_t {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type representing a pipeline"]
+pub type OptixPipeline = *mut OptixPipeline_t;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixDenoiser_t {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type representing a denoiser instance"]
+pub type OptixDenoiser = *mut OptixDenoiser_t;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixTask_t {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type representing a work task"]
+pub type OptixTask = *mut OptixTask_t;
+#[doc = " Traversable handle"]
+pub type OptixTraversableHandle = ::std::os::raw::c_ulonglong;
+#[doc = " Visibility mask"]
+pub type OptixVisibilityMask = ::std::os::raw::c_uint;
+impl OptixResult {
+ pub const OPTIX_SUCCESS: OptixResult = OptixResult(0);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_VALUE: OptixResult = OptixResult(7001);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_HOST_OUT_OF_MEMORY: OptixResult = OptixResult(7002);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_OPERATION: OptixResult = OptixResult(7003);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_FILE_IO_ERROR: OptixResult = OptixResult(7004);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_FILE_FORMAT: OptixResult = OptixResult(7005);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_DISK_CACHE_INVALID_PATH: OptixResult = OptixResult(7010);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_DISK_CACHE_PERMISSION_ERROR: OptixResult = OptixResult(7011);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_DISK_CACHE_DATABASE_ERROR: OptixResult = OptixResult(7012);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_DISK_CACHE_INVALID_DATA: OptixResult = OptixResult(7013);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_LAUNCH_FAILURE: OptixResult = OptixResult(7050);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_DEVICE_CONTEXT: OptixResult = OptixResult(7051);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_CUDA_NOT_INITIALIZED: OptixResult = OptixResult(7052);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_VALIDATION_FAILURE: OptixResult = OptixResult(7053);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_PTX: OptixResult = OptixResult(7200);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_LAUNCH_PARAMETER: OptixResult = OptixResult(7201);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_PAYLOAD_ACCESS: OptixResult = OptixResult(7202);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_ATTRIBUTE_ACCESS: OptixResult = OptixResult(7203);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_FUNCTION_USE: OptixResult = OptixResult(7204);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_FUNCTION_ARGUMENTS: OptixResult = OptixResult(7205);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_PIPELINE_OUT_OF_CONSTANT_MEMORY: OptixResult = OptixResult(7250);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_PIPELINE_LINK_ERROR: OptixResult = OptixResult(7251);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_ILLEGAL_DURING_TASK_EXECUTE: OptixResult = OptixResult(7270);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INTERNAL_COMPILER_ERROR: OptixResult = OptixResult(7299);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_DENOISER_MODEL_NOT_SET: OptixResult = OptixResult(7300);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_DENOISER_NOT_INITIALIZED: OptixResult = OptixResult(7301);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_ACCEL_NOT_COMPATIBLE: OptixResult = OptixResult(7400);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_PAYLOAD_TYPE_MISMATCH: OptixResult = OptixResult(7500);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_PAYLOAD_TYPE_RESOLUTION_FAILED: OptixResult = OptixResult(7501);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_PAYLOAD_TYPE_ID_INVALID: OptixResult = OptixResult(7502);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_NOT_SUPPORTED: OptixResult = OptixResult(7800);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_UNSUPPORTED_ABI_VERSION: OptixResult = OptixResult(7801);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_FUNCTION_TABLE_SIZE_MISMATCH: OptixResult = OptixResult(7802);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INVALID_ENTRY_FUNCTION_OPTIONS: OptixResult = OptixResult(7803);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_LIBRARY_NOT_FOUND: OptixResult = OptixResult(7804);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_ENTRY_SYMBOL_NOT_FOUND: OptixResult = OptixResult(7805);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_LIBRARY_UNLOAD_FAILURE: OptixResult = OptixResult(7806);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_CUDA_ERROR: OptixResult = OptixResult(7900);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_INTERNAL_ERROR: OptixResult = OptixResult(7990);
+}
+impl OptixResult {
+ pub const OPTIX_ERROR_UNKNOWN: OptixResult = OptixResult(7999);
+}
+#[repr(transparent)]
+#[doc = " Result codes returned from API functions"]
+#[doc = ""]
+#[doc = " All host side API functions return OptixResult with the exception of optixGetErrorName"]
+#[doc = " and optixGetErrorString. When successful OPTIX_SUCCESS is returned. All return codes"]
+#[doc = " except for OPTIX_SUCCESS should be assumed to be errors as opposed to a warning."]
+#[doc = ""]
+#[doc = " \\see #optixGetErrorName(), #optixGetErrorString()"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixResult(pub ::std::os::raw::c_uint);
+impl OptixDeviceProperty {
+ #[doc = " Maximum value for OptixPipelineLinkOptions::maxTraceDepth. sizeof( unsigned int )"]
+ pub const OPTIX_DEVICE_PROPERTY_LIMIT_MAX_TRACE_DEPTH: OptixDeviceProperty =
+ OptixDeviceProperty(8193);
+}
+impl OptixDeviceProperty {
+ #[doc = " Maximum value to pass into optixPipelineSetStackSize for parameter"]
+ #[doc = " maxTraversableGraphDepth.v sizeof( unsigned int )"]
+ pub const OPTIX_DEVICE_PROPERTY_LIMIT_MAX_TRAVERSABLE_GRAPH_DEPTH: OptixDeviceProperty =
+ OptixDeviceProperty(8194);
+}
+impl OptixDeviceProperty {
+ #[doc = " The maximum number of primitives (over all build inputs) as input to a single"]
+ #[doc = " Geometry Acceleration Structure (GAS). sizeof( unsigned int )"]
+ pub const OPTIX_DEVICE_PROPERTY_LIMIT_MAX_PRIMITIVES_PER_GAS: OptixDeviceProperty =
+ OptixDeviceProperty(8195);
+}
+impl OptixDeviceProperty {
+ #[doc = " The maximum number of instances (over all build inputs) as input to a single"]
+ #[doc = " Instance Acceleration Structure (IAS). sizeof( unsigned int )"]
+ pub const OPTIX_DEVICE_PROPERTY_LIMIT_MAX_INSTANCES_PER_IAS: OptixDeviceProperty =
+ OptixDeviceProperty(8196);
+}
+impl OptixDeviceProperty {
+ #[doc = " The RT core version supported by the device (0 for no support, 10 for version"]
+ #[doc = " 1.0). sizeof( unsigned int )"]
+ pub const OPTIX_DEVICE_PROPERTY_RTCORE_VERSION: OptixDeviceProperty = OptixDeviceProperty(8197);
+}
+impl OptixDeviceProperty {
+ #[doc = " The maximum value for #OptixInstance::instanceId. sizeof( unsigned int )"]
+ pub const OPTIX_DEVICE_PROPERTY_LIMIT_MAX_INSTANCE_ID: OptixDeviceProperty =
+ OptixDeviceProperty(8198);
+}
+impl OptixDeviceProperty {
+ #[doc = " The number of bits available for the #OptixInstance::visibilityMask."]
+ #[doc = " Higher bits must be set to zero. sizeof( unsigned int )"]
+ pub const OPTIX_DEVICE_PROPERTY_LIMIT_NUM_BITS_INSTANCE_VISIBILITY_MASK: OptixDeviceProperty =
+ OptixDeviceProperty(8199);
+}
+impl OptixDeviceProperty {
+ #[doc = " The maximum number of instances that can be added to a single Instance"]
+ #[doc = " Acceleration Structure (IAS). sizeof( unsigned int )"]
+ pub const OPTIX_DEVICE_PROPERTY_LIMIT_MAX_SBT_RECORDS_PER_GAS: OptixDeviceProperty =
+ OptixDeviceProperty(8200);
+}
+impl OptixDeviceProperty {
+ #[doc = " The maximum value for #OptixInstance::sbtOffset. sizeof( unsigned int )"]
+ pub const OPTIX_DEVICE_PROPERTY_LIMIT_MAX_SBT_OFFSET: OptixDeviceProperty =
+ OptixDeviceProperty(8201);
+}
+#[repr(transparent)]
+#[doc = " Parameters used for #optixDeviceContextGetProperty()"]
+#[doc = ""]
+#[doc = " \\see #optixDeviceContextGetProperty()"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixDeviceProperty(pub ::std::os::raw::c_uint);
+#[doc = " Type of the callback function used for log messages."]
+#[doc = ""]
+#[doc = " \\param[in] level The log level indicates the severity of the message. See below for"]
+#[doc = " possible values."]
+#[doc = " \\param[in] tag A terse message category description (e.g., 'SCENE STAT')."]
+#[doc = " \\param[in] message Null terminated log message (without newline at the end)."]
+#[doc = " \\param[in] cbdata Callback data that was provided with the callback pointer."]
+#[doc = ""]
+#[doc = " It is the users responsibility to ensure thread safety within this function."]
+#[doc = ""]
+#[doc = " The following log levels are defined."]
+#[doc = ""]
+#[doc = " 0 disable Setting the callback level will disable all messages. The callback"]
+#[doc = " function will not be called in this case."]
+#[doc = " 1 fatal A non-recoverable error. The context and/or OptiX itself might no longer"]
+#[doc = " be in a usable state."]
+#[doc = " 2 error A recoverable error, e.g., when passing invalid call parameters."]
+#[doc = " 3 warning Hints that OptiX might not behave exactly as requested by the user or"]
+#[doc = " may perform slower than expected."]
+#[doc = " 4 print Status or progress messages."]
+#[doc = ""]
+#[doc = " Higher levels might occur."]
+#[doc = ""]
+#[doc = " \\see #optixDeviceContextSetLogCallback(), #OptixDeviceContextOptions"]
+pub type OptixLogCallback = ::std::option::Option<
+ unsafe extern "C" fn(
+ level: ::std::os::raw::c_uint,
+ tag: *const ::std::os::raw::c_char,
+ message: *const ::std::os::raw::c_char,
+ cbdata: *mut ::std::os::raw::c_void,
+ ),
+>;
+impl OptixDeviceContextValidationMode {
+ pub const OPTIX_DEVICE_CONTEXT_VALIDATION_MODE_OFF: OptixDeviceContextValidationMode =
+ OptixDeviceContextValidationMode(0);
+}
+impl OptixDeviceContextValidationMode {
+ pub const OPTIX_DEVICE_CONTEXT_VALIDATION_MODE_ALL: OptixDeviceContextValidationMode =
+ OptixDeviceContextValidationMode(4294967295);
+}
+#[repr(transparent)]
+#[doc = " Validation mode settings."]
+#[doc = ""]
+#[doc = " When enabled, certain device code utilities will be enabled to provide as good debug and"]
+#[doc = " error checking facilities as possible."]
+#[doc = ""]
+#[doc = ""]
+#[doc = " \\see #optixDeviceContextCreate()"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixDeviceContextValidationMode(pub ::std::os::raw::c_uint);
+#[doc = " Parameters used for #optixDeviceContextCreate()"]
+#[doc = ""]
+#[doc = " \\see #optixDeviceContextCreate()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixDeviceContextOptions {
+ #[doc = " Function pointer used when OptiX wishes to generate messages"]
+ pub logCallbackFunction: OptixLogCallback,
+ #[doc = " Pointer stored and passed to logCallbackFunction when a message is generated"]
+ pub logCallbackData: *mut ::std::os::raw::c_void,
+ #[doc = " Maximum callback level to generate message for (see #OptixLogCallback)"]
+ pub logCallbackLevel: ::std::os::raw::c_int,
+ #[doc = " Validation mode of context."]
+ pub validationMode: OptixDeviceContextValidationMode,
+}
+impl OptixGeometryFlags {
+ #[doc = " No flags set"]
+ pub const OPTIX_GEOMETRY_FLAG_NONE: OptixGeometryFlags = OptixGeometryFlags(0);
+}
+impl OptixGeometryFlags {
+ #[doc = " Disables the invocation of the anyhit program."]
+ #[doc = " Can be overridden by OPTIX_INSTANCE_FLAG_ENFORCE_ANYHIT and OPTIX_RAY_FLAG_ENFORCE_ANYHIT."]
+ pub const OPTIX_GEOMETRY_FLAG_DISABLE_ANYHIT: OptixGeometryFlags = OptixGeometryFlags(1);
+}
+impl OptixGeometryFlags {
+ #[doc = " If set, an intersection with the primitive will trigger one and only one"]
+ #[doc = " invocation of the anyhit program. Otherwise, the anyhit program may be invoked"]
+ #[doc = " more than once."]
+ pub const OPTIX_GEOMETRY_FLAG_REQUIRE_SINGLE_ANYHIT_CALL: OptixGeometryFlags =
+ OptixGeometryFlags(2);
+}
+#[repr(transparent)]
+#[doc = " Flags used by #OptixBuildInputTriangleArray::flags"]
+#[doc = " and #OptixBuildInput::flag"]
+#[doc = " and #OptixBuildInputCustomPrimitiveArray::flags"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixGeometryFlags(pub ::std::os::raw::c_uint);
+impl OptixHitKind {
+ #[doc = " Ray hit the triangle on the front face"]
+ pub const OPTIX_HIT_KIND_TRIANGLE_FRONT_FACE: OptixHitKind = OptixHitKind(254);
+}
+impl OptixHitKind {
+ #[doc = " Ray hit the triangle on the back face"]
+ pub const OPTIX_HIT_KIND_TRIANGLE_BACK_FACE: OptixHitKind = OptixHitKind(255);
+}
+#[repr(transparent)]
+#[doc = " Legacy type: A subset of the hit kinds for built-in primitive intersections."]
+#[doc = " It is preferred to use optixGetPrimitiveType(), together with"]
+#[doc = " optixIsFrontFaceHit() or optixIsBackFaceHit()."]
+#[doc = ""]
+#[doc = " \\see #optixGetHitKind()"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixHitKind(pub ::std::os::raw::c_uint);
+impl OptixIndicesFormat {
+ #[doc = " No indices, this format must only be used in combination with triangle soups, i.e., numIndexTriplets must be zero"]
+ pub const OPTIX_INDICES_FORMAT_NONE: OptixIndicesFormat = OptixIndicesFormat(0);
+}
+impl OptixIndicesFormat {
+ #[doc = " Three shorts"]
+ pub const OPTIX_INDICES_FORMAT_UNSIGNED_SHORT3: OptixIndicesFormat = OptixIndicesFormat(8450);
+}
+impl OptixIndicesFormat {
+ #[doc = " Three ints"]
+ pub const OPTIX_INDICES_FORMAT_UNSIGNED_INT3: OptixIndicesFormat = OptixIndicesFormat(8451);
+}
+#[repr(transparent)]
+#[doc = " Format of indices used int #OptixBuildInputTriangleArray::indexFormat."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixIndicesFormat(pub ::std::os::raw::c_uint);
+impl OptixVertexFormat {
+ #[doc = "< No vertices"]
+ pub const OPTIX_VERTEX_FORMAT_NONE: OptixVertexFormat = OptixVertexFormat(0);
+}
+impl OptixVertexFormat {
+ #[doc = "< Vertices are represented by three floats"]
+ pub const OPTIX_VERTEX_FORMAT_FLOAT3: OptixVertexFormat = OptixVertexFormat(8481);
+}
+impl OptixVertexFormat {
+ #[doc = "< Vertices are represented by two floats"]
+ pub const OPTIX_VERTEX_FORMAT_FLOAT2: OptixVertexFormat = OptixVertexFormat(8482);
+}
+impl OptixVertexFormat {
+ #[doc = "< Vertices are represented by three halfs"]
+ pub const OPTIX_VERTEX_FORMAT_HALF3: OptixVertexFormat = OptixVertexFormat(8483);
+}
+impl OptixVertexFormat {
+ #[doc = "< Vertices are represented by two halfs"]
+ pub const OPTIX_VERTEX_FORMAT_HALF2: OptixVertexFormat = OptixVertexFormat(8484);
+}
+impl OptixVertexFormat {
+ pub const OPTIX_VERTEX_FORMAT_SNORM16_3: OptixVertexFormat = OptixVertexFormat(8485);
+}
+impl OptixVertexFormat {
+ pub const OPTIX_VERTEX_FORMAT_SNORM16_2: OptixVertexFormat = OptixVertexFormat(8486);
+}
+#[repr(transparent)]
+#[doc = " Format of vertices used in #OptixBuildInputTriangleArray::vertexFormat."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixVertexFormat(pub ::std::os::raw::c_uint);
+impl OptixTransformFormat {
+ #[doc = "< no transform, default for zero initialization"]
+ pub const OPTIX_TRANSFORM_FORMAT_NONE: OptixTransformFormat = OptixTransformFormat(0);
+}
+impl OptixTransformFormat {
+ #[doc = "< 3x4 row major affine matrix"]
+ pub const OPTIX_TRANSFORM_FORMAT_MATRIX_FLOAT12: OptixTransformFormat =
+ OptixTransformFormat(8673);
+}
+#[repr(transparent)]
+#[doc = " Format of transform used in #OptixBuildInputTriangleArray::transformFormat."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixTransformFormat(pub ::std::os::raw::c_uint);
+#[doc = " Triangle inputs"]
+#[doc = ""]
+#[doc = " \\see #OptixBuildInput::triangleArray"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixBuildInputTriangleArray {
+ #[doc = " Points to host array of device pointers, one per motion step. Host array size must match the number of"]
+ #[doc = " motion keys as set in #OptixMotionOptions (or an array of size 1 if OptixMotionOptions::numKeys is set"]
+ #[doc = " to 0 or 1). Each per motion key device pointer must point to an array of vertices of the"]
+ #[doc = " triangles in the format as described by vertexFormat. The minimum alignment must match the natural"]
+ #[doc = " alignment of the type as specified in the vertexFormat, i.e., for OPTIX_VERTEX_FORMAT_FLOATX 4-byte,"]
+ #[doc = " for all others a 2-byte alignment. However, an 16-byte stride (and buffer alignment) is recommended for"]
+ #[doc = " vertices of format OPTIX_VERTEX_FORMAT_FLOAT3 for GAS build performance."]
+ pub vertexBuffers: *const CUdeviceptr,
+ #[doc = " Number of vertices in each of buffer in OptixBuildInputTriangleArray::vertexBuffers."]
+ pub numVertices: ::std::os::raw::c_uint,
+ #[doc = " \\see #OptixVertexFormat"]
+ pub vertexFormat: OptixVertexFormat,
+ #[doc = " Stride between vertices. If set to zero, vertices are assumed to be tightly"]
+ #[doc = " packed and stride is inferred from vertexFormat."]
+ pub vertexStrideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Optional pointer to array of 16 or 32-bit int triplets, one triplet per triangle."]
+ #[doc = " The minimum alignment must match the natural alignment of the type as specified in the indexFormat, i.e.,"]
+ #[doc = " for OPTIX_INDICES_FORMAT_UNSIGNED_INT3 4-byte and for OPTIX_INDICES_FORMAT_UNSIGNED_SHORT3 a 2-byte alignment."]
+ pub indexBuffer: CUdeviceptr,
+ #[doc = " Size of array in OptixBuildInputTriangleArray::indexBuffer. For build, needs to be zero if indexBuffer is \\c nullptr."]
+ pub numIndexTriplets: ::std::os::raw::c_uint,
+ #[doc = " \\see #OptixIndicesFormat"]
+ pub indexFormat: OptixIndicesFormat,
+ #[doc = " Stride between triplets of indices. If set to zero, indices are assumed to be tightly"]
+ #[doc = " packed and stride is inferred from indexFormat."]
+ pub indexStrideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Optional pointer to array of floats"]
+ #[doc = " representing a 3x4 row major affine"]
+ #[doc = " transformation matrix. This pointer must be a multiple of OPTIX_GEOMETRY_TRANSFORM_BYTE_ALIGNMENT"]
+ pub preTransform: CUdeviceptr,
+ #[doc = " Array of flags, to specify flags per sbt record,"]
+ #[doc = " combinations of OptixGeometryFlags describing the"]
+ #[doc = " primitive behavior, size must match numSbtRecords"]
+ pub flags: *const ::std::os::raw::c_uint,
+ #[doc = " Number of sbt records available to the sbt index offset override."]
+ pub numSbtRecords: ::std::os::raw::c_uint,
+ #[doc = " Device pointer to per-primitive local sbt index offset buffer. May be NULL."]
+ #[doc = " Every entry must be in range [0,numSbtRecords-1]."]
+ #[doc = " Size needs to be the number of primitives."]
+ pub sbtIndexOffsetBuffer: CUdeviceptr,
+ #[doc = " Size of type of the sbt index offset. Needs to be 0, 1, 2 or 4 (8, 16 or 32 bit)."]
+ pub sbtIndexOffsetSizeInBytes: ::std::os::raw::c_uint,
+ #[doc = " Stride between the index offsets. If set to zero, the offsets are assumed to be tightly"]
+ #[doc = " packed and the stride matches the size of the type (sbtIndexOffsetSizeInBytes)."]
+ pub sbtIndexOffsetStrideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Primitive index bias, applied in optixGetPrimitiveIndex()."]
+ #[doc = " Sum of primitiveIndexOffset and number of triangles must not overflow 32bits."]
+ pub primitiveIndexOffset: ::std::os::raw::c_uint,
+ #[doc = " \\see #OptixTransformFormat"]
+ pub transformFormat: OptixTransformFormat,
+}
+impl OptixPrimitiveType {
+ #[doc = " Custom primitive."]
+ pub const OPTIX_PRIMITIVE_TYPE_CUSTOM: OptixPrimitiveType = OptixPrimitiveType(9472);
+}
+impl OptixPrimitiveType {
+ #[doc = " B-spline curve of degree 2 with circular cross-section."]
+ pub const OPTIX_PRIMITIVE_TYPE_ROUND_QUADRATIC_BSPLINE: OptixPrimitiveType =
+ OptixPrimitiveType(9473);
+}
+impl OptixPrimitiveType {
+ #[doc = " B-spline curve of degree 3 with circular cross-section."]
+ pub const OPTIX_PRIMITIVE_TYPE_ROUND_CUBIC_BSPLINE: OptixPrimitiveType =
+ OptixPrimitiveType(9474);
+}
+impl OptixPrimitiveType {
+ #[doc = " Piecewise linear curve with circular cross-section."]
+ pub const OPTIX_PRIMITIVE_TYPE_ROUND_LINEAR: OptixPrimitiveType = OptixPrimitiveType(9475);
+}
+impl OptixPrimitiveType {
+ #[doc = " CatmullRom curve with circular cross-section."]
+ pub const OPTIX_PRIMITIVE_TYPE_ROUND_CATMULLROM: OptixPrimitiveType = OptixPrimitiveType(9476);
+}
+impl OptixPrimitiveType {
+ #[doc = " Triangle."]
+ pub const OPTIX_PRIMITIVE_TYPE_TRIANGLE: OptixPrimitiveType = OptixPrimitiveType(9521);
+}
+#[repr(transparent)]
+#[doc = " Builtin primitive types"]
+#[doc = ""]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixPrimitiveType(pub ::std::os::raw::c_uint);
+impl OptixPrimitiveTypeFlags {
+ #[doc = " Custom primitive."]
+ pub const OPTIX_PRIMITIVE_TYPE_FLAGS_CUSTOM: OptixPrimitiveTypeFlags =
+ OptixPrimitiveTypeFlags(1);
+}
+impl OptixPrimitiveTypeFlags {
+ #[doc = " B-spline curve of degree 2 with circular cross-section."]
+ pub const OPTIX_PRIMITIVE_TYPE_FLAGS_ROUND_QUADRATIC_BSPLINE: OptixPrimitiveTypeFlags =
+ OptixPrimitiveTypeFlags(2);
+}
+impl OptixPrimitiveTypeFlags {
+ #[doc = " B-spline curve of degree 3 with circular cross-section."]
+ pub const OPTIX_PRIMITIVE_TYPE_FLAGS_ROUND_CUBIC_BSPLINE: OptixPrimitiveTypeFlags =
+ OptixPrimitiveTypeFlags(4);
+}
+impl OptixPrimitiveTypeFlags {
+ #[doc = " Piecewise linear curve with circular cross-section."]
+ pub const OPTIX_PRIMITIVE_TYPE_FLAGS_ROUND_LINEAR: OptixPrimitiveTypeFlags =
+ OptixPrimitiveTypeFlags(8);
+}
+impl OptixPrimitiveTypeFlags {
+ #[doc = " CatmullRom curve with circular cross-section."]
+ pub const OPTIX_PRIMITIVE_TYPE_FLAGS_ROUND_CATMULLROM: OptixPrimitiveTypeFlags =
+ OptixPrimitiveTypeFlags(16);
+}
+impl OptixPrimitiveTypeFlags {
+ #[doc = " Triangle."]
+ pub const OPTIX_PRIMITIVE_TYPE_FLAGS_TRIANGLE: OptixPrimitiveTypeFlags =
+ OptixPrimitiveTypeFlags(-2147483648);
+}
+#[repr(transparent)]
+#[doc = " Builtin flags may be bitwise combined."]
+#[doc = ""]
+#[doc = " \\see #OptixPipelineCompileOptions::usesPrimitiveTypeFlags"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixPrimitiveTypeFlags(pub ::std::os::raw::c_int);
+impl OptixCurveEndcapFlags {
+ #[doc = " Default end caps. Round end caps for linear, no end caps for quadratic/cubic."]
+ pub const OPTIX_CURVE_ENDCAP_DEFAULT: OptixCurveEndcapFlags = OptixCurveEndcapFlags(0);
+}
+impl OptixCurveEndcapFlags {
+ #[doc = " Flat end caps at both ends of quadratic/cubic curve segments. Not valid for linear."]
+ pub const OPTIX_CURVE_ENDCAP_ON: OptixCurveEndcapFlags = OptixCurveEndcapFlags(1);
+}
+#[repr(transparent)]
+#[doc = " Curve end cap types, for non-linear curves"]
+#[doc = ""]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixCurveEndcapFlags(pub ::std::os::raw::c_uint);
+#[doc = " Curve inputs"]
+#[doc = ""]
+#[doc = " A curve is a swept surface defined by a 3D spline curve and a varying width (radius). A curve (or \"strand\") of"]
+#[doc = " degree d (3=cubic, 2=quadratic, 1=linear) is represented by N > d vertices and N width values, and comprises N - d segments."]
+#[doc = " Each segment is defined by d+1 consecutive vertices. Each curve may have a different number of vertices."]
+#[doc = ""]
+#[doc = " OptiX describes the curve array as a list of curve segments. The primitive id is the segment number."]
+#[doc = " It is the user's responsibility to maintain a mapping between curves and curve segments."]
+#[doc = " Each index buffer entry i = indexBuffer[primid] specifies the start of a curve segment,"]
+#[doc = " represented by d+1 consecutive vertices in the vertex buffer,"]
+#[doc = " and d+1 consecutive widths in the width buffer. Width is interpolated the same"]
+#[doc = " way vertices are interpolated, that is, using the curve basis."]
+#[doc = ""]
+#[doc = " Each curves build input has only one SBT record."]
+#[doc = " To create curves with different materials in the same BVH, use multiple build inputs."]
+#[doc = ""]
+#[doc = " \\see #OptixBuildInput::curveArray"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixBuildInputCurveArray {
+ #[doc = " Curve degree and basis"]
+ #[doc = " \\see #OptixPrimitiveType"]
+ pub curveType: OptixPrimitiveType,
+ #[doc = " Number of primitives. Each primitive is a polynomial curve segment."]
+ pub numPrimitives: ::std::os::raw::c_uint,
+ #[doc = " Pointer to host array of device pointers, one per motion step. Host array size must match number of"]
+ #[doc = " motion keys as set in #OptixMotionOptions (or an array of size 1 if OptixMotionOptions::numKeys is set"]
+ #[doc = " to 1). Each per-motion-key device pointer must point to an array of floats (the vertices of the"]
+ #[doc = " curves)."]
+ pub vertexBuffers: *const CUdeviceptr,
+ #[doc = " Number of vertices in each buffer in vertexBuffers."]
+ pub numVertices: ::std::os::raw::c_uint,
+ #[doc = " Stride between vertices. If set to zero, vertices are assumed to be tightly"]
+ #[doc = " packed and stride is sizeof( float3 )."]
+ pub vertexStrideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Parallel to vertexBuffers: a device pointer per motion step, each with numVertices float values,"]
+ #[doc = " specifying the curve width (radius) corresponding to each vertex."]
+ pub widthBuffers: *const CUdeviceptr,
+ #[doc = " Stride between widths. If set to zero, widths are assumed to be tightly"]
+ #[doc = " packed and stride is sizeof( float )."]
+ pub widthStrideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Reserved for future use."]
+ pub normalBuffers: *const CUdeviceptr,
+ #[doc = " Reserved for future use."]
+ pub normalStrideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Device pointer to array of unsigned ints, one per curve segment."]
+ #[doc = " This buffer is required (unlike for OptixBuildInputTriangleArray)."]
+ #[doc = " Each index is the start of degree+1 consecutive vertices in vertexBuffers,"]
+ #[doc = " and corresponding widths in widthBuffers and normals in normalBuffers."]
+ #[doc = " These define a single segment. Size of array is numPrimitives."]
+ pub indexBuffer: CUdeviceptr,
+ #[doc = " Stride between indices. If set to zero, indices are assumed to be tightly"]
+ #[doc = " packed and stride is sizeof( unsigned int )."]
+ pub indexStrideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Combination of OptixGeometryFlags describing the"]
+ #[doc = " primitive behavior."]
+ pub flag: ::std::os::raw::c_uint,
+ #[doc = " Primitive index bias, applied in optixGetPrimitiveIndex()."]
+ #[doc = " Sum of primitiveIndexOffset and number of primitives must not overflow 32bits."]
+ pub primitiveIndexOffset: ::std::os::raw::c_uint,
+ #[doc = " End cap flags, see OptixCurveEndcapFlags"]
+ pub endcapFlags: ::std::os::raw::c_uint,
+}
+#[doc = " AABB inputs"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixAabb {
+ #[doc = "< Lower extent in X direction."]
+ pub minX: f32,
+ #[doc = "< Lower extent in Y direction."]
+ pub minY: f32,
+ #[doc = "< Lower extent in Z direction."]
+ pub minZ: f32,
+ #[doc = "< Upper extent in X direction."]
+ pub maxX: f32,
+ #[doc = "< Upper extent in Y direction."]
+ pub maxY: f32,
+ #[doc = "< Upper extent in Z direction."]
+ pub maxZ: f32,
+}
+#[doc = " Custom primitive inputs"]
+#[doc = ""]
+#[doc = " \\see #OptixBuildInput::customPrimitiveArray"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixBuildInputCustomPrimitiveArray {
+ #[doc = " Points to host array of device pointers to AABBs (type OptixAabb), one per motion step."]
+ #[doc = " Host array size must match number of motion keys as set in OptixMotionOptions (or an array of size 1"]
+ #[doc = " if OptixMotionOptions::numKeys is set to 1)."]
+ #[doc = " Each device pointer must be a multiple of OPTIX_AABB_BUFFER_BYTE_ALIGNMENT."]
+ pub aabbBuffers: *const CUdeviceptr,
+ #[doc = " Number of primitives in each buffer (i.e., per motion step) in"]
+ #[doc = " #OptixBuildInputCustomPrimitiveArray::aabbBuffers."]
+ pub numPrimitives: ::std::os::raw::c_uint,
+ #[doc = " Stride between AABBs (per motion key). If set to zero, the aabbs are assumed to be tightly"]
+ #[doc = " packed and the stride is assumed to be sizeof( OptixAabb )."]
+ #[doc = " If non-zero, the value must be a multiple of OPTIX_AABB_BUFFER_BYTE_ALIGNMENT."]
+ pub strideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Array of flags, to specify flags per sbt record,"]
+ #[doc = " combinations of OptixGeometryFlags describing the"]
+ #[doc = " primitive behavior, size must match numSbtRecords"]
+ pub flags: *const ::std::os::raw::c_uint,
+ #[doc = " Number of sbt records available to the sbt index offset override."]
+ pub numSbtRecords: ::std::os::raw::c_uint,
+ #[doc = " Device pointer to per-primitive local sbt index offset buffer. May be NULL."]
+ #[doc = " Every entry must be in range [0,numSbtRecords-1]."]
+ #[doc = " Size needs to be the number of primitives."]
+ pub sbtIndexOffsetBuffer: CUdeviceptr,
+ #[doc = " Size of type of the sbt index offset. Needs to be 0, 1, 2 or 4 (8, 16 or 32 bit)."]
+ pub sbtIndexOffsetSizeInBytes: ::std::os::raw::c_uint,
+ #[doc = " Stride between the index offsets. If set to zero, the offsets are assumed to be tightly"]
+ #[doc = " packed and the stride matches the size of the type (sbtIndexOffsetSizeInBytes)."]
+ pub sbtIndexOffsetStrideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Primitive index bias, applied in optixGetPrimitiveIndex()."]
+ #[doc = " Sum of primitiveIndexOffset and number of primitive must not overflow 32bits."]
+ pub primitiveIndexOffset: ::std::os::raw::c_uint,
+}
+#[doc = " Instance and instance pointer inputs"]
+#[doc = ""]
+#[doc = " \\see #OptixBuildInput::instanceArray"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixBuildInputInstanceArray {
+ #[doc = " If OptixBuildInput::type is OPTIX_BUILD_INPUT_TYPE_INSTANCE_POINTERS instances and"]
+ #[doc = " aabbs should be interpreted as arrays of pointers instead of arrays of structs."]
+ #[doc = ""]
+ #[doc = " This pointer must be a multiple of OPTIX_INSTANCE_BYTE_ALIGNMENT if"]
+ #[doc = " OptixBuildInput::type is OPTIX_BUILD_INPUT_TYPE_INSTANCES. The array elements must"]
+ #[doc = " be a multiple of OPTIX_INSTANCE_BYTE_ALIGNMENT if OptixBuildInput::type is"]
+ #[doc = " OPTIX_BUILD_INPUT_TYPE_INSTANCE_POINTERS."]
+ pub instances: CUdeviceptr,
+ #[doc = " Number of elements in #OptixBuildInputInstanceArray::instances."]
+ pub numInstances: ::std::os::raw::c_uint,
+}
+impl OptixBuildInputType {
+ #[doc = " Triangle inputs. \\see #OptixBuildInputTriangleArray"]
+ pub const OPTIX_BUILD_INPUT_TYPE_TRIANGLES: OptixBuildInputType = OptixBuildInputType(8513);
+}
+impl OptixBuildInputType {
+ #[doc = " Custom primitive inputs. \\see #OptixBuildInputCustomPrimitiveArray"]
+ pub const OPTIX_BUILD_INPUT_TYPE_CUSTOM_PRIMITIVES: OptixBuildInputType =
+ OptixBuildInputType(8514);
+}
+impl OptixBuildInputType {
+ #[doc = " Instance inputs. \\see #OptixBuildInputInstanceArray"]
+ pub const OPTIX_BUILD_INPUT_TYPE_INSTANCES: OptixBuildInputType = OptixBuildInputType(8515);
+}
+impl OptixBuildInputType {
+ #[doc = " Instance pointer inputs. \\see #OptixBuildInputInstanceArray"]
+ pub const OPTIX_BUILD_INPUT_TYPE_INSTANCE_POINTERS: OptixBuildInputType =
+ OptixBuildInputType(8516);
+}
+impl OptixBuildInputType {
+ #[doc = " Curve inputs. \\see #OptixBuildInputCurveArray"]
+ pub const OPTIX_BUILD_INPUT_TYPE_CURVES: OptixBuildInputType = OptixBuildInputType(8517);
+}
+#[repr(transparent)]
+#[doc = " Enum to distinguish the different build input types."]
+#[doc = ""]
+#[doc = " \\see #OptixBuildInput::type"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixBuildInputType(pub ::std::os::raw::c_uint);
+#[doc = " Build inputs."]
+#[doc = ""]
+#[doc = " All of them support motion and the size of the data arrays needs to match the number of motion steps"]
+#[doc = ""]
+#[doc = " \\see #optixAccelComputeMemoryUsage(), #optixAccelBuild()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixBuildInput {
+ #[doc = " The type of the build input."]
+ pub type_: OptixBuildInputType,
+ pub __bindgen_anon_1: OptixBuildInput__bindgen_ty_1,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union OptixBuildInput__bindgen_ty_1 {
+ #[doc = " Triangle inputs."]
+ pub triangleArray: OptixBuildInputTriangleArray,
+ #[doc = " Curve inputs."]
+ pub curveArray: OptixBuildInputCurveArray,
+ #[doc = " Custom primitive inputs."]
+ pub customPrimitiveArray: OptixBuildInputCustomPrimitiveArray,
+ #[doc = " Instance and instance pointer inputs."]
+ pub instanceArray: OptixBuildInputInstanceArray,
+ pub pad: [::std::os::raw::c_char; 1024usize],
+}
+impl OptixInstanceFlags {
+ #[doc = " No special flag set"]
+ pub const OPTIX_INSTANCE_FLAG_NONE: OptixInstanceFlags = OptixInstanceFlags(0);
+}
+impl OptixInstanceFlags {
+ #[doc = " Prevent triangles from getting culled due to their orientation."]
+ #[doc = " Effectively ignores ray flags"]
+ #[doc = " OPTIX_RAY_FLAG_CULL_BACK_FACING_TRIANGLES and OPTIX_RAY_FLAG_CULL_FRONT_FACING_TRIANGLES."]
+ pub const OPTIX_INSTANCE_FLAG_DISABLE_TRIANGLE_FACE_CULLING: OptixInstanceFlags =
+ OptixInstanceFlags(1);
+}
+impl OptixInstanceFlags {
+ #[doc = " Flip triangle orientation."]
+ #[doc = " This affects front/backface culling as well as the reported face in case of a hit."]
+ pub const OPTIX_INSTANCE_FLAG_FLIP_TRIANGLE_FACING: OptixInstanceFlags = OptixInstanceFlags(2);
+}
+impl OptixInstanceFlags {
+ #[doc = " Disable anyhit programs for all geometries of the instance."]
+ #[doc = " Can be overridden by OPTIX_RAY_FLAG_ENFORCE_ANYHIT."]
+ #[doc = " This flag is mutually exclusive with OPTIX_INSTANCE_FLAG_ENFORCE_ANYHIT."]
+ pub const OPTIX_INSTANCE_FLAG_DISABLE_ANYHIT: OptixInstanceFlags = OptixInstanceFlags(4);
+}
+impl OptixInstanceFlags {
+ #[doc = " Enables anyhit programs for all geometries of the instance."]
+ #[doc = " Overrides OPTIX_GEOMETRY_FLAG_DISABLE_ANYHIT"]
+ #[doc = " Can be overridden by OPTIX_RAY_FLAG_DISABLE_ANYHIT."]
+ #[doc = " This flag is mutually exclusive with OPTIX_INSTANCE_FLAG_DISABLE_ANYHIT."]
+ pub const OPTIX_INSTANCE_FLAG_ENFORCE_ANYHIT: OptixInstanceFlags = OptixInstanceFlags(8);
+}
+#[repr(transparent)]
+#[doc = " Flags set on the #OptixInstance::flags."]
+#[doc = ""]
+#[doc = " These can be or'ed together to combine multiple flags."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixInstanceFlags(pub ::std::os::raw::c_uint);
+#[doc = " Instances"]
+#[doc = ""]
+#[doc = " \\see #OptixBuildInputInstanceArray::instances"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixInstance {
+ #[doc = " affine object-to-world transformation as 3x4 matrix in row-major layout"]
+ pub transform: [f32; 12usize],
+ #[doc = " Application supplied ID. The maximal ID can be queried using OPTIX_DEVICE_PROPERTY_LIMIT_MAX_INSTANCE_ID."]
+ pub instanceId: ::std::os::raw::c_uint,
+ #[doc = " SBT record offset. Will only be used for instances of geometry acceleration structure (GAS) objects."]
+ #[doc = " Needs to be set to 0 for instances of instance acceleration structure (IAS) objects. The maximal SBT offset"]
+ #[doc = " can be queried using OPTIX_DEVICE_PROPERTY_LIMIT_MAX_INSTANCE_SBT_OFFSET."]
+ pub sbtOffset: ::std::os::raw::c_uint,
+ #[doc = " Visibility mask. If rayMask & instanceMask == 0 the instance is culled. The number of available bits can be"]
+ #[doc = " queried using OPTIX_DEVICE_PROPERTY_LIMIT_NUM_BITS_INSTANCE_VISIBILITY_MASK."]
+ pub visibilityMask: ::std::os::raw::c_uint,
+ #[doc = " Any combination of OptixInstanceFlags is allowed."]
+ pub flags: ::std::os::raw::c_uint,
+ #[doc = " Set with an OptixTraversableHandle."]
+ pub traversableHandle: OptixTraversableHandle,
+ #[doc = " round up to 80-byte, to ensure 16-byte alignment"]
+ pub pad: [::std::os::raw::c_uint; 2usize],
+}
+impl OptixBuildFlags {
+ #[doc = " No special flags set."]
+ pub const OPTIX_BUILD_FLAG_NONE: OptixBuildFlags = OptixBuildFlags(0);
+}
+impl OptixBuildFlags {
+ #[doc = " Allow updating the build with new vertex positions with subsequent calls to"]
+ #[doc = " optixAccelBuild."]
+ pub const OPTIX_BUILD_FLAG_ALLOW_UPDATE: OptixBuildFlags = OptixBuildFlags(1);
+}
+impl OptixBuildFlags {
+ #[doc = " Allow updating the build with new vertex positions with subsequent calls to"]
+ #[doc = " optixAccelBuild."]
+ pub const OPTIX_BUILD_FLAG_ALLOW_COMPACTION: OptixBuildFlags = OptixBuildFlags(2);
+}
+impl OptixBuildFlags {
+ #[doc = " Allow updating the build with new vertex positions with subsequent calls to"]
+ #[doc = " optixAccelBuild."]
+ pub const OPTIX_BUILD_FLAG_PREFER_FAST_TRACE: OptixBuildFlags = OptixBuildFlags(4);
+}
+impl OptixBuildFlags {
+ #[doc = " Allow updating the build with new vertex positions with subsequent calls to"]
+ #[doc = " optixAccelBuild."]
+ pub const OPTIX_BUILD_FLAG_PREFER_FAST_BUILD: OptixBuildFlags = OptixBuildFlags(8);
+}
+impl OptixBuildFlags {
+ #[doc = " Allow random access to build input vertices"]
+ #[doc = " See optixGetTriangleVertexData"]
+ #[doc = " optixGetLinearCurveVertexData"]
+ #[doc = " optixGetQuadraticBSplineVertexData"]
+ #[doc = " optixGetCubicBSplineVertexData"]
+ #[doc = " optixGetCatmullRomVertexData"]
+ pub const OPTIX_BUILD_FLAG_ALLOW_RANDOM_VERTEX_ACCESS: OptixBuildFlags = OptixBuildFlags(16);
+}
+impl OptixBuildFlags {
+ #[doc = " Allow random access to instances"]
+ #[doc = " See optixGetInstanceTraversableFromIAS"]
+ pub const OPTIX_BUILD_FLAG_ALLOW_RANDOM_INSTANCE_ACCESS: OptixBuildFlags = OptixBuildFlags(32);
+}
+#[repr(transparent)]
+#[doc = " Builder Options"]
+#[doc = ""]
+#[doc = " Used for #OptixAccelBuildOptions::buildFlags. Can be or'ed together."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixBuildFlags(pub ::std::os::raw::c_uint);
+impl OptixBuildOperation {
+ #[doc = " Perform a full build operation"]
+ pub const OPTIX_BUILD_OPERATION_BUILD: OptixBuildOperation = OptixBuildOperation(8545);
+}
+impl OptixBuildOperation {
+ #[doc = " Perform an update using new bounds"]
+ pub const OPTIX_BUILD_OPERATION_UPDATE: OptixBuildOperation = OptixBuildOperation(8546);
+}
+#[repr(transparent)]
+#[doc = " Enum to specify the acceleration build operation."]
+#[doc = ""]
+#[doc = " Used in OptixAccelBuildOptions, which is then passed to optixAccelBuild and"]
+#[doc = " optixAccelComputeMemoryUsage, this enum indicates whether to do a build or an update"]
+#[doc = " of the acceleration structure."]
+#[doc = ""]
+#[doc = " Acceleration structure updates utilize the same acceleration structure, but with"]
+#[doc = " updated bounds. Updates are typically much faster than builds, however, large"]
+#[doc = " perturbations can degrade the quality of the acceleration structure."]
+#[doc = ""]
+#[doc = " \\see #optixAccelComputeMemoryUsage(), #optixAccelBuild(), #OptixAccelBuildOptions"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixBuildOperation(pub ::std::os::raw::c_uint);
+impl OptixMotionFlags {
+ pub const OPTIX_MOTION_FLAG_NONE: OptixMotionFlags = OptixMotionFlags(0);
+}
+impl OptixMotionFlags {
+ pub const OPTIX_MOTION_FLAG_START_VANISH: OptixMotionFlags = OptixMotionFlags(1);
+}
+impl OptixMotionFlags {
+ pub const OPTIX_MOTION_FLAG_END_VANISH: OptixMotionFlags = OptixMotionFlags(2);
+}
+#[repr(transparent)]
+#[doc = " Enum to specify motion flags."]
+#[doc = ""]
+#[doc = " \\see #OptixMotionOptions::flags."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixMotionFlags(pub ::std::os::raw::c_uint);
+#[doc = " Motion options"]
+#[doc = ""]
+#[doc = " \\see #OptixAccelBuildOptions::motionOptions, #OptixMatrixMotionTransform::motionOptions,"]
+#[doc = " #OptixSRTMotionTransform::motionOptions"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixMotionOptions {
+ #[doc = " If numKeys > 1, motion is enabled. timeBegin,"]
+ #[doc = " timeEnd and flags are all ignored when motion is disabled."]
+ pub numKeys: ::std::os::raw::c_ushort,
+ #[doc = " Combinations of #OptixMotionFlags"]
+ pub flags: ::std::os::raw::c_ushort,
+ #[doc = " Point in time where motion starts."]
+ pub timeBegin: f32,
+ #[doc = " Point in time where motion ends."]
+ pub timeEnd: f32,
+}
+#[doc = " Build options for acceleration structures."]
+#[doc = ""]
+#[doc = " \\see #optixAccelComputeMemoryUsage(), #optixAccelBuild()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixAccelBuildOptions {
+ #[doc = " Combinations of OptixBuildFlags"]
+ pub buildFlags: ::std::os::raw::c_uint,
+ #[doc = " If OPTIX_BUILD_OPERATION_UPDATE the output buffer is assumed to contain the result"]
+ #[doc = " of a full build with OPTIX_BUILD_FLAG_ALLOW_UPDATE set and using the same number of"]
+ #[doc = " primitives. It is updated incrementally to reflect the current position of the"]
+ #[doc = " primitives."]
+ pub operation: OptixBuildOperation,
+ #[doc = " Options for motion."]
+ pub motionOptions: OptixMotionOptions,
+}
+#[doc = " Struct for querying builder allocation requirements."]
+#[doc = ""]
+#[doc = " Once queried the sizes should be used to allocate device memory of at least these sizes."]
+#[doc = ""]
+#[doc = " \\see #optixAccelComputeMemoryUsage()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixAccelBufferSizes {
+ #[doc = " The size in bytes required for the outputBuffer parameter to optixAccelBuild when"]
+ #[doc = " doing a build (OPTIX_BUILD_OPERATION_BUILD)."]
+ pub outputSizeInBytes: usize,
+ #[doc = " The size in bytes required for the tempBuffer paramter to optixAccelBuild when"]
+ #[doc = " doing a build (OPTIX_BUILD_OPERATION_BUILD)."]
+ pub tempSizeInBytes: usize,
+ #[doc = " The size in bytes required for the tempBuffer parameter to optixAccelBuild"]
+ #[doc = " when doing an update (OPTIX_BUILD_OPERATION_UPDATE). This value can be different"]
+ #[doc = " than tempSizeInBytes used for a full build. Only non-zero if"]
+ #[doc = " OPTIX_BUILD_FLAG_ALLOW_UPDATE flag is set in OptixAccelBuildOptions."]
+ pub tempUpdateSizeInBytes: usize,
+}
+impl OptixAccelPropertyType {
+ #[doc = " Size of a compacted acceleration structure. The device pointer points to a uint64."]
+ pub const OPTIX_PROPERTY_TYPE_COMPACTED_SIZE: OptixAccelPropertyType =
+ OptixAccelPropertyType(8577);
+}
+impl OptixAccelPropertyType {
+ #[doc = " OptixAabb * numMotionSteps"]
+ pub const OPTIX_PROPERTY_TYPE_AABBS: OptixAccelPropertyType = OptixAccelPropertyType(8578);
+}
+#[repr(transparent)]
+#[doc = " Properties which can be emitted during acceleration structure build."]
+#[doc = ""]
+#[doc = " \\see #OptixAccelEmitDesc::type."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixAccelPropertyType(pub ::std::os::raw::c_uint);
+#[doc = " Specifies a type and output destination for emitted post-build properties."]
+#[doc = ""]
+#[doc = " \\see #optixAccelBuild()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixAccelEmitDesc {
+ #[doc = " Output buffer for the properties"]
+ pub result: CUdeviceptr,
+ #[doc = " Requested property"]
+ pub type_: OptixAccelPropertyType,
+}
+#[doc = " Used to store information related to relocation of acceleration structures."]
+#[doc = ""]
+#[doc = " \\see #optixAccelGetRelocationInfo(), #optixAccelCheckRelocationCompatibility(), #optixAccelRelocate()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixAccelRelocationInfo {
+ #[doc = " Opaque data, used internally, should not be modified"]
+ pub info: [::std::os::raw::c_ulonglong; 4usize],
+}
+#[doc = " Static transform"]
+#[doc = ""]
+#[doc = " The device address of instances of this type must be a multiple of OPTIX_TRANSFORM_BYTE_ALIGNMENT."]
+#[doc = ""]
+#[doc = " \\see #optixConvertPointerToTraversableHandle()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixStaticTransform {
+ #[doc = " The traversable transformed by this transformation"]
+ pub child: OptixTraversableHandle,
+ #[doc = " Padding to make the transformations 16 byte aligned"]
+ pub pad: [::std::os::raw::c_uint; 2usize],
+ #[doc = " Affine object-to-world transformation as 3x4 matrix in row-major layout"]
+ pub transform: [f32; 12usize],
+ #[doc = " Affine world-to-object transformation as 3x4 matrix in row-major layout"]
+ #[doc = " Must be the inverse of the transform matrix"]
+ pub invTransform: [f32; 12usize],
+}
+#[doc = " Represents a matrix motion transformation."]
+#[doc = ""]
+#[doc = " The device address of instances of this type must be a multiple of OPTIX_TRANSFORM_BYTE_ALIGNMENT."]
+#[doc = ""]
+#[doc = " This struct, as defined here, handles only N=2 motion keys due to the fixed array length of its transform member."]
+#[doc = " The following example shows how to create instances for an arbitrary number N of motion keys:"]
+#[doc = ""]
+#[doc = " \\code"]
+#[doc = " float matrixData[N][12];"]
+#[doc = " ... // setup matrixData"]
+#[doc = ""]
+#[doc = " size_t transformSizeInBytes = sizeof( OptixMatrixMotionTransform ) + ( N-2 ) * 12 * sizeof( float );"]
+#[doc = " OptixMatrixMotionTransform* matrixMoptionTransform = (OptixMatrixMotionTransform*) malloc( transformSizeInBytes );"]
+#[doc = " memset( matrixMoptionTransform, 0, transformSizeInBytes );"]
+#[doc = ""]
+#[doc = " ... // setup other members of matrixMoptionTransform"]
+#[doc = " matrixMoptionTransform->motionOptions.numKeys/// = N;"]
+#[doc = " memcpy( matrixMoptionTransform->transform, matrixData, N * 12 * sizeof( float ) );"]
+#[doc = ""]
+#[doc = " ... // copy matrixMoptionTransform to device memory"]
+#[doc = " free( matrixMoptionTransform )"]
+#[doc = " \\endcode"]
+#[doc = ""]
+#[doc = " \\see #optixConvertPointerToTraversableHandle()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixMatrixMotionTransform {
+ #[doc = " The traversable that is transformed by this transformation"]
+ pub child: OptixTraversableHandle,
+ #[doc = " The motion options for this transformation"]
+ pub motionOptions: OptixMotionOptions,
+ #[doc = " Padding to make the transformation 16 byte aligned"]
+ pub pad: [::std::os::raw::c_uint; 3usize],
+ #[doc = " Affine object-to-world transformation as 3x4 matrix in row-major layout"]
+ pub transform: [[f32; 12usize]; 2usize],
+}
+#[doc = " defines another translation that is applied after the rotation. Typically, this translation includes"]
+#[doc = " the inverse translation from the matrix S to reverse the translation for the pivot point for R."]
+#[doc = ""]
+#[doc = " To obtain the effective transformation at time t, the elements of the components of S, R, and T will be interpolated"]
+#[doc = " linearly. The components are then multiplied to obtain the combined transformation C = T * R * S. The transformation"]
+#[doc = " C is the effective object-to-world transformations at time t, and C^(-1) is the effective world-to-object"]
+#[doc = " transformation at time t."]
+#[doc = ""]
+#[doc = " \\see #OptixSRTMotionTransform::srtData, #optixConvertPointerToTraversableHandle()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixSRTData {
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub sx: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub a: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub b: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub pvx: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub sy: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub c: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub pvy: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub sz: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub pvz: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub qx: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub qy: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub qz: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub qw: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub tx: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub ty: f32,
+ #[doc = " \\name Parameters describing the SRT transformation"]
+ #[doc = " @{"]
+ pub tz: f32,
+}
+#[doc = " Represents an SRT motion transformation."]
+#[doc = ""]
+#[doc = " The device address of instances of this type must be a multiple of OPTIX_TRANSFORM_BYTE_ALIGNMENT."]
+#[doc = ""]
+#[doc = " This struct, as defined here, handles only N=2 motion keys due to the fixed array length of its srtData member."]
+#[doc = " The following example shows how to create instances for an arbitrary number N of motion keys:"]
+#[doc = ""]
+#[doc = " \\code"]
+#[doc = " OptixSRTData srtData[N];"]
+#[doc = " ... // setup srtData"]
+#[doc = ""]
+#[doc = " size_t transformSizeInBytes = sizeof( OptixSRTMotionTransform ) + ( N-2 ) * sizeof( OptixSRTData );"]
+#[doc = " OptixSRTMotionTransform* srtMotionTransform = (OptixSRTMotionTransform*) malloc( transformSizeInBytes );"]
+#[doc = " memset( srtMotionTransform, 0, transformSizeInBytes );"]
+#[doc = ""]
+#[doc = " ... // setup other members of srtMotionTransform"]
+#[doc = " srtMotionTransform->motionOptions.numKeys = N;"]
+#[doc = " memcpy( srtMotionTransform->srtData, srtData, N * sizeof( OptixSRTData ) );"]
+#[doc = ""]
+#[doc = " ... // copy srtMotionTransform to device memory"]
+#[doc = " free( srtMotionTransform )"]
+#[doc = " \\endcode"]
+#[doc = ""]
+#[doc = " \\see #optixConvertPointerToTraversableHandle()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixSRTMotionTransform {
+ #[doc = " The traversable transformed by this transformation"]
+ pub child: OptixTraversableHandle,
+ #[doc = " The motion options for this transformation"]
+ pub motionOptions: OptixMotionOptions,
+ #[doc = " Padding to make the SRT data 16 byte aligned"]
+ pub pad: [::std::os::raw::c_uint; 3usize],
+ #[doc = " The actual SRT data describing the transformation"]
+ pub srtData: [OptixSRTData; 2usize],
+}
+impl OptixTraversableType {
+ #[doc = " Static transforms. \\see #OptixStaticTransform"]
+ pub const OPTIX_TRAVERSABLE_TYPE_STATIC_TRANSFORM: OptixTraversableType =
+ OptixTraversableType(8641);
+}
+impl OptixTraversableType {
+ #[doc = " Matrix motion transform. \\see #OptixMatrixMotionTransform"]
+ pub const OPTIX_TRAVERSABLE_TYPE_MATRIX_MOTION_TRANSFORM: OptixTraversableType =
+ OptixTraversableType(8642);
+}
+impl OptixTraversableType {
+ #[doc = " SRT motion transform. \\see #OptixSRTMotionTransform"]
+ pub const OPTIX_TRAVERSABLE_TYPE_SRT_MOTION_TRANSFORM: OptixTraversableType =
+ OptixTraversableType(8643);
+}
+#[repr(transparent)]
+#[doc = " Traversable Handles"]
+#[doc = ""]
+#[doc = " \\see #optixConvertPointerToTraversableHandle()"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixTraversableType(pub ::std::os::raw::c_uint);
+impl OptixPixelFormat {
+ #[doc = "< two halfs, XY"]
+ pub const OPTIX_PIXEL_FORMAT_HALF2: OptixPixelFormat = OptixPixelFormat(8711);
+}
+impl OptixPixelFormat {
+ #[doc = "< three halfs, RGB"]
+ pub const OPTIX_PIXEL_FORMAT_HALF3: OptixPixelFormat = OptixPixelFormat(8705);
+}
+impl OptixPixelFormat {
+ #[doc = "< four halfs, RGBA"]
+ pub const OPTIX_PIXEL_FORMAT_HALF4: OptixPixelFormat = OptixPixelFormat(8706);
+}
+impl OptixPixelFormat {
+ #[doc = "< two floats, XY"]
+ pub const OPTIX_PIXEL_FORMAT_FLOAT2: OptixPixelFormat = OptixPixelFormat(8712);
+}
+impl OptixPixelFormat {
+ #[doc = "< three floats, RGB"]
+ pub const OPTIX_PIXEL_FORMAT_FLOAT3: OptixPixelFormat = OptixPixelFormat(8707);
+}
+impl OptixPixelFormat {
+ #[doc = "< four floats, RGBA"]
+ pub const OPTIX_PIXEL_FORMAT_FLOAT4: OptixPixelFormat = OptixPixelFormat(8708);
+}
+impl OptixPixelFormat {
+ #[doc = "< three unsigned chars, RGB"]
+ pub const OPTIX_PIXEL_FORMAT_UCHAR3: OptixPixelFormat = OptixPixelFormat(8709);
+}
+impl OptixPixelFormat {
+ #[doc = "< four unsigned chars, RGBA"]
+ pub const OPTIX_PIXEL_FORMAT_UCHAR4: OptixPixelFormat = OptixPixelFormat(8710);
+}
+#[repr(transparent)]
+#[doc = " Pixel formats used by the denoiser."]
+#[doc = ""]
+#[doc = " \\see #OptixImage2D::format"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixPixelFormat(pub ::std::os::raw::c_uint);
+#[doc = " Image descriptor used by the denoiser."]
+#[doc = ""]
+#[doc = " \\see #optixDenoiserInvoke(), #optixDenoiserComputeIntensity()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixImage2D {
+ #[doc = " Pointer to the actual pixel data."]
+ pub data: CUdeviceptr,
+ #[doc = " Width of the image (in pixels)"]
+ pub width: ::std::os::raw::c_uint,
+ #[doc = " Height of the image (in pixels)"]
+ pub height: ::std::os::raw::c_uint,
+ #[doc = " Stride between subsequent rows of the image (in bytes)."]
+ pub rowStrideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Stride between subsequent pixels of the image (in bytes)."]
+ #[doc = " For now, only 0 or the value that corresponds to a dense packing of pixels (no gaps) is supported."]
+ pub pixelStrideInBytes: ::std::os::raw::c_uint,
+ #[doc = " Pixel format."]
+ pub format: OptixPixelFormat,
+}
+impl OptixDenoiserModelKind {
+ #[doc = " Use the built-in model appropriate for low dynamic range input."]
+ pub const OPTIX_DENOISER_MODEL_KIND_LDR: OptixDenoiserModelKind = OptixDenoiserModelKind(8994);
+}
+impl OptixDenoiserModelKind {
+ #[doc = " Use the built-in model appropriate for high dynamic range input."]
+ pub const OPTIX_DENOISER_MODEL_KIND_HDR: OptixDenoiserModelKind = OptixDenoiserModelKind(8995);
+}
+impl OptixDenoiserModelKind {
+ #[doc = " Use the built-in model appropriate for high dynamic range input and support for AOVs"]
+ pub const OPTIX_DENOISER_MODEL_KIND_AOV: OptixDenoiserModelKind = OptixDenoiserModelKind(8996);
+}
+impl OptixDenoiserModelKind {
+ #[doc = " Use the built-in model appropriate for high dynamic range input, temporally stable"]
+ pub const OPTIX_DENOISER_MODEL_KIND_TEMPORAL: OptixDenoiserModelKind =
+ OptixDenoiserModelKind(8997);
+}
+impl OptixDenoiserModelKind {
+ #[doc = " Use the built-in model appropriate for high dynamic range input and support for AOVs, temporally stable"]
+ pub const OPTIX_DENOISER_MODEL_KIND_TEMPORAL_AOV: OptixDenoiserModelKind =
+ OptixDenoiserModelKind(8998);
+}
+#[repr(transparent)]
+#[doc = " Model kind used by the denoiser."]
+#[doc = ""]
+#[doc = " \\see #optixDenoiserCreate"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixDenoiserModelKind(pub ::std::os::raw::c_uint);
+#[doc = " Options used by the denoiser"]
+#[doc = ""]
+#[doc = " \\see #optixDenoiserCreate()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixDenoiserOptions {
+ pub guideAlbedo: ::std::os::raw::c_uint,
+ pub guideNormal: ::std::os::raw::c_uint,
+}
+#[doc = " Guide layer for the denoiser"]
+#[doc = ""]
+#[doc = " \\see #optixDenoiserInvoke()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixDenoiserGuideLayer {
+ pub albedo: OptixImage2D,
+ pub normal: OptixImage2D,
+ pub flow: OptixImage2D,
+}
+#[doc = " Input/Output layers for the denoiser"]
+#[doc = ""]
+#[doc = " \\see #optixDenoiserInvoke()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixDenoiserLayer {
+ pub input: OptixImage2D,
+ pub previousOutput: OptixImage2D,
+ pub output: OptixImage2D,
+}
+#[doc = " Various parameters used by the denoiser"]
+#[doc = ""]
+#[doc = " \\see #optixDenoiserInvoke()"]
+#[doc = " \\see #optixDenoiserComputeIntensity()"]
+#[doc = " \\see #optixDenoiserComputeAverageColor()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixDenoiserParams {
+ #[doc = " alpha denoise mode:"]
+ #[doc = " 0 Copy alpha (if present) from input layer, no denoising."]
+ #[doc = " 1 Denoise alpha separately. In AOV model kinds, treat alpha like an AOV."]
+ #[doc = " 2 In AOV model kinds, full denoise pass with alpha (slower than mode 1)."]
+ pub denoiseAlpha: ::std::os::raw::c_uint,
+ #[doc = " average log intensity of input image (default null pointer). points to a single float."]
+ #[doc = " with the default (null pointer) denoised results will not be optimal for very dark or"]
+ #[doc = " bright input images."]
+ pub hdrIntensity: CUdeviceptr,
+ #[doc = " blend factor."]
+ #[doc = " If set to 0 the output is 100% of the denoised input. If set to 1, the output is 100% of"]
+ #[doc = " the unmodified input. Values between 0 and 1 will linearly interpolate between the denoised"]
+ #[doc = " and unmodified input."]
+ pub blendFactor: f32,
+ #[doc = " this parameter is used when the OPTIX_DENOISER_MODEL_KIND_AOV model kind is set."]
+ #[doc = " average log color of input image, separate for RGB channels (default null pointer)."]
+ #[doc = " points to three floats. with the default (null pointer) denoised results will not be"]
+ #[doc = " optimal."]
+ pub hdrAverageColor: CUdeviceptr,
+}
+#[doc = " Various sizes related to the denoiser."]
+#[doc = ""]
+#[doc = " \\see #optixDenoiserComputeMemoryResources()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixDenoiserSizes {
+ pub stateSizeInBytes: usize,
+ pub withOverlapScratchSizeInBytes: usize,
+ pub withoutOverlapScratchSizeInBytes: usize,
+ pub overlapWindowSizeInPixels: ::std::os::raw::c_uint,
+}
+impl OptixRayFlags {
+ #[doc = " No change from the behavior configured for the individual AS."]
+ pub const OPTIX_RAY_FLAG_NONE: OptixRayFlags = OptixRayFlags(0);
+}
+impl OptixRayFlags {
+ #[doc = " Disables anyhit programs for the ray."]
+ #[doc = " Overrides OPTIX_INSTANCE_FLAG_ENFORCE_ANYHIT."]
+ #[doc = " This flag is mutually exclusive with OPTIX_RAY_FLAG_ENFORCE_ANYHIT,"]
+ #[doc = " OPTIX_RAY_FLAG_CULL_DISABLED_ANYHIT, OPTIX_RAY_FLAG_CULL_ENFORCED_ANYHIT."]
+ pub const OPTIX_RAY_FLAG_DISABLE_ANYHIT: OptixRayFlags = OptixRayFlags(1);
+}
+impl OptixRayFlags {
+ #[doc = " Forces anyhit program execution for the ray."]
+ #[doc = " Overrides OPTIX_GEOMETRY_FLAG_DISABLE_ANYHIT as well as OPTIX_INSTANCE_FLAG_DISABLE_ANYHIT."]
+ #[doc = " This flag is mutually exclusive with OPTIX_RAY_FLAG_DISABLE_ANYHIT,"]
+ #[doc = " OPTIX_RAY_FLAG_CULL_DISABLED_ANYHIT, OPTIX_RAY_FLAG_CULL_ENFORCED_ANYHIT."]
+ pub const OPTIX_RAY_FLAG_ENFORCE_ANYHIT: OptixRayFlags = OptixRayFlags(2);
+}
+impl OptixRayFlags {
+ #[doc = " Terminates the ray after the first hit and executes"]
+ #[doc = " the closesthit program of that hit."]
+ pub const OPTIX_RAY_FLAG_TERMINATE_ON_FIRST_HIT: OptixRayFlags = OptixRayFlags(4);
+}
+impl OptixRayFlags {
+ #[doc = " Disables closesthit programs for the ray, but still executes miss program in case of a miss."]
+ pub const OPTIX_RAY_FLAG_DISABLE_CLOSESTHIT: OptixRayFlags = OptixRayFlags(8);
+}
+impl OptixRayFlags {
+ #[doc = " Do not intersect triangle back faces"]
+ #[doc = " (respects a possible face change due to instance flag"]
+ #[doc = " OPTIX_INSTANCE_FLAG_FLIP_TRIANGLE_FACING)."]
+ #[doc = " This flag is mutually exclusive with OPTIX_RAY_FLAG_CULL_FRONT_FACING_TRIANGLES."]
+ pub const OPTIX_RAY_FLAG_CULL_BACK_FACING_TRIANGLES: OptixRayFlags = OptixRayFlags(16);
+}
+impl OptixRayFlags {
+ #[doc = " Do not intersect triangle front faces"]
+ #[doc = " (respects a possible face change due to instance flag"]
+ #[doc = " OPTIX_INSTANCE_FLAG_FLIP_TRIANGLE_FACING)."]
+ #[doc = " This flag is mutually exclusive with OPTIX_RAY_FLAG_CULL_BACK_FACING_TRIANGLES."]
+ pub const OPTIX_RAY_FLAG_CULL_FRONT_FACING_TRIANGLES: OptixRayFlags = OptixRayFlags(32);
+}
+impl OptixRayFlags {
+ #[doc = " Do not intersect geometry which disables anyhit programs"]
+ #[doc = " (due to setting geometry flag OPTIX_GEOMETRY_FLAG_DISABLE_ANYHIT or"]
+ #[doc = " instance flag OPTIX_INSTANCE_FLAG_DISABLE_ANYHIT)."]
+ #[doc = " This flag is mutually exclusive with OPTIX_RAY_FLAG_CULL_ENFORCED_ANYHIT,"]
+ #[doc = " OPTIX_RAY_FLAG_ENFORCE_ANYHIT, OPTIX_RAY_FLAG_DISABLE_ANYHIT."]
+ pub const OPTIX_RAY_FLAG_CULL_DISABLED_ANYHIT: OptixRayFlags = OptixRayFlags(64);
+}
+impl OptixRayFlags {
+ #[doc = " Do not intersect geometry which have an enabled anyhit program"]
+ #[doc = " (due to not setting geometry flag OPTIX_GEOMETRY_FLAG_DISABLE_ANYHIT or"]
+ #[doc = " setting instance flag OPTIX_INSTANCE_FLAG_ENFORCE_ANYHIT)."]
+ #[doc = " This flag is mutually exclusive with OPTIX_RAY_FLAG_CULL_DISABLED_ANYHIT,"]
+ #[doc = " OPTIX_RAY_FLAG_ENFORCE_ANYHIT, OPTIX_RAY_FLAG_DISABLE_ANYHIT."]
+ pub const OPTIX_RAY_FLAG_CULL_ENFORCED_ANYHIT: OptixRayFlags = OptixRayFlags(128);
+}
+#[repr(transparent)]
+#[doc = " Ray flags passed to the device function #optixTrace(). These affect the behavior of"]
+#[doc = " traversal per invocation."]
+#[doc = ""]
+#[doc = " \\see #optixTrace()"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixRayFlags(pub ::std::os::raw::c_uint);
+impl OptixTransformType {
+ #[doc = "< Not a transformation"]
+ pub const OPTIX_TRANSFORM_TYPE_NONE: OptixTransformType = OptixTransformType(0);
+}
+impl OptixTransformType {
+ #[doc = "< \\see #OptixStaticTransform"]
+ pub const OPTIX_TRANSFORM_TYPE_STATIC_TRANSFORM: OptixTransformType = OptixTransformType(1);
+}
+impl OptixTransformType {
+ #[doc = "< \\see #OptixMatrixMotionTransform"]
+ pub const OPTIX_TRANSFORM_TYPE_MATRIX_MOTION_TRANSFORM: OptixTransformType =
+ OptixTransformType(2);
+}
+impl OptixTransformType {
+ #[doc = "< \\see #OptixSRTMotionTransform"]
+ pub const OPTIX_TRANSFORM_TYPE_SRT_MOTION_TRANSFORM: OptixTransformType = OptixTransformType(3);
+}
+impl OptixTransformType {
+ #[doc = "< \\see #OptixInstance"]
+ pub const OPTIX_TRANSFORM_TYPE_INSTANCE: OptixTransformType = OptixTransformType(4);
+}
+#[repr(transparent)]
+#[doc = " Transform"]
+#[doc = ""]
+#[doc = " OptixTransformType is used by the device function #optixGetTransformTypeFromHandle() to"]
+#[doc = " determine the type of the OptixTraversableHandle returned from"]
+#[doc = " optixGetTransformListHandle()."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixTransformType(pub ::std::os::raw::c_uint);
+impl OptixTraversableGraphFlags {
+ #[doc = " Used to signal that any traversable graphs is valid."]
+ #[doc = " This flag is mutually exclusive with all other flags."]
+ pub const OPTIX_TRAVERSABLE_GRAPH_FLAG_ALLOW_ANY: OptixTraversableGraphFlags =
+ OptixTraversableGraphFlags(0);
+}
+impl OptixTraversableGraphFlags {
+ #[doc = " Used to signal that a traversable graph of a single Geometry Acceleration"]
+ #[doc = " Structure (GAS) without any transforms is valid. This flag may be combined with"]
+ #[doc = " other flags except for OPTIX_TRAVERSABLE_GRAPH_FLAG_ALLOW_ANY."]
+ pub const OPTIX_TRAVERSABLE_GRAPH_FLAG_ALLOW_SINGLE_GAS: OptixTraversableGraphFlags =
+ OptixTraversableGraphFlags(1);
+}
+impl OptixTraversableGraphFlags {
+ #[doc = " Used to signal that a traversable graph of a single Instance Acceleration"]
+ #[doc = " Structure (IAS) directly connected to Geometry Acceleration Structure (GAS)"]
+ #[doc = " traversables without transform traversables in between is valid. This flag may"]
+ #[doc = " be combined with other flags except for OPTIX_TRAVERSABLE_GRAPH_FLAG_ALLOW_ANY."]
+ pub const OPTIX_TRAVERSABLE_GRAPH_FLAG_ALLOW_SINGLE_LEVEL_INSTANCING:
+ OptixTraversableGraphFlags = OptixTraversableGraphFlags(2);
+}
+#[repr(transparent)]
+#[doc = " Specifies the set of valid traversable graphs that may be"]
+#[doc = " passed to invocation of #optixTrace(). Flags may be bitwise combined."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixTraversableGraphFlags(pub ::std::os::raw::c_uint);
+impl OptixCompileOptimizationLevel {
+ #[doc = " Default is to run all optimizations"]
+ pub const OPTIX_COMPILE_OPTIMIZATION_DEFAULT: OptixCompileOptimizationLevel =
+ OptixCompileOptimizationLevel(0);
+}
+impl OptixCompileOptimizationLevel {
+ #[doc = " No optimizations"]
+ pub const OPTIX_COMPILE_OPTIMIZATION_LEVEL_0: OptixCompileOptimizationLevel =
+ OptixCompileOptimizationLevel(9024);
+}
+impl OptixCompileOptimizationLevel {
+ #[doc = " Some optimizations"]
+ pub const OPTIX_COMPILE_OPTIMIZATION_LEVEL_1: OptixCompileOptimizationLevel =
+ OptixCompileOptimizationLevel(9025);
+}
+impl OptixCompileOptimizationLevel {
+ #[doc = " Most optimizations"]
+ pub const OPTIX_COMPILE_OPTIMIZATION_LEVEL_2: OptixCompileOptimizationLevel =
+ OptixCompileOptimizationLevel(9026);
+}
+impl OptixCompileOptimizationLevel {
+ #[doc = " All optimizations"]
+ pub const OPTIX_COMPILE_OPTIMIZATION_LEVEL_3: OptixCompileOptimizationLevel =
+ OptixCompileOptimizationLevel(9027);
+}
+#[repr(transparent)]
+#[doc = " Optimization levels"]
+#[doc = ""]
+#[doc = " \\see #OptixModuleCompileOptions::optLevel"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixCompileOptimizationLevel(pub ::std::os::raw::c_uint);
+impl OptixCompileDebugLevel {
+ #[doc = " Default currently is minimal"]
+ pub const OPTIX_COMPILE_DEBUG_LEVEL_DEFAULT: OptixCompileDebugLevel = OptixCompileDebugLevel(0);
+}
+impl OptixCompileDebugLevel {
+ #[doc = " No debug information"]
+ pub const OPTIX_COMPILE_DEBUG_LEVEL_NONE: OptixCompileDebugLevel = OptixCompileDebugLevel(9040);
+}
+impl OptixCompileDebugLevel {
+ #[doc = " Generate information that does not impact performance."]
+ #[doc = " Note this replaces OPTIX_COMPILE_DEBUG_LEVEL_LINEINFO."]
+ pub const OPTIX_COMPILE_DEBUG_LEVEL_MINIMAL: OptixCompileDebugLevel =
+ OptixCompileDebugLevel(9041);
+}
+impl OptixCompileDebugLevel {
+ #[doc = " Generate some debug information with slight performance cost"]
+ pub const OPTIX_COMPILE_DEBUG_LEVEL_MODERATE: OptixCompileDebugLevel =
+ OptixCompileDebugLevel(9043);
+}
+impl OptixCompileDebugLevel {
+ #[doc = " Generate full debug information"]
+ pub const OPTIX_COMPILE_DEBUG_LEVEL_FULL: OptixCompileDebugLevel = OptixCompileDebugLevel(9042);
+}
+#[repr(transparent)]
+#[doc = " Debug levels"]
+#[doc = ""]
+#[doc = " \\see #OptixModuleCompileOptions::debugLevel"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixCompileDebugLevel(pub ::std::os::raw::c_uint);
+impl OptixModuleCompileState {
+ #[doc = " No OptixTask objects have started"]
+ pub const OPTIX_MODULE_COMPILE_STATE_NOT_STARTED: OptixModuleCompileState =
+ OptixModuleCompileState(9056);
+}
+impl OptixModuleCompileState {
+ #[doc = " Started, but not all OptixTask objects have completed. No detected failures."]
+ pub const OPTIX_MODULE_COMPILE_STATE_STARTED: OptixModuleCompileState =
+ OptixModuleCompileState(9057);
+}
+impl OptixModuleCompileState {
+ #[doc = " Not all OptixTask objects have completed, but at least one has failed."]
+ pub const OPTIX_MODULE_COMPILE_STATE_IMPENDING_FAILURE: OptixModuleCompileState =
+ OptixModuleCompileState(9058);
+}
+impl OptixModuleCompileState {
+ #[doc = " All OptixTask objects have completed, and at least one has failed"]
+ pub const OPTIX_MODULE_COMPILE_STATE_FAILED: OptixModuleCompileState =
+ OptixModuleCompileState(9059);
+}
+impl OptixModuleCompileState {
+ #[doc = " All OptixTask objects have completed. The OptixModule is ready to be used."]
+ pub const OPTIX_MODULE_COMPILE_STATE_COMPLETED: OptixModuleCompileState =
+ OptixModuleCompileState(9060);
+}
+#[repr(transparent)]
+#[doc = " Module compilation state."]
+#[doc = ""]
+#[doc = " \\see #optixModuleGetCompilationState(), #optixModuleCreateFromPTXWithTasks()"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixModuleCompileState(pub ::std::os::raw::c_uint);
+#[doc = " Struct for specifying specializations for pipelineParams as specified in"]
+#[doc = " OptixPipelineCompileOptions::pipelineLaunchParamsVariableName."]
+#[doc = ""]
+#[doc = " The bound values are supposed to represent a constant value in the"]
+#[doc = " pipelineParams. OptiX will attempt to locate all loads from the pipelineParams and"]
+#[doc = " correlate them to the appropriate bound value, but there are cases where OptiX cannot"]
+#[doc = " safely or reliably do this. For example if the pointer to the pipelineParams is passed"]
+#[doc = " as an argument to a non-inline function or the offset of the load to the"]
+#[doc = " pipelineParams cannot be statically determined (e.g. accessed in a loop). No module"]
+#[doc = " should rely on the value being specialized in order to work correctly. The values in"]
+#[doc = " the pipelineParams specified on optixLaunch should match the bound value. If"]
+#[doc = " validation mode is enabled on the context, OptiX will verify that the bound values"]
+#[doc = " specified matches the values in pipelineParams specified to optixLaunch."]
+#[doc = ""]
+#[doc = " These values are compiled in to the module as constants. Once the constants are"]
+#[doc = " inserted into the code, an optimization pass will be run that will attempt to"]
+#[doc = " propagate the consants and remove unreachable code."]
+#[doc = ""]
+#[doc = " If caching is enabled, changes in these values will result in newly compiled modules."]
+#[doc = ""]
+#[doc = " The pipelineParamOffset and sizeInBytes must be within the bounds of the"]
+#[doc = " pipelineParams variable. OPTIX_ERROR_INVALID_VALUE will be returned from"]
+#[doc = " optixModuleCreateFromPTX otherwise."]
+#[doc = ""]
+#[doc = " If more than one bound value overlaps or the size of a bound value is equal to 0,"]
+#[doc = " an OPTIX_ERROR_INVALID_VALUE will be returned from optixModuleCreateFromPTX."]
+#[doc = ""]
+#[doc = " The same set of bound values do not need to be used for all modules in a pipeline, but"]
+#[doc = " overlapping values between modules must have the same value."]
+#[doc = " OPTIX_ERROR_INVALID_VALUE will be returned from optixPipelineCreate otherwise."]
+#[doc = ""]
+#[doc = " \\see #OptixModuleCompileOptions"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixModuleCompileBoundValueEntry {
+ pub pipelineParamOffsetInBytes: usize,
+ pub sizeInBytes: usize,
+ pub boundValuePtr: *const ::std::os::raw::c_void,
+ pub annotation: *const ::std::os::raw::c_char,
+}
+impl OptixPayloadTypeID {
+ pub const OPTIX_PAYLOAD_TYPE_DEFAULT: OptixPayloadTypeID = OptixPayloadTypeID(0);
+}
+impl OptixPayloadTypeID {
+ pub const OPTIX_PAYLOAD_TYPE_ID_0: OptixPayloadTypeID = OptixPayloadTypeID(1);
+}
+impl OptixPayloadTypeID {
+ pub const OPTIX_PAYLOAD_TYPE_ID_1: OptixPayloadTypeID = OptixPayloadTypeID(2);
+}
+impl OptixPayloadTypeID {
+ pub const OPTIX_PAYLOAD_TYPE_ID_2: OptixPayloadTypeID = OptixPayloadTypeID(4);
+}
+impl OptixPayloadTypeID {
+ pub const OPTIX_PAYLOAD_TYPE_ID_3: OptixPayloadTypeID = OptixPayloadTypeID(8);
+}
+impl OptixPayloadTypeID {
+ pub const OPTIX_PAYLOAD_TYPE_ID_4: OptixPayloadTypeID = OptixPayloadTypeID(16);
+}
+impl OptixPayloadTypeID {
+ pub const OPTIX_PAYLOAD_TYPE_ID_5: OptixPayloadTypeID = OptixPayloadTypeID(32);
+}
+impl OptixPayloadTypeID {
+ pub const OPTIX_PAYLOAD_TYPE_ID_6: OptixPayloadTypeID = OptixPayloadTypeID(64);
+}
+impl OptixPayloadTypeID {
+ pub const OPTIX_PAYLOAD_TYPE_ID_7: OptixPayloadTypeID = OptixPayloadTypeID(128);
+}
+#[repr(transparent)]
+#[doc = " Payload type identifiers."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixPayloadTypeID(pub ::std::os::raw::c_uint);
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_TRACE_CALLER_NONE: OptixPayloadSemantics =
+ OptixPayloadSemantics(0);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_TRACE_CALLER_READ: OptixPayloadSemantics =
+ OptixPayloadSemantics(1);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_TRACE_CALLER_WRITE: OptixPayloadSemantics =
+ OptixPayloadSemantics(2);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_TRACE_CALLER_READ_WRITE: OptixPayloadSemantics =
+ OptixPayloadSemantics(3);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_CH_NONE: OptixPayloadSemantics = OptixPayloadSemantics(0);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_CH_READ: OptixPayloadSemantics = OptixPayloadSemantics(4);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_CH_WRITE: OptixPayloadSemantics = OptixPayloadSemantics(8);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_CH_READ_WRITE: OptixPayloadSemantics =
+ OptixPayloadSemantics(12);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_MS_NONE: OptixPayloadSemantics = OptixPayloadSemantics(0);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_MS_READ: OptixPayloadSemantics = OptixPayloadSemantics(16);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_MS_WRITE: OptixPayloadSemantics = OptixPayloadSemantics(32);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_MS_READ_WRITE: OptixPayloadSemantics =
+ OptixPayloadSemantics(48);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_AH_NONE: OptixPayloadSemantics = OptixPayloadSemantics(0);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_AH_READ: OptixPayloadSemantics = OptixPayloadSemantics(64);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_AH_WRITE: OptixPayloadSemantics = OptixPayloadSemantics(128);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_AH_READ_WRITE: OptixPayloadSemantics =
+ OptixPayloadSemantics(192);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_IS_NONE: OptixPayloadSemantics = OptixPayloadSemantics(0);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_IS_READ: OptixPayloadSemantics = OptixPayloadSemantics(256);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_IS_WRITE: OptixPayloadSemantics = OptixPayloadSemantics(512);
+}
+impl OptixPayloadSemantics {
+ pub const OPTIX_PAYLOAD_SEMANTICS_IS_READ_WRITE: OptixPayloadSemantics =
+ OptixPayloadSemantics(768);
+}
+#[repr(transparent)]
+#[doc = " Semantic flags for a single payload word."]
+#[doc = ""]
+#[doc = " Used to specify the semantics of a payload word per shader type."]
+#[doc = " \"read\": Shader of this type may read the payload word."]
+#[doc = " \"write\": Shader of this type may write the payload word."]
+#[doc = ""]
+#[doc = " \"trace_caller_write\": Shaders may consume the value of the payload word passed to optixTrace by the caller."]
+#[doc = " \"trace_caller_read\": The caller to optixTrace may read the payload word after the call to optixTrace."]
+#[doc = ""]
+#[doc = " Semantics can be bitwise combined."]
+#[doc = " Combining \"read\" and \"write\" is equivalent to specifying \"read_write\"."]
+#[doc = " A payload needs to be writable by the caller or at least one shader type."]
+#[doc = " A payload needs to be readable by the caller or at least one shader type after a being writable."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixPayloadSemantics(pub ::std::os::raw::c_uint);
+#[doc = " Specifies a single payload type"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixPayloadType {
+ #[doc = " The number of 32b words the payload of this type holds"]
+ pub numPayloadValues: ::std::os::raw::c_uint,
+ #[doc = " Points to host array of payload word semantics, size must match numPayloadValues"]
+ pub payloadSemantics: *const ::std::os::raw::c_uint,
+}
+#[doc = " Compilation options for module"]
+#[doc = ""]
+#[doc = " \\see #optixModuleCreateFromPTX()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixModuleCompileOptions {
+ #[doc = " Maximum number of registers allowed when compiling to SASS."]
+ #[doc = " Set to 0 for no explicit limit. May vary within a pipeline."]
+ pub maxRegisterCount: ::std::os::raw::c_int,
+ #[doc = " Optimization level. May vary within a pipeline."]
+ pub optLevel: OptixCompileOptimizationLevel,
+ #[doc = " Generate debug information."]
+ pub debugLevel: OptixCompileDebugLevel,
+ #[doc = " Ingored if numBoundValues is set to 0"]
+ pub boundValues: *const OptixModuleCompileBoundValueEntry,
+ #[doc = " set to 0 if unused"]
+ pub numBoundValues: ::std::os::raw::c_uint,
+ #[doc = " The number of different payload types available for compilation."]
+ #[doc = " Must be zero if OptixPipelineCompileOptions::numPayloadValues is not zero."]
+ pub numPayloadTypes: ::std::os::raw::c_uint,
+ #[doc = " Points to host array of payload type definitions, size must match numPayloadTypes"]
+ pub payloadTypes: *mut OptixPayloadType,
+}
+impl OptixProgramGroupKind {
+ #[doc = " Program group containing a raygen (RG) program"]
+ #[doc = " \\see #OptixProgramGroupSingleModule, #OptixProgramGroupDesc::raygen"]
+ pub const OPTIX_PROGRAM_GROUP_KIND_RAYGEN: OptixProgramGroupKind = OptixProgramGroupKind(9249);
+}
+impl OptixProgramGroupKind {
+ #[doc = " Program group containing a miss (MS) program"]
+ #[doc = " \\see #OptixProgramGroupSingleModule, #OptixProgramGroupDesc::miss"]
+ pub const OPTIX_PROGRAM_GROUP_KIND_MISS: OptixProgramGroupKind = OptixProgramGroupKind(9250);
+}
+impl OptixProgramGroupKind {
+ #[doc = " Program group containing an exception (EX) program"]
+ #[doc = " \\see OptixProgramGroupHitgroup, #OptixProgramGroupDesc::exception"]
+ pub const OPTIX_PROGRAM_GROUP_KIND_EXCEPTION: OptixProgramGroupKind =
+ OptixProgramGroupKind(9251);
+}
+impl OptixProgramGroupKind {
+ #[doc = " Program group containing an intersection (IS), any hit (AH), and/or closest hit (CH) program"]
+ #[doc = " \\see #OptixProgramGroupSingleModule, #OptixProgramGroupDesc::hitgroup"]
+ pub const OPTIX_PROGRAM_GROUP_KIND_HITGROUP: OptixProgramGroupKind =
+ OptixProgramGroupKind(9252);
+}
+impl OptixProgramGroupKind {
+ #[doc = " Program group containing a direct (DC) or continuation (CC) callable program"]
+ #[doc = " \\see OptixProgramGroupCallables, #OptixProgramGroupDesc::callables"]
+ pub const OPTIX_PROGRAM_GROUP_KIND_CALLABLES: OptixProgramGroupKind =
+ OptixProgramGroupKind(9253);
+}
+#[repr(transparent)]
+#[doc = " Distinguishes different kinds of program groups."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixProgramGroupKind(pub ::std::os::raw::c_uint);
+impl OptixProgramGroupFlags {
+ #[doc = " Currently there are no flags"]
+ pub const OPTIX_PROGRAM_GROUP_FLAGS_NONE: OptixProgramGroupFlags = OptixProgramGroupFlags(0);
+}
+#[repr(transparent)]
+#[doc = " Flags for program groups"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixProgramGroupFlags(pub ::std::os::raw::c_uint);
+#[doc = " Program group representing a single module."]
+#[doc = ""]
+#[doc = " Used for raygen, miss, and exception programs. In case of raygen and exception programs, module and entry"]
+#[doc = " function name need to be valid. For miss programs, module and entry function name might both be \\c nullptr."]
+#[doc = ""]
+#[doc = " \\see #OptixProgramGroupDesc::raygen, #OptixProgramGroupDesc::miss, #OptixProgramGroupDesc::exception"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixProgramGroupSingleModule {
+ #[doc = " Module holding single program."]
+ pub module: OptixModule,
+ #[doc = " Entry function name of the single program."]
+ pub entryFunctionName: *const ::std::os::raw::c_char,
+}
+#[doc = " Program group representing the hitgroup."]
+#[doc = ""]
+#[doc = " For each of the three program types, module and entry function name might both be \\c nullptr."]
+#[doc = ""]
+#[doc = " \\see #OptixProgramGroupDesc::hitgroup"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixProgramGroupHitgroup {
+ #[doc = " Module holding the closest hit (CH) program."]
+ pub moduleCH: OptixModule,
+ #[doc = " Entry function name of the closest hit (CH) program."]
+ pub entryFunctionNameCH: *const ::std::os::raw::c_char,
+ #[doc = " Module holding the any hit (AH) program."]
+ pub moduleAH: OptixModule,
+ #[doc = " Entry function name of the any hit (AH) program."]
+ pub entryFunctionNameAH: *const ::std::os::raw::c_char,
+ #[doc = " Module holding the intersection (Is) program."]
+ pub moduleIS: OptixModule,
+ #[doc = " Entry function name of the intersection (IS) program."]
+ pub entryFunctionNameIS: *const ::std::os::raw::c_char,
+}
+#[doc = " Program group representing callables."]
+#[doc = ""]
+#[doc = " Module and entry function name need to be valid for at least one of the two callables."]
+#[doc = ""]
+#[doc = " \\see ##OptixProgramGroupDesc::callables"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixProgramGroupCallables {
+ #[doc = " Module holding the direct callable (DC) program."]
+ pub moduleDC: OptixModule,
+ #[doc = " Entry function name of the direct callable (DC) program."]
+ pub entryFunctionNameDC: *const ::std::os::raw::c_char,
+ #[doc = " Module holding the continuation callable (CC) program."]
+ pub moduleCC: OptixModule,
+ #[doc = " Entry function name of the continuation callable (CC) program."]
+ pub entryFunctionNameCC: *const ::std::os::raw::c_char,
+}
+#[doc = " Descriptor for program groups."]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixProgramGroupDesc {
+ #[doc = " The kind of program group."]
+ pub kind: OptixProgramGroupKind,
+ #[doc = " See #OptixProgramGroupFlags"]
+ pub flags: ::std::os::raw::c_uint,
+ pub __bindgen_anon_1: OptixProgramGroupDesc__bindgen_ty_1,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union OptixProgramGroupDesc__bindgen_ty_1 {
+ #[doc = " \\see #OPTIX_PROGRAM_GROUP_KIND_RAYGEN"]
+ pub raygen: OptixProgramGroupSingleModule,
+ #[doc = " \\see #OPTIX_PROGRAM_GROUP_KIND_MISS"]
+ pub miss: OptixProgramGroupSingleModule,
+ #[doc = " \\see #OPTIX_PROGRAM_GROUP_KIND_EXCEPTION"]
+ pub exception: OptixProgramGroupSingleModule,
+ #[doc = " \\see #OPTIX_PROGRAM_GROUP_KIND_CALLABLES"]
+ pub callables: OptixProgramGroupCallables,
+ #[doc = " \\see #OPTIX_PROGRAM_GROUP_KIND_HITGROUP"]
+ pub hitgroup: OptixProgramGroupHitgroup,
+}
+#[doc = " Program group options"]
+#[doc = ""]
+#[doc = " \\see #optixProgramGroupCreate()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixProgramGroupOptions {
+ #[doc = " Specifies the payload type of this program group."]
+ #[doc = " All programs in the group must support the payload type"]
+ #[doc = " (Program support for a type is specified by calling"]
+ #[doc = " \\see #optixSetPayloadTypes or otherwise all types specified in"]
+ #[doc = " \\see #OptixModuleCompileOptions are supported)."]
+ #[doc = " If a program is not available for the requested payload type,"]
+ #[doc = " optixProgramGroupCreate returns OPTIX_ERROR_PAYLOAD_TYPE_MISMATCH."]
+ #[doc = " If the payloadType is left zero, a unique type is deduced."]
+ #[doc = " The payload type can be uniquely deduced if there is exactly one payload type"]
+ #[doc = " for which all programs in the group are available."]
+ #[doc = " If the payload type could not be deduced uniquely"]
+ #[doc = " optixProgramGroupCreate returns OPTIX_ERROR_PAYLOAD_TYPE_RESOLUTION_FAILED."]
+ pub payloadType: *mut OptixPayloadType,
+}
+impl OptixExceptionCodes {
+ #[doc = " Stack overflow of the continuation stack."]
+ #[doc = " no exception details."]
+ pub const OPTIX_EXCEPTION_CODE_STACK_OVERFLOW: OptixExceptionCodes = OptixExceptionCodes(-1);
+}
+impl OptixExceptionCodes {
+ #[doc = " The trace depth is exceeded."]
+ #[doc = " no exception details."]
+ pub const OPTIX_EXCEPTION_CODE_TRACE_DEPTH_EXCEEDED: OptixExceptionCodes =
+ OptixExceptionCodes(-2);
+}
+impl OptixExceptionCodes {
+ #[doc = " The traversal depth is exceeded."]
+ #[doc = " Exception details:"]
+ #[doc = " optixGetTransformListSize()"]
+ #[doc = " optixGetTransformListHandle()"]
+ pub const OPTIX_EXCEPTION_CODE_TRAVERSAL_DEPTH_EXCEEDED: OptixExceptionCodes =
+ OptixExceptionCodes(-3);
+}
+impl OptixExceptionCodes {
+ #[doc = " Traversal encountered an invalid traversable type."]
+ #[doc = " Exception details:"]
+ #[doc = " optixGetTransformListSize()"]
+ #[doc = " optixGetTransformListHandle()"]
+ #[doc = " optixGetExceptionInvalidTraversable()"]
+ pub const OPTIX_EXCEPTION_CODE_TRAVERSAL_INVALID_TRAVERSABLE: OptixExceptionCodes =
+ OptixExceptionCodes(-5);
+}
+impl OptixExceptionCodes {
+ #[doc = " The miss SBT record index is out of bounds"]
+ #[doc = " A miss SBT record index is valid within the range [0, OptixShaderBindingTable::missRecordCount) (See optixLaunch)"]
+ #[doc = " Exception details:"]
+ #[doc = " optixGetExceptionInvalidSbtOffset()"]
+ pub const OPTIX_EXCEPTION_CODE_TRAVERSAL_INVALID_MISS_SBT: OptixExceptionCodes =
+ OptixExceptionCodes(-6);
+}
+impl OptixExceptionCodes {
+ #[doc = " sbt-geometry-acceleration-structure-index (See optixGetSbtGASIndex),"]
+ #[doc = " sbt-stride-from-trace-call and sbt-offset-from-trace-call (See optixTrace)"]
+ #[doc = ""]
+ #[doc = " sbt-index = sbt-instance-offset + (sbt-geometry-acceleration-structure-index * sbt-stride-from-trace-call) + sbt-offset-from-trace-call"]
+ #[doc = ""]
+ #[doc = " Exception details:"]
+ #[doc = " optixGetTransformListSize()"]
+ #[doc = " optixGetTransformListHandle()"]
+ #[doc = " optixGetExceptionInvalidSbtOffset()"]
+ #[doc = " optixGetSbtGASIndex()"]
+ pub const OPTIX_EXCEPTION_CODE_TRAVERSAL_INVALID_HIT_SBT: OptixExceptionCodes =
+ OptixExceptionCodes(-7);
+}
+impl OptixExceptionCodes {
+ #[doc = " The shader encountered an unsupported primitive type (See OptixPipelineCompileOptions::usesPrimitiveTypeFlags)."]
+ #[doc = " no exception details."]
+ pub const OPTIX_EXCEPTION_CODE_UNSUPPORTED_PRIMITIVE_TYPE: OptixExceptionCodes =
+ OptixExceptionCodes(-8);
+}
+impl OptixExceptionCodes {
+ #[doc = " The shader encountered a call to optixTrace with at least"]
+ #[doc = " one of the float arguments being inf or nan."]
+ #[doc = " Exception details:"]
+ #[doc = " optixGetExceptionInvalidRay()"]
+ pub const OPTIX_EXCEPTION_CODE_INVALID_RAY: OptixExceptionCodes = OptixExceptionCodes(-9);
+}
+impl OptixExceptionCodes {
+ #[doc = " The shader encountered a call to either optixDirectCall or optixCallableCall"]
+ #[doc = " where the argument count does not match the parameter count of the callable"]
+ #[doc = " program which is called."]
+ #[doc = " Exception details:"]
+ #[doc = " optixGetExceptionParameterMismatch"]
+ pub const OPTIX_EXCEPTION_CODE_CALLABLE_PARAMETER_MISMATCH: OptixExceptionCodes =
+ OptixExceptionCodes(-10);
+}
+impl OptixExceptionCodes {
+ #[doc = " The invoked builtin IS does not match the current GAS"]
+ pub const OPTIX_EXCEPTION_CODE_BUILTIN_IS_MISMATCH: OptixExceptionCodes =
+ OptixExceptionCodes(-11);
+}
+impl OptixExceptionCodes {
+ #[doc = " Tried to call a callable program using an SBT offset that is larger"]
+ #[doc = " than the number of passed in callable SBT records."]
+ #[doc = " Exception details:"]
+ #[doc = " optixGetExceptionInvalidSbtOffset()"]
+ pub const OPTIX_EXCEPTION_CODE_CALLABLE_INVALID_SBT: OptixExceptionCodes =
+ OptixExceptionCodes(-12);
+}
+impl OptixExceptionCodes {
+ #[doc = " Tried to call a direct callable using an SBT offset of a record that"]
+ #[doc = " was built from a program group that did not include a direct callable."]
+ pub const OPTIX_EXCEPTION_CODE_CALLABLE_NO_DC_SBT_RECORD: OptixExceptionCodes =
+ OptixExceptionCodes(-13);
+}
+impl OptixExceptionCodes {
+ #[doc = " Tried to call a continuation callable using an SBT offset of a record"]
+ #[doc = " that was built from a program group that did not include a continuation callable."]
+ pub const OPTIX_EXCEPTION_CODE_CALLABLE_NO_CC_SBT_RECORD: OptixExceptionCodes =
+ OptixExceptionCodes(-14);
+}
+impl OptixExceptionCodes {
+ #[doc = " Tried to directly traverse a single gas while single gas traversable graphs are not enabled"]
+ #[doc = " (see OptixTraversableGraphFlags::OPTIX_TRAVERSABLE_GRAPH_FLAG_ALLOW_SINGLE_GAS)."]
+ #[doc = " Exception details:"]
+ #[doc = " optixGetTransformListSize()"]
+ #[doc = " optixGetTransformListHandle()"]
+ #[doc = " optixGetExceptionInvalidTraversable()"]
+ pub const OPTIX_EXCEPTION_CODE_UNSUPPORTED_SINGLE_LEVEL_GAS: OptixExceptionCodes =
+ OptixExceptionCodes(-15);
+}
+impl OptixExceptionCodes {
+ #[doc = " argument passed to an optix call is"]
+ #[doc = " not within an acceptable range of values."]
+ pub const OPTIX_EXCEPTION_CODE_INVALID_VALUE_ARGUMENT_0: OptixExceptionCodes =
+ OptixExceptionCodes(-16);
+}
+impl OptixExceptionCodes {
+ #[doc = " argument passed to an optix call is"]
+ #[doc = " not within an acceptable range of values."]
+ pub const OPTIX_EXCEPTION_CODE_INVALID_VALUE_ARGUMENT_1: OptixExceptionCodes =
+ OptixExceptionCodes(-17);
+}
+impl OptixExceptionCodes {
+ #[doc = " argument passed to an optix call is"]
+ #[doc = " not within an acceptable range of values."]
+ pub const OPTIX_EXCEPTION_CODE_INVALID_VALUE_ARGUMENT_2: OptixExceptionCodes =
+ OptixExceptionCodes(-18);
+}
+impl OptixExceptionCodes {
+ #[doc = " Tried to access data on an AS without random data access support (See OptixBuildFlags)."]
+ pub const OPTIX_EXCEPTION_CODE_UNSUPPORTED_DATA_ACCESS: OptixExceptionCodes =
+ OptixExceptionCodes(-32);
+}
+impl OptixExceptionCodes {
+ #[doc = " The program payload type doesn't match the trace payload type."]
+ pub const OPTIX_EXCEPTION_CODE_PAYLOAD_TYPE_MISMATCH: OptixExceptionCodes =
+ OptixExceptionCodes(-33);
+}
+#[repr(transparent)]
+#[doc = " The following values are used to indicate which exception was thrown."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixExceptionCodes(pub ::std::os::raw::c_int);
+impl OptixExceptionFlags {
+ #[doc = " No exception are enabled."]
+ pub const OPTIX_EXCEPTION_FLAG_NONE: OptixExceptionFlags = OptixExceptionFlags(0);
+}
+impl OptixExceptionFlags {
+ #[doc = " Enables exceptions check related to the continuation stack."]
+ pub const OPTIX_EXCEPTION_FLAG_STACK_OVERFLOW: OptixExceptionFlags = OptixExceptionFlags(1);
+}
+impl OptixExceptionFlags {
+ #[doc = " Enables exceptions check related to trace depth."]
+ pub const OPTIX_EXCEPTION_FLAG_TRACE_DEPTH: OptixExceptionFlags = OptixExceptionFlags(2);
+}
+impl OptixExceptionFlags {
+ #[doc = " Enables user exceptions via optixThrowException(). This flag must be specified for all modules in a pipeline"]
+ #[doc = " if any module calls optixThrowException()."]
+ pub const OPTIX_EXCEPTION_FLAG_USER: OptixExceptionFlags = OptixExceptionFlags(4);
+}
+impl OptixExceptionFlags {
+ #[doc = " Enables various exceptions check related to traversal."]
+ pub const OPTIX_EXCEPTION_FLAG_DEBUG: OptixExceptionFlags = OptixExceptionFlags(8);
+}
+#[repr(transparent)]
+#[doc = " Exception flags."]
+#[doc = ""]
+#[doc = " \\see #OptixPipelineCompileOptions::exceptionFlags, #OptixExceptionCodes"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixExceptionFlags(pub ::std::os::raw::c_uint);
+#[doc = " Compilation options for all modules of a pipeline."]
+#[doc = ""]
+#[doc = " Similar to #OptixModuleCompileOptions, but these options here need to be equal for all modules of a pipeline."]
+#[doc = ""]
+#[doc = " \\see #optixModuleCreateFromPTX(), #optixPipelineCreate()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixPipelineCompileOptions {
+ #[doc = " Boolean value indicating whether motion blur could be used"]
+ pub usesMotionBlur: ::std::os::raw::c_int,
+ #[doc = " Traversable graph bitfield. See OptixTraversableGraphFlags"]
+ pub traversableGraphFlags: ::std::os::raw::c_uint,
+ #[doc = " How much storage, in 32b words, to make available for the payload, [0..32]"]
+ #[doc = " Must be zero if numPayloadTypes is not zero."]
+ pub numPayloadValues: ::std::os::raw::c_int,
+ #[doc = " How much storage, in 32b words, to make available for the attributes. The"]
+ #[doc = " minimum number is 2. Values below that will automatically be changed to 2. [2..8]"]
+ pub numAttributeValues: ::std::os::raw::c_int,
+ #[doc = " A bitmask of OptixExceptionFlags indicating which exceptions are enabled."]
+ pub exceptionFlags: ::std::os::raw::c_uint,
+ #[doc = " The name of the pipeline parameter variable. If 0, no pipeline parameter"]
+ #[doc = " will be available. This will be ignored if the launch param variable was"]
+ #[doc = " optimized out or was not found in the modules linked to the pipeline."]
+ pub pipelineLaunchParamsVariableName: *const ::std::os::raw::c_char,
+ #[doc = " Bit field enabling primitive types. See OptixPrimitiveTypeFlags."]
+ #[doc = " Setting to zero corresponds to enabling OPTIX_PRIMITIVE_TYPE_FLAGS_CUSTOM and OPTIX_PRIMITIVE_TYPE_FLAGS_TRIANGLE."]
+ pub usesPrimitiveTypeFlags: ::std::os::raw::c_uint,
+}
+#[doc = " Link options for a pipeline"]
+#[doc = ""]
+#[doc = " \\see #optixPipelineCreate()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixPipelineLinkOptions {
+ #[doc = " Maximum trace recursion depth. 0 means a ray generation program can be"]
+ #[doc = " launched, but can't trace any rays. The maximum allowed value is 31."]
+ pub maxTraceDepth: ::std::os::raw::c_uint,
+ #[doc = " Generate debug information."]
+ pub debugLevel: OptixCompileDebugLevel,
+}
+#[doc = " Describes the shader binding table (SBT)"]
+#[doc = ""]
+#[doc = " \\see #optixLaunch()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixShaderBindingTable {
+ #[doc = " Device address of the SBT record of the ray gen program to start launch at. The address must be a multiple of"]
+ #[doc = " OPTIX_SBT_RECORD_ALIGNMENT."]
+ pub raygenRecord: CUdeviceptr,
+ #[doc = " Device address of the SBT record of the exception program. The address must be a multiple of"]
+ #[doc = " OPTIX_SBT_RECORD_ALIGNMENT."]
+ pub exceptionRecord: CUdeviceptr,
+ #[doc = " Arrays of SBT records for miss programs. The base address and the stride must be a multiple of"]
+ #[doc = " OPTIX_SBT_RECORD_ALIGNMENT."]
+ #[doc = " @{"]
+ pub missRecordBase: CUdeviceptr,
+ pub missRecordStrideInBytes: ::std::os::raw::c_uint,
+ pub missRecordCount: ::std::os::raw::c_uint,
+ #[doc = " Arrays of SBT records for hit groups. The base address and the stride must be a multiple of"]
+ #[doc = " OPTIX_SBT_RECORD_ALIGNMENT."]
+ #[doc = " @{"]
+ pub hitgroupRecordBase: CUdeviceptr,
+ pub hitgroupRecordStrideInBytes: ::std::os::raw::c_uint,
+ pub hitgroupRecordCount: ::std::os::raw::c_uint,
+ #[doc = " Arrays of SBT records for callable programs. If the base address is not null, the stride and count must not be"]
+ #[doc = " zero. If the base address is null, then the count needs to zero. The base address and the stride must be a"]
+ #[doc = " multiple of OPTIX_SBT_RECORD_ALIGNMENT."]
+ #[doc = " @{"]
+ pub callablesRecordBase: CUdeviceptr,
+ pub callablesRecordStrideInBytes: ::std::os::raw::c_uint,
+ pub callablesRecordCount: ::std::os::raw::c_uint,
+}
+#[doc = " Describes the stack size requirements of a program group."]
+#[doc = ""]
+#[doc = " \\see optixProgramGroupGetStackSize()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixStackSizes {
+ #[doc = " Continuation stack size of RG programs in bytes"]
+ pub cssRG: ::std::os::raw::c_uint,
+ #[doc = " Continuation stack size of MS programs in bytes"]
+ pub cssMS: ::std::os::raw::c_uint,
+ #[doc = " Continuation stack size of CH programs in bytes"]
+ pub cssCH: ::std::os::raw::c_uint,
+ #[doc = " Continuation stack size of AH programs in bytes"]
+ pub cssAH: ::std::os::raw::c_uint,
+ #[doc = " Continuation stack size of IS programs in bytes"]
+ pub cssIS: ::std::os::raw::c_uint,
+ #[doc = " Continuation stack size of CC programs in bytes"]
+ pub cssCC: ::std::os::raw::c_uint,
+ #[doc = " Direct stack size of DC programs in bytes"]
+ pub dssDC: ::std::os::raw::c_uint,
+}
+impl OptixQueryFunctionTableOptions {
+ #[doc = " Placeholder (there are no options yet)"]
+ pub const OPTIX_QUERY_FUNCTION_TABLE_OPTION_DUMMY: OptixQueryFunctionTableOptions =
+ OptixQueryFunctionTableOptions(0);
+}
+#[repr(transparent)]
+#[doc = " Options that can be passed to \\c optixQueryFunctionTable()"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct OptixQueryFunctionTableOptions(pub ::std::os::raw::c_uint);
+#[doc = " Type of the function \\c optixQueryFunctionTable()"]
+pub type OptixQueryFunctionTable_t = ::std::option::Option<
+ unsafe extern "C" fn(
+ abiId: ::std::os::raw::c_int,
+ numOptions: ::std::os::raw::c_uint,
+ arg1: *mut OptixQueryFunctionTableOptions,
+ arg2: *mut *const ::std::os::raw::c_void,
+ functionTable: *mut ::std::os::raw::c_void,
+ sizeOfTable: usize,
+ ) -> OptixResult,
+>;
+#[doc = " Specifies the options for retrieving an intersection program for a built-in primitive type."]
+#[doc = " The primitive type must not be OPTIX_PRIMITIVE_TYPE_CUSTOM."]
+#[doc = ""]
+#[doc = " \\see #optixBuiltinISModuleGet()"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixBuiltinISOptions {
+ pub builtinISModuleType: OptixPrimitiveType,
+ #[doc = " Boolean value indicating whether vertex motion blur is used (but not motion transform blur)."]
+ pub usesMotionBlur: ::std::os::raw::c_int,
+ #[doc = " Build flags, see OptixBuildFlags."]
+ pub buildFlags: ::std::os::raw::c_uint,
+ #[doc = " End cap properties of curves, see OptixCurveEndcapFlags, 0 for non-curve types."]
+ pub curveEndcapFlags: ::std::os::raw::c_uint,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct CUctx_st {
+ _unused: [u8; 0],
+}
+pub type CUcontext = *mut CUctx_st;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct CUstream_st {
+ _unused: [u8; 0],
+}
+pub type CUstream = *mut CUstream_st;
+extern "C" {
+ #[doc = " Returns a string containing the name of an error code in the enum."]
+ #[doc = ""]
+ #[doc = " Output is a string representation of the enum. For example \"OPTIX_SUCCESS\" for"]
+ #[doc = " OPTIX_SUCCESS and \"OPTIX_ERROR_INVALID_VALUE\" for OPTIX_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " If the error code is not recognized, \"Unrecognized OptixResult code\" is returned."]
+ #[doc = ""]
+ #[doc = " \\param[in] result OptixResult enum to generate string name for"]
+ #[doc = ""]
+ #[doc = " \\see #optixGetErrorString"]
+ pub fn optixGetErrorName(result: OptixResult) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ #[doc = " Returns the description string for an error code."]
+ #[doc = ""]
+ #[doc = " Output is a string description of the enum. For example \"Success\" for"]
+ #[doc = " OPTIX_SUCCESS and \"Invalid value\" for OPTIX_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " If the error code is not recognized, \"Unrecognized OptixResult code\" is returned."]
+ #[doc = ""]
+ #[doc = " \\param[in] result OptixResult enum to generate string description for"]
+ #[doc = ""]
+ #[doc = " \\see #optixGetErrorName"]
+ pub fn optixGetErrorString(result: OptixResult) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ #[doc = " Create a device context associated with the CUDA context specified with 'fromContext'."]
+ #[doc = ""]
+ #[doc = " If zero is specified for 'fromContext', OptiX will use the current CUDA context. The"]
+ #[doc = " CUDA context should be initialized before calling optixDeviceContextCreate."]
+ #[doc = ""]
+ #[doc = " \\param[in] fromContext"]
+ #[doc = " \\param[in] options"]
+ #[doc = " \\param[out] context"]
+ #[doc = " \\return"]
+ #[doc = " - OPTIX_ERROR_CUDA_NOT_INITIALIZED"]
+ #[doc = " If using zero for 'fromContext' and CUDA has not been initialized yet on the calling"]
+ #[doc = " thread."]
+ #[doc = " - OPTIX_ERROR_CUDA_ERROR"]
+ #[doc = " CUDA operation failed."]
+ #[doc = " - OPTIX_ERROR_HOST_OUT_OF_MEMORY"]
+ #[doc = " Heap allocation failed."]
+ #[doc = " - OPTIX_ERROR_INTERNAL_ERROR"]
+ #[doc = " Internal error"]
+ pub fn optixDeviceContextCreate(
+ fromContext: CUcontext,
+ options: *const OptixDeviceContextOptions,
+ context: *mut OptixDeviceContext,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Destroys all CPU and GPU state associated with the device."]
+ #[doc = ""]
+ #[doc = " It will attempt to block on CUDA streams that have launch work outstanding."]
+ #[doc = ""]
+ #[doc = " Any API objects, such as OptixModule and OptixPipeline, not already destroyed will be"]
+ #[doc = " destroyed."]
+ #[doc = ""]
+ #[doc = " Thread safety: A device context must not be destroyed while it is still in use by concurrent API calls in other threads."]
+ pub fn optixDeviceContextDestroy(context: OptixDeviceContext) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Query properties of a device context."]
+ #[doc = ""]
+ #[doc = " \\param[in] context the device context to query the property for"]
+ #[doc = " \\param[in] property the property to query"]
+ #[doc = " \\param[out] value pointer to the returned"]
+ #[doc = " \\param[in] sizeInBytes size of output"]
+ pub fn optixDeviceContextGetProperty(
+ context: OptixDeviceContext,
+ property: OptixDeviceProperty,
+ value: *mut ::std::os::raw::c_void,
+ sizeInBytes: usize,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Sets the current log callback method."]
+ #[doc = ""]
+ #[doc = " See #OptixLogCallback for more details."]
+ #[doc = ""]
+ #[doc = " Thread safety: It is guaranteed that the callback itself (callbackFunction and callbackData) are updated atomically."]
+ #[doc = " It is not guaranteed that the callback itself (callbackFunction and callbackData) and the callbackLevel are updated"]
+ #[doc = " atomically. It is unspecified when concurrent API calls using the same context start to make use of the new"]
+ #[doc = " callback method."]
+ #[doc = ""]
+ #[doc = " \\param[in] context the device context"]
+ #[doc = " \\param[in] callbackFunction the callback function to call"]
+ #[doc = " \\param[in] callbackData pointer to data passed to callback function while invoking it"]
+ #[doc = " \\param[in] callbackLevel callback level"]
+ pub fn optixDeviceContextSetLogCallback(
+ context: OptixDeviceContext,
+ callbackFunction: OptixLogCallback,
+ callbackData: *mut ::std::os::raw::c_void,
+ callbackLevel: ::std::os::raw::c_uint,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Enables or disables the disk cache."]
+ #[doc = ""]
+ #[doc = " If caching was previously disabled, enabling it will attempt to initialize"]
+ #[doc = " the disk cache database using the currently configured cache location. An"]
+ #[doc = " error will be returned if initialization fails."]
+ #[doc = ""]
+ #[doc = " Note that no in-memory cache is used, so no caching behavior will be observed if the disk cache"]
+ #[doc = " is disabled."]
+ #[doc = ""]
+ #[doc = " The cache can be disabled by setting the environment variable OPTIX_CACHE_MAXSIZE=0."]
+ #[doc = " The environment variable takes precedence over this setting."]
+ #[doc = " See #optixDeviceContextSetCacheDatabaseSizes for additional information."]
+ #[doc = ""]
+ #[doc = " Note that the disk cache can be disabled by the environment variable, but it cannot be enabled"]
+ #[doc = " via the environment if it is disabled via the API."]
+ #[doc = ""]
+ #[doc = " \\param[in] context the device context"]
+ #[doc = " \\param[in] enabled 1 to enabled, 0 to disable"]
+ pub fn optixDeviceContextSetCacheEnabled(
+ context: OptixDeviceContext,
+ enabled: ::std::os::raw::c_int,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Sets the location of the disk cache."]
+ #[doc = ""]
+ #[doc = " The location is specified by a directory. This directory should not be used for other purposes"]
+ #[doc = " and will be created if it does not exist. An error will be returned if is not possible to"]
+ #[doc = " create the disk cache at the specified location for any reason (e.g., the path is invalid or"]
+ #[doc = " the directory is not writable). Caching will be disabled if the disk cache cannot be"]
+ #[doc = " initialized in the new location. If caching is disabled, no error will be returned until caching"]
+ #[doc = " is enabled. If the disk cache is located on a network file share, behavior is undefined."]
+ #[doc = ""]
+ #[doc = " The location of the disk cache can be overridden with the environment variable OPTIX_CACHE_PATH."]
+ #[doc = " The environment variable takes precedence over this setting."]
+ #[doc = ""]
+ #[doc = " The default location depends on the operating system:"]
+ #[doc = " - Windows: %LOCALAPPDATA%\\\\NVIDIA\\\\OptixCache"]
+ #[doc = " - Linux: /var/tmp/OptixCache_\\<username\\> (or /tmp/OptixCache_\\<username\\> if the first choice is not usable),"]
+ #[doc = " the underscore and username suffix are omitted if the username cannot be obtained"]
+ #[doc = " - MacOS X: /Library/Application Support/NVIDIA/OptixCache"]
+ #[doc = ""]
+ #[doc = " \\param[in] context the device context"]
+ #[doc = " \\param[in] location directory of disk cache"]
+ pub fn optixDeviceContextSetCacheLocation(
+ context: OptixDeviceContext,
+ location: *const ::std::os::raw::c_char,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Sets the low and high water marks for disk cache garbage collection."]
+ #[doc = ""]
+ #[doc = " Garbage collection is triggered when a new entry is written to the cache and"]
+ #[doc = " the current cache data size plus the size of the cache entry that is about"]
+ #[doc = " to be inserted exceeds the high water mark. Garbage collection proceeds until"]
+ #[doc = " the size reaches the low water mark. Garbage collection will always free enough"]
+ #[doc = " space to insert the new entry without exceeding the low water mark. Setting"]
+ #[doc = " either limit to zero will disable garbage collection. An error will be returned"]
+ #[doc = " if both limits are non-zero and the high water mark is smaller than the low water mark."]
+ #[doc = ""]
+ #[doc = " Note that garbage collection is performed only on writes to the disk cache. No garbage"]
+ #[doc = " collection is triggered on disk cache initialization or immediately when calling this function,"]
+ #[doc = " but on subsequent inserting of data into the database."]
+ #[doc = ""]
+ #[doc = " If the size of a compiled module exceeds the value configured for the high water"]
+ #[doc = " mark and garbage collection is enabled, the module will not be added to the cache"]
+ #[doc = " and a warning will be added to the log."]
+ #[doc = ""]
+ #[doc = " The high water mark can be overridden with the environment variable OPTIX_CACHE_MAXSIZE."]
+ #[doc = " The environment variable takes precedence over the function parameters. The low water mark"]
+ #[doc = " will be set to half the value of OPTIX_CACHE_MAXSIZE. Setting OPTIX_CACHE_MAXSIZE to 0 will"]
+ #[doc = " disable the disk cache, but will not alter the contents of the cache. Negative and non-integer"]
+ #[doc = " values will be ignored."]
+ #[doc = ""]
+ #[doc = " \\param[in] context the device context"]
+ #[doc = " \\param[in] lowWaterMark the low water mark"]
+ #[doc = " \\param[in] highWaterMark the high water mark"]
+ pub fn optixDeviceContextSetCacheDatabaseSizes(
+ context: OptixDeviceContext,
+ lowWaterMark: usize,
+ highWaterMark: usize,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Indicates whether the disk cache is enabled or disabled."]
+ #[doc = ""]
+ #[doc = " \\param[in] context the device context"]
+ #[doc = " \\param[out] enabled 1 if enabled, 0 if disabled"]
+ pub fn optixDeviceContextGetCacheEnabled(
+ context: OptixDeviceContext,
+ enabled: *mut ::std::os::raw::c_int,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Returns the location of the disk cache. If the cache has been disabled by setting the environment"]
+ #[doc = " variable OPTIX_CACHE_MAXSIZE=0, this function will return an empy string."]
+ #[doc = ""]
+ #[doc = " \\param[in] context the device context"]
+ #[doc = " \\param[out] location directory of disk cache, null terminated if locationSize > 0"]
+ #[doc = " \\param[in] locationSize locationSize"]
+ pub fn optixDeviceContextGetCacheLocation(
+ context: OptixDeviceContext,
+ location: *mut ::std::os::raw::c_char,
+ locationSize: usize,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Returns the low and high water marks for disk cache garbage collection. If the cache has been disabled by"]
+ #[doc = " setting the environment variable OPTIX_CACHE_MAXSIZE=0, this function will return 0 for the low and high"]
+ #[doc = " water marks."]
+ #[doc = ""]
+ #[doc = " \\param[in] context the device context"]
+ #[doc = " \\param[out] lowWaterMark the low water mark"]
+ #[doc = " \\param[out] highWaterMark the high water mark"]
+ pub fn optixDeviceContextGetCacheDatabaseSizes(
+ context: OptixDeviceContext,
+ lowWaterMark: *mut usize,
+ highWaterMark: *mut usize,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " logString is an optional buffer that contains compiler feedback and errors. This"]
+ #[doc = " information is also passed to the context logger (if enabled), however it may be"]
+ #[doc = " difficult to correlate output to the logger to specific API invocations when using"]
+ #[doc = " multiple threads. The output to logString will only contain feedback for this specific"]
+ #[doc = " invocation of this API call."]
+ #[doc = ""]
+ #[doc = " logStringSize as input should be a pointer to the number of bytes backing logString."]
+ #[doc = " Upon return it contains the length of the log message (including the null terminator)"]
+ #[doc = " which may be greater than the input value. In this case, the log message will be"]
+ #[doc = " truncated to fit into logString."]
+ #[doc = ""]
+ #[doc = " If logString or logStringSize are NULL, no output is written to logString. If"]
+ #[doc = " logStringSize points to a value that is zero, no output is written. This does not"]
+ #[doc = " affect output to the context logger if enabled."]
+ #[doc = ""]
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] pipelineCompileOptions"]
+ #[doc = " \\param[in] pipelineLinkOptions"]
+ #[doc = " \\param[in] programGroups array of ProgramGroup objects"]
+ #[doc = " \\param[in] numProgramGroups number of ProgramGroup objects"]
+ #[doc = " \\param[out] logString Information will be written to this string. If logStringSize > 0 logString will be null terminated."]
+ #[doc = " \\param[in,out] logStringSize"]
+ #[doc = " \\param[out] pipeline"]
+ pub fn optixPipelineCreate(
+ context: OptixDeviceContext,
+ pipelineCompileOptions: *const OptixPipelineCompileOptions,
+ pipelineLinkOptions: *const OptixPipelineLinkOptions,
+ programGroups: *const OptixProgramGroup,
+ numProgramGroups: ::std::os::raw::c_uint,
+ logString: *mut ::std::os::raw::c_char,
+ logStringSize: *mut usize,
+ pipeline: *mut OptixPipeline,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Thread safety: A pipeline must not be destroyed while it is still in use by concurrent API calls in other threads."]
+ pub fn optixPipelineDestroy(pipeline: OptixPipeline) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Sets the stack sizes for a pipeline."]
+ #[doc = ""]
+ #[doc = " Users are encouraged to see the programming guide and the implementations of the helper functions"]
+ #[doc = " to understand how to construct the stack sizes based on their particular needs."]
+ #[doc = ""]
+ #[doc = " If this method is not used, an internal default implementation is used. The default implementation is correct (but"]
+ #[doc = " not necessarily optimal) as long as the maximum depth of call trees of CC and DC programs is at most 2 and no motion transforms are used."]
+ #[doc = ""]
+ #[doc = " The maxTraversableGraphDepth responds to the maximal number of traversables visited when calling trace."]
+ #[doc = " Every acceleration structure and motion transform count as one level of traversal."]
+ #[doc = " E.g., for a simple IAS (instance acceleration structure) -> GAS (geometry acceleration structure)"]
+ #[doc = " traversal graph, the maxTraversableGraphDepth is two."]
+ #[doc = " For IAS -> MT (motion transform) -> GAS, the maxTraversableGraphDepth is three."]
+ #[doc = " Note that it does not matter whether a IAS or GAS has motion or not, it always counts as one."]
+ #[doc = " Launching optix with exceptions turned on (see #OPTIX_EXCEPTION_FLAG_TRACE_DEPTH) will throw an exception"]
+ #[doc = " if the specified maxTraversableGraphDepth is too small."]
+ #[doc = ""]
+ #[doc = " \\param[in] pipeline The pipeline to configure the stack size for."]
+ #[doc = " \\param[in] directCallableStackSizeFromTraversal The direct stack size requirement for direct callables invoked from IS or AH."]
+ #[doc = " \\param[in] directCallableStackSizeFromState The direct stack size requirement for direct callables invoked from RG, MS, or CH."]
+ #[doc = " \\param[in] continuationStackSize The continuation stack requirement."]
+ #[doc = " \\param[in] maxTraversableGraphDepth The maximum depth of a traversable graph passed to trace."]
+ pub fn optixPipelineSetStackSize(
+ pipeline: OptixPipeline,
+ directCallableStackSizeFromTraversal: ::std::os::raw::c_uint,
+ directCallableStackSizeFromState: ::std::os::raw::c_uint,
+ continuationStackSize: ::std::os::raw::c_uint,
+ maxTraversableGraphDepth: ::std::os::raw::c_uint,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " logString is an optional buffer that contains compiler feedback and errors. This"]
+ #[doc = " information is also passed to the context logger (if enabled), however it may be"]
+ #[doc = " difficult to correlate output to the logger to specific API invocations when using"]
+ #[doc = " multiple threads. The output to logString will only contain feedback for this specific"]
+ #[doc = " invocation of this API call."]
+ #[doc = ""]
+ #[doc = " logStringSize as input should be a pointer to the number of bytes backing logString."]
+ #[doc = " Upon return it contains the length of the log message (including the null terminator)"]
+ #[doc = " which may be greater than the input value. In this case, the log message will be"]
+ #[doc = " truncated to fit into logString."]
+ #[doc = ""]
+ #[doc = " If logString or logStringSize are NULL, no output is written to logString. If"]
+ #[doc = " logStringSize points to a value that is zero, no output is written. This does not"]
+ #[doc = " affect output to the context logger if enabled."]
+ #[doc = ""]
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] moduleCompileOptions"]
+ #[doc = " \\param[in] pipelineCompileOptions All modules in a pipeline need to use the same values for the pipeline compile options."]
+ #[doc = " \\param[in] PTX Pointer to the PTX input string."]
+ #[doc = " \\param[in] PTXsize Parsing proceeds up to PTXsize characters, or the first NUL byte, whichever occurs first."]
+ #[doc = " \\param[out] logString Information will be written to this string. If logStringSize > 0 logString will be null terminated."]
+ #[doc = " \\param[in,out] logStringSize"]
+ #[doc = " \\param[out] module"]
+ #[doc = ""]
+ #[doc = " \\return OPTIX_ERROR_INVALID_VALUE - context is 0, moduleCompileOptions is 0, pipelineCompileOptions is 0, PTX is 0, module is 0."]
+ pub fn optixModuleCreateFromPTX(
+ context: OptixDeviceContext,
+ moduleCompileOptions: *const OptixModuleCompileOptions,
+ pipelineCompileOptions: *const OptixPipelineCompileOptions,
+ PTX: *const ::std::os::raw::c_char,
+ PTXsize: usize,
+ logString: *mut ::std::os::raw::c_char,
+ logStringSize: *mut usize,
+ module: *mut OptixModule,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " All OptixTask objects associated with a given OptixModule will be cleaned up when"]
+ #[doc = " #optixModuleDestroy() is called regardless of whether the compilation was successful"]
+ #[doc = " or not. If the compilation state is OPTIX_MODULE_COMPILE_STATE_IMPENDIND_FAILURE, any"]
+ #[doc = " unstarted OptixTask objects do not need to be executed though there is no harm doing"]
+ #[doc = " so."]
+ #[doc = ""]
+ #[doc = " \\see #optixModuleCreateFromPTX"]
+ pub fn optixModuleCreateFromPTXWithTasks(
+ context: OptixDeviceContext,
+ moduleCompileOptions: *const OptixModuleCompileOptions,
+ pipelineCompileOptions: *const OptixPipelineCompileOptions,
+ PTX: *const ::std::os::raw::c_char,
+ PTXsize: usize,
+ logString: *mut ::std::os::raw::c_char,
+ logStringSize: *mut usize,
+ module: *mut OptixModule,
+ firstTask: *mut OptixTask,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " When creating a module with tasks, the current state of the module can be queried"]
+ #[doc = " using this function."]
+ #[doc = ""]
+ #[doc = " Thread safety: Safe to call from any thread until optixModuleDestroy is called."]
+ #[doc = ""]
+ #[doc = " \\see #optixModuleCreateFromPTXWithTasks"]
+ pub fn optixModuleGetCompilationState(
+ module: OptixModule,
+ state: *mut OptixModuleCompileState,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Call for OptixModule objects created with optixModuleCreateFromPTX and optixModuleDeserialize."]
+ #[doc = ""]
+ #[doc = " Modules must not be destroyed while they are still used by any program group."]
+ #[doc = ""]
+ #[doc = " Thread safety: A module must not be destroyed while it is still in use by concurrent API calls in other threads."]
+ pub fn optixModuleDestroy(module: OptixModule) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Returns a module containing the intersection program for the built-in primitive type specified"]
+ #[doc = " by the builtinISOptions. This module must be used as the moduleIS for the OptixProgramGroupHitgroup"]
+ #[doc = " in any SBT record for that primitive type. (The entryFunctionNameIS should be null.)"]
+ pub fn optixBuiltinISModuleGet(
+ context: OptixDeviceContext,
+ moduleCompileOptions: *const OptixModuleCompileOptions,
+ pipelineCompileOptions: *const OptixPipelineCompileOptions,
+ builtinISOptions: *const OptixBuiltinISOptions,
+ builtinModule: *mut OptixModule,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Each OptixTask should be executed with #optixTaskExecute(). If additional parallel"]
+ #[doc = " work is found, new OptixTask objects will be returned in additionalTasks along with"]
+ #[doc = " the number of additional tasks in numAdditionalTasksCreated. The parameter"]
+ #[doc = " additionalTasks should point to a user allocated array of minimum size"]
+ #[doc = " maxNumAdditionalTasks. OptiX can generate upto maxNumAdditionalTasks additional tasks."]
+ #[doc = ""]
+ #[doc = " Each task can be executed in parallel and in any order."]
+ #[doc = ""]
+ #[doc = " Thread safety: Safe to call from any thread until #optixModuleDestroy() is called for"]
+ #[doc = " any associated task."]
+ #[doc = ""]
+ #[doc = " \\see #optixModuleCreateFromPTXWithTasks"]
+ #[doc = ""]
+ #[doc = " \\param[in] task the OptixTask to execute"]
+ #[doc = " \\param[in] additionalTasks pointer to array of OptixTask objects to be filled in"]
+ #[doc = " \\param[in] maxNumAdditionalTasks maximum number of additional OptixTask objects"]
+ #[doc = " \\param[out] numAdditionalTasksCreated number of OptixTask objects created by OptiX and written into #additionalTasks"]
+ pub fn optixTaskExecute(
+ task: OptixTask,
+ additionalTasks: *mut OptixTask,
+ maxNumAdditionalTasks: ::std::os::raw::c_uint,
+ numAdditionalTasksCreated: *mut ::std::os::raw::c_uint,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Returns the stack sizes for the given program group."]
+ #[doc = ""]
+ #[doc = " \\param[in] programGroup the program group"]
+ #[doc = " \\param[out] stackSizes the corresponding stack sizes"]
+ pub fn optixProgramGroupGetStackSize(
+ programGroup: OptixProgramGroup,
+ stackSizes: *mut OptixStackSizes,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " logString is an optional buffer that contains compiler feedback and errors. This"]
+ #[doc = " information is also passed to the context logger (if enabled), however it may be"]
+ #[doc = " difficult to correlate output to the logger to specific API invocations when using"]
+ #[doc = " multiple threads. The output to logString will only contain feedback for this specific"]
+ #[doc = " invocation of this API call."]
+ #[doc = ""]
+ #[doc = " logStringSize as input should be a pointer to the number of bytes backing logString."]
+ #[doc = " Upon return it contains the length of the log message (including the null terminator)"]
+ #[doc = " which may be greater than the input value. In this case, the log message will be"]
+ #[doc = " truncated to fit into logString."]
+ #[doc = ""]
+ #[doc = " If logString or logStringSize are NULL, no output is written to logString. If"]
+ #[doc = " logStringSize points to a value that is zero, no output is written. This does not"]
+ #[doc = " affect output to the context logger if enabled."]
+ #[doc = ""]
+ #[doc = " Creates numProgramGroups OptiXProgramGroup objects from the specified"]
+ #[doc = " OptixProgramGroupDesc array. The size of the arrays must match."]
+ #[doc = ""]
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] programDescriptions N * OptixProgramGroupDesc"]
+ #[doc = " \\param[in] numProgramGroups N"]
+ #[doc = " \\param[in] options"]
+ #[doc = " \\param[out] logString Information will be written to this string. If logStringSize > 0 logString will be null terminated."]
+ #[doc = " \\param[in,out] logStringSize"]
+ #[doc = " \\param[out] programGroups"]
+ pub fn optixProgramGroupCreate(
+ context: OptixDeviceContext,
+ programDescriptions: *const OptixProgramGroupDesc,
+ numProgramGroups: ::std::os::raw::c_uint,
+ options: *const OptixProgramGroupOptions,
+ logString: *mut ::std::os::raw::c_char,
+ logStringSize: *mut usize,
+ programGroups: *mut OptixProgramGroup,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Thread safety: A program group must not be destroyed while it is still in use by concurrent API calls in other threads."]
+ pub fn optixProgramGroupDestroy(programGroup: OptixProgramGroup) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Where the magic happens."]
+ #[doc = ""]
+ #[doc = " The stream and pipeline must belong to the same device context. Multiple launches"]
+ #[doc = " may be issues in parallel from multiple threads to different streams."]
+ #[doc = ""]
+ #[doc = " pipelineParamsSize number of bytes are copied from the device memory pointed to by"]
+ #[doc = " pipelineParams before launch. It is an error if pipelineParamsSize is greater than the"]
+ #[doc = " size of the variable declared in modules and identified by"]
+ #[doc = " OptixPipelineCompileOptions::pipelineLaunchParamsVariableName. If the launch params"]
+ #[doc = " variable was optimized out or not found in the modules linked to the pipeline then"]
+ #[doc = " the pipelineParams and pipelineParamsSize parameters are ignored."]
+ #[doc = ""]
+ #[doc = " sbt points to the shader binding table, which defines shader"]
+ #[doc = " groupings and their resources. See the SBT spec."]
+ #[doc = ""]
+ #[doc = " \\param[in] pipeline"]
+ #[doc = " \\param[in] stream"]
+ #[doc = " \\param[in] pipelineParams"]
+ #[doc = " \\param[in] pipelineParamsSize"]
+ #[doc = " \\param[in] sbt"]
+ #[doc = " \\param[in] width number of elements to compute"]
+ #[doc = " \\param[in] height number of elements to compute"]
+ #[doc = " \\param[in] depth number of elements to compute"]
+ #[doc = ""]
+ #[doc = " Thread safety: In the current implementation concurrent launches to the same pipeline are not"]
+ #[doc = " supported. Concurrent launches require separate OptixPipeline objects."]
+ pub fn optixLaunch(
+ pipeline: OptixPipeline,
+ stream: CUstream,
+ pipelineParams: CUdeviceptr,
+ pipelineParamsSize: usize,
+ sbt: *const OptixShaderBindingTable,
+ width: ::std::os::raw::c_uint,
+ height: ::std::os::raw::c_uint,
+ depth: ::std::os::raw::c_uint,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " \\param[in] programGroup the program group containing the program(s)"]
+ #[doc = " \\param[out] sbtRecordHeaderHostPointer the result sbt record header"]
+ pub fn optixSbtRecordPackHeader(
+ programGroup: OptixProgramGroup,
+ sbtRecordHeaderHostPointer: *mut ::std::os::raw::c_void,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] accelOptions options for the accel build"]
+ #[doc = " \\param[in] buildInputs an array of OptixBuildInput objects"]
+ #[doc = " \\param[in] numBuildInputs number of elements in buildInputs (must be at least 1)"]
+ #[doc = " \\param[out] bufferSizes fills in buffer sizes"]
+ pub fn optixAccelComputeMemoryUsage(
+ context: OptixDeviceContext,
+ accelOptions: *const OptixAccelBuildOptions,
+ buildInputs: *const OptixBuildInput,
+ numBuildInputs: ::std::os::raw::c_uint,
+ bufferSizes: *mut OptixAccelBufferSizes,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] stream"]
+ #[doc = " \\param[in] accelOptions accel options"]
+ #[doc = " \\param[in] buildInputs an array of OptixBuildInput objects"]
+ #[doc = " \\param[in] numBuildInputs must be >= 1 for GAS, and == 1 for IAS"]
+ #[doc = " \\param[in] tempBuffer must be a multiple of OPTIX_ACCEL_BUFFER_BYTE_ALIGNMENT"]
+ #[doc = " \\param[in] tempBufferSizeInBytes"]
+ #[doc = " \\param[in] outputBuffer must be a multiple of OPTIX_ACCEL_BUFFER_BYTE_ALIGNMENT"]
+ #[doc = " \\param[in] outputBufferSizeInBytes"]
+ #[doc = " \\param[out] outputHandle"]
+ #[doc = " \\param[out] emittedProperties types of requested properties and output buffers"]
+ #[doc = " \\param[in] numEmittedProperties number of post-build properties to populate (may be zero)"]
+ pub fn optixAccelBuild(
+ context: OptixDeviceContext,
+ stream: CUstream,
+ accelOptions: *const OptixAccelBuildOptions,
+ buildInputs: *const OptixBuildInput,
+ numBuildInputs: ::std::os::raw::c_uint,
+ tempBuffer: CUdeviceptr,
+ tempBufferSizeInBytes: usize,
+ outputBuffer: CUdeviceptr,
+ outputBufferSizeInBytes: usize,
+ outputHandle: *mut OptixTraversableHandle,
+ emittedProperties: *const OptixAccelEmitDesc,
+ numEmittedProperties: ::std::os::raw::c_uint,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Obtain relocation information, stored in OptixAccelRelocationInfo, for a given context"]
+ #[doc = " and acceleration structure's traversable handle."]
+ #[doc = ""]
+ #[doc = " The relocation information can be passed to optixAccelCheckRelocationCompatibility to"]
+ #[doc = " determine if an acceleration structure, referenced by 'handle', can be relocated to a"]
+ #[doc = " different device's memory space (see #optixAccelCheckRelocationCompatibility)."]
+ #[doc = ""]
+ #[doc = " When used with optixAccelRelocate, it provides data necessary for doing the relocation."]
+ #[doc = ""]
+ #[doc = " If the acceleration structure data associated with 'handle' is copied multiple times,"]
+ #[doc = " the same OptixAccelRelocationInfo can also be used on all copies."]
+ #[doc = ""]
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] handle"]
+ #[doc = " \\param[out] info"]
+ #[doc = " \\return OPTIX_ERROR_INVALID_VALUE will be returned for traversable handles that are not from"]
+ #[doc = " acceleration structure builds."]
+ pub fn optixAccelGetRelocationInfo(
+ context: OptixDeviceContext,
+ handle: OptixTraversableHandle,
+ info: *mut OptixAccelRelocationInfo,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Checks if an acceleration structure built using another OptixDeviceContext (that was"]
+ #[doc = " used to fill in 'info') is compatible with the OptixDeviceContext specified in the"]
+ #[doc = " 'context' parameter."]
+ #[doc = ""]
+ #[doc = " Any device is always compatible with itself."]
+ #[doc = ""]
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] info"]
+ #[doc = " \\param[out] compatible If OPTIX_SUCCESS is returned 'compatible' will have the value of either:"]
+ #[doc = " - 0: This context is not compatible with acceleration structure data associated with 'info'."]
+ #[doc = " - 1: This context is compatible."]
+ pub fn optixAccelCheckRelocationCompatibility(
+ context: OptixDeviceContext,
+ info: *const OptixAccelRelocationInfo,
+ compatible: *mut ::std::os::raw::c_int,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " optixAccelRelocate is called to update the acceleration structure after it has been"]
+ #[doc = " relocated. Relocation is necessary when the acceleration structure's location in device"]
+ #[doc = " memory has changed. optixAccelRelocate does not copy the memory. This function only"]
+ #[doc = " operates on the relocated memory who's new location is specified by 'targetAccel'."]
+ #[doc = " optixAccelRelocate also returns the new OptixTraversableHandle associated with"]
+ #[doc = " 'targetAccel'. The original memory (source) is not required to be valid, only the"]
+ #[doc = " OptixAccelRelocationInfo."]
+ #[doc = ""]
+ #[doc = " Before copying the data and calling optixAccelRelocate,"]
+ #[doc = " optixAccelCheckRelocationCompatibility should be called to ensure the copy will be"]
+ #[doc = " compatible with the destination device context."]
+ #[doc = ""]
+ #[doc = " The memory pointed to by 'targetAccel' should be allocated with the same size as the"]
+ #[doc = " source acceleration. Similar to the 'outputBuffer' used in optixAccelBuild, this"]
+ #[doc = " pointer must be a multiple of OPTIX_ACCEL_BUFFER_BYTE_ALIGNMENT."]
+ #[doc = ""]
+ #[doc = " The memory in 'targetAccel' must be allocated as long as the accel is in use."]
+ #[doc = ""]
+ #[doc = " When relocating an accel that contains instances, 'instanceTraversableHandles' and"]
+ #[doc = " 'numInstanceTraversableHandles' should be supplied. These are the traversable handles"]
+ #[doc = " of the instances. These can be used when also relocating the instances. No updates to"]
+ #[doc = " the bounds are performed. Use optixAccelBuild to update the bounds."]
+ #[doc = " 'instanceTraversableHandles' and 'numInstanceTraversableHandles' may be zero when"]
+ #[doc = " relocating bottom level accel (i.e. an accel with no instances)."]
+ #[doc = ""]
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] stream"]
+ #[doc = " \\param[in] info"]
+ #[doc = " \\param[in] instanceTraversableHandles"]
+ #[doc = " \\param[in] numInstanceTraversableHandles"]
+ #[doc = " \\param[in] targetAccel"]
+ #[doc = " \\param[in] targetAccelSizeInBytes"]
+ #[doc = " \\param[out] targetHandle"]
+ pub fn optixAccelRelocate(
+ context: OptixDeviceContext,
+ stream: CUstream,
+ info: *const OptixAccelRelocationInfo,
+ instanceTraversableHandles: CUdeviceptr,
+ numInstanceTraversableHandles: usize,
+ targetAccel: CUdeviceptr,
+ targetAccelSizeInBytes: usize,
+ targetHandle: *mut OptixTraversableHandle,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " After building an acceleration structure, it can be copied in a compacted form to reduce"]
+ #[doc = " memory. In order to be compacted, OPTIX_BUILD_FLAG_ALLOW_COMPACTION must be supplied in"]
+ #[doc = " OptixAccelBuildOptions::buildFlags passed to optixAccelBuild."]
+ #[doc = ""]
+ #[doc = " 'outputBuffer' is the pointer to where the compacted acceleration structure will be"]
+ #[doc = " written. This pointer must be a multiple of OPTIX_ACCEL_BUFFER_BYTE_ALIGNMENT."]
+ #[doc = ""]
+ #[doc = " The size of the memory specified in 'outputBufferSizeInBytes' should be at least the"]
+ #[doc = " value computed using the OPTIX_PROPERTY_TYPE_COMPACTED_SIZE that was reported during"]
+ #[doc = " optixAccelBuild."]
+ #[doc = ""]
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] stream"]
+ #[doc = " \\param[in] inputHandle"]
+ #[doc = " \\param[in] outputBuffer"]
+ #[doc = " \\param[in] outputBufferSizeInBytes"]
+ #[doc = " \\param[out] outputHandle"]
+ pub fn optixAccelCompact(
+ context: OptixDeviceContext,
+ stream: CUstream,
+ inputHandle: OptixTraversableHandle,
+ outputBuffer: CUdeviceptr,
+ outputBufferSizeInBytes: usize,
+ outputHandle: *mut OptixTraversableHandle,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " \\param[in] onDevice"]
+ #[doc = " \\param[in] pointer pointer to traversable allocated in OptixDeviceContext. This pointer must be a multiple of OPTIX_TRANSFORM_BYTE_ALIGNMENT"]
+ #[doc = " \\param[in] traversableType Type of OptixTraversableHandle to create"]
+ #[doc = " \\param[out] traversableHandle traversable handle. traversableHandle must be in host memory"]
+ pub fn optixConvertPointerToTraversableHandle(
+ onDevice: OptixDeviceContext,
+ pointer: CUdeviceptr,
+ traversableType: OptixTraversableType,
+ traversableHandle: *mut OptixTraversableHandle,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Creates a denoiser object with the given options, using built-in inference models"]
+ #[doc = ""]
+ #[doc = " 'modelKind' selects the model used for inference."]
+ #[doc = " Inference for the built-in models can be guided (giving hints to improve image quality) with"]
+ #[doc = " albedo and normal vector images in the guide layer (see 'optixDenoiserInvoke')."]
+ #[doc = " Use of these images must be enabled in 'OptixDenoiserOptions'."]
+ #[doc = ""]
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] modelKind"]
+ #[doc = " \\param[in] options"]
+ #[doc = " \\param[out] denoiser"]
+ pub fn optixDenoiserCreate(
+ context: OptixDeviceContext,
+ modelKind: OptixDenoiserModelKind,
+ options: *const OptixDenoiserOptions,
+ denoiser: *mut OptixDenoiser,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Creates a denoiser object with the given options, using a provided inference model"]
+ #[doc = ""]
+ #[doc = " 'userData' and 'userDataSizeInBytes' provide a user model for inference."]
+ #[doc = " The memory passed in userData will be accessed only during the invocation of this function and"]
+ #[doc = " can be freed after it returns."]
+ #[doc = " The user model must export only one weight set which determines both the model kind and the"]
+ #[doc = " required set of guide images."]
+ #[doc = ""]
+ #[doc = " \\param[in] context"]
+ #[doc = " \\param[in] userData"]
+ #[doc = " \\param[in] userDataSizeInBytes"]
+ #[doc = " \\param[out] denoiser"]
+ pub fn optixDenoiserCreateWithUserModel(
+ context: OptixDeviceContext,
+ userData: *const ::std::os::raw::c_void,
+ userDataSizeInBytes: usize,
+ denoiser: *mut OptixDenoiser,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Destroys the denoiser object and any associated host resources."]
+ pub fn optixDenoiserDestroy(denoiser: OptixDenoiser) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Computes the GPU memory resources required to execute the denoiser."]
+ #[doc = ""]
+ #[doc = " Memory for state and scratch buffers must be allocated with the sizes in 'returnSizes' and scratch memory"]
+ #[doc = " passed to optixDenoiserSetup, optixDenoiserInvoke,"]
+ #[doc = " optixDenoiserComputeIntensity and optixDenoiserComputeAverageColor."]
+ #[doc = " For tiled denoising an overlap area must be added to each tile on all sides which increases the amount of"]
+ #[doc = " memory needed to denoise a tile. In case of tiling use withOverlapScratchSizeInBytes."]
+ #[doc = " If only full resolution images are denoised, withoutOverlapScratchSizeInBytes can be used which is always"]
+ #[doc = " smaller than withOverlapScratchSizeInBytes."]
+ #[doc = ""]
+ #[doc = " 'outputWidth' and 'outputHeight' is the dimension of the image to be denoised (without overlap in case tiling"]
+ #[doc = " is being used)."]
+ #[doc = " 'outputWidth' and 'outputHeight' must be greater than or equal to the dimensions passed to optixDenoiserSetup."]
+ #[doc = ""]
+ #[doc = " \\param[in] denoiser"]
+ #[doc = " \\param[in] outputWidth"]
+ #[doc = " \\param[in] outputHeight"]
+ #[doc = " \\param[out] returnSizes"]
+ pub fn optixDenoiserComputeMemoryResources(
+ denoiser: OptixDenoiser,
+ outputWidth: ::std::os::raw::c_uint,
+ outputHeight: ::std::os::raw::c_uint,
+ returnSizes: *mut OptixDenoiserSizes,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Initializes the state required by the denoiser."]
+ #[doc = ""]
+ #[doc = " 'inputWidth' and 'inputHeight' must include overlap on both sides of the image if tiling is being used. The overlap is"]
+ #[doc = " returned by #optixDenoiserComputeMemoryResources."]
+ #[doc = " For subsequent calls to #optixDenoiserInvoke 'inputWidth' and 'inputHeight' are the maximum dimensions"]
+ #[doc = " of the input layers. Dimensions of the input layers passed to #optixDenoiserInvoke may be different in each"]
+ #[doc = " invocation however they always must be smaller than 'inputWidth' and 'inputHeight' passed to #optixDenoiserSetup."]
+ #[doc = ""]
+ #[doc = " \\param[in] denoiser"]
+ #[doc = " \\param[in] stream"]
+ #[doc = " \\param[in] inputWidth"]
+ #[doc = " \\param[in] inputHeight"]
+ #[doc = " \\param[in] denoiserState"]
+ #[doc = " \\param[in] denoiserStateSizeInBytes"]
+ #[doc = " \\param[in] scratch"]
+ #[doc = " \\param[in] scratchSizeInBytes"]
+ pub fn optixDenoiserSetup(
+ denoiser: OptixDenoiser,
+ stream: CUstream,
+ inputWidth: ::std::os::raw::c_uint,
+ inputHeight: ::std::os::raw::c_uint,
+ denoiserState: CUdeviceptr,
+ denoiserStateSizeInBytes: usize,
+ scratch: CUdeviceptr,
+ scratchSizeInBytes: usize,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Invokes denoiser on a set of input data and produces at least one output image."]
+ #[doc = " State memory must be available during the execution of the"]
+ #[doc = " denoiser (or until optixDenoiserSetup is called with a new state memory pointer)."]
+ #[doc = " Scratch memory passed is used only for the duration of this function."]
+ #[doc = " Scratch and state memory sizes must have a size greater than or equal to the sizes as returned by"]
+ #[doc = " optixDenoiserComputeMemoryResources."]
+ #[doc = ""]
+ #[doc = " 'inputOffsetX' and 'inputOffsetY' are pixel offsets in the 'inputLayers' image"]
+ #[doc = " specifying the beginning of the image without overlap. When denoising an entire image without tiling"]
+ #[doc = " there is no overlap and 'inputOffsetX' and 'inputOffsetY' must be zero. When denoising a tile which is"]
+ #[doc = " adjacent to one of the four sides of the entire image the corresponding offsets must also be zero since"]
+ #[doc = " there is no overlap at the side adjacent to the image border."]
+ #[doc = ""]
+ #[doc = " 'guideLayer' provides additional information to the denoiser. When providing albedo and normal vector"]
+ #[doc = " guide images, the corresponding fields in the 'OptixDenoiserOptions' must be"]
+ #[doc = " enabled, see #optixDenoiserCreate."]
+ #[doc = " 'guideLayer' must not be null. If a guide image in 'OptixDenoiserOptions' is not enabled, the"]
+ #[doc = " corresponding image in 'OptixDenoiserGuideLayer' is ignored."]
+ #[doc = ""]
+ #[doc = " If OPTIX_DENOISER_MODEL_KIND_TEMPORAL or OPTIX_DENOISER_MODEL_KIND_TEMPORAL_AOV is selected, a 2d flow"]
+ #[doc = " image must be given in 'OptixDenoiserGuideLayer'."]
+ #[doc = " It describes for each pixel the flow from the previous to the current frame (a 2d vector in pixel space)."]
+ #[doc = " The denoised beauty/AOV of the previous frame must be given in 'previousOutput'."]
+ #[doc = " If this image is not available in the first frame of a sequence, the noisy beauty/AOV from the first frame"]
+ #[doc = " and zero flow vectors could be given as a substitute."]
+ #[doc = " For non-temporal model kinds the flow image in 'OptixDenoiserGuideLayer' is ignored."]
+ #[doc = " 'previousOutput' and"]
+ #[doc = " 'output' may refer to the same buffer, i.e. 'previousOutput' is first read by this function and later"]
+ #[doc = " overwritten with the denoised result. 'output' can be passed as 'previousOutput' to the next frame."]
+ #[doc = " In other model kinds (not temporal) 'previousOutput' is ignored."]
+ #[doc = ""]
+ #[doc = " The beauty layer must be given as the first entry in 'layers'."]
+ #[doc = " In AOV type model kinds (OPTIX_DENOISER_MODEL_KIND_AOV or in user defined models implementing"]
+ #[doc = " kernel-prediction) additional layers for the AOV images can be given."]
+ #[doc = " In each layer the noisy input image is given in 'input', the denoised output is written into the"]
+ #[doc = " 'output' image. input and output images may refer to the same buffer, with the restriction that"]
+ #[doc = " the pixel formats must be identical for input and output when the blend mode is selected (see"]
+ #[doc = " #OptixDenoiserParams)."]
+ #[doc = ""]
+ #[doc = " If OPTIX_DENOISER_MODEL_KIND_TEMPORAL or OPTIX_DENOISER_MODEL_KIND_TEMPORAL_AOV is selected, the denoised"]
+ #[doc = " image from the previous frame must be given in 'previousOutput' in the layer. 'previousOutput' and"]
+ #[doc = " 'output' may refer to the same buffer, i.e. 'previousOutput' is first read by this function and later"]
+ #[doc = " overwritten with the denoised result. 'output' can be passed as 'previousOutput' to the next frame."]
+ #[doc = " In other model kinds (not temporal) 'previousOutput' is ignored."]
+ #[doc = ""]
+ #[doc = " If OPTIX_DENOISER_MODEL_KIND_TEMPORAL or OPTIX_DENOISER_MODEL_KIND_TEMPORAL_AOV is selected, the"]
+ #[doc = " normal vector guide image must be given as 3d vectors in camera space. In the other models only"]
+ #[doc = " the x and y channels are used and other channels are ignored."]
+ #[doc = ""]
+ #[doc = " \\param[in] denoiser"]
+ #[doc = " \\param[in] stream"]
+ #[doc = " \\param[in] params"]
+ #[doc = " \\param[in] denoiserState"]
+ #[doc = " \\param[in] denoiserStateSizeInBytes"]
+ #[doc = " \\param[in] guideLayer"]
+ #[doc = " \\param[in] layers"]
+ #[doc = " \\param[in] numLayers"]
+ #[doc = " \\param[in] inputOffsetX"]
+ #[doc = " \\param[in] inputOffsetY"]
+ #[doc = " \\param[in] scratch"]
+ #[doc = " \\param[in] scratchSizeInBytes"]
+ pub fn optixDenoiserInvoke(
+ denoiser: OptixDenoiser,
+ stream: CUstream,
+ params: *const OptixDenoiserParams,
+ denoiserState: CUdeviceptr,
+ denoiserStateSizeInBytes: usize,
+ guideLayer: *const OptixDenoiserGuideLayer,
+ layers: *const OptixDenoiserLayer,
+ numLayers: ::std::os::raw::c_uint,
+ inputOffsetX: ::std::os::raw::c_uint,
+ inputOffsetY: ::std::os::raw::c_uint,
+ scratch: CUdeviceptr,
+ scratchSizeInBytes: usize,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " data type unsigned char is not supported for 'inputImage', it must be 3 or 4 component half/float."]
+ #[doc = ""]
+ #[doc = " \\param[in] denoiser"]
+ #[doc = " \\param[in] stream"]
+ #[doc = " \\param[in] inputImage"]
+ #[doc = " \\param[out] outputIntensity single float"]
+ #[doc = " \\param[in] scratch"]
+ #[doc = " \\param[in] scratchSizeInBytes"]
+ pub fn optixDenoiserComputeIntensity(
+ denoiser: OptixDenoiser,
+ stream: CUstream,
+ inputImage: *const OptixImage2D,
+ outputIntensity: CUdeviceptr,
+ scratch: CUdeviceptr,
+ scratchSizeInBytes: usize,
+ ) -> OptixResult;
+}
+extern "C" {
+ #[doc = " Compute average logarithmic for each of the first three channels for the given image."]
+ #[doc = " When denoising tiles the intensity of the entire image should be computed, i.e. not per tile to get"]
+ #[doc = " consistent results."]
+ #[doc = " This function needs scratch memory with a size of at least"]
+ #[doc = " sizeof( int ) * ( 3 + 3 * inputImage::width * inputImage::height ). When denoising entire images (no tiling)"]
+ #[doc = " the same scratch memory as passed to optixDenoiserInvoke could be used."]
+ #[doc = ""]
+ #[doc = " data type unsigned char is not supported for 'inputImage', it must be 3 or 4 component half/float."]
+ #[doc = ""]
+ #[doc = " \\param[in] denoiser"]
+ #[doc = " \\param[in] stream"]
+ #[doc = " \\param[in] inputImage"]
+ #[doc = " \\param[out] outputAverageColor three floats"]
+ #[doc = " \\param[in] scratch"]
+ #[doc = " \\param[in] scratchSizeInBytes"]
+ pub fn optixDenoiserComputeAverageColor(
+ denoiser: OptixDenoiser,
+ stream: CUstream,
+ inputImage: *const OptixImage2D,
+ outputAverageColor: CUdeviceptr,
+ scratch: CUdeviceptr,
+ scratchSizeInBytes: usize,
+ ) -> OptixResult;
+}
+#[doc = " The function table containing all API functions."]
+#[doc = ""]
+#[doc = " See #optixInit() and #optixInitWithHandle()."]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OptixFunctionTable {
+ #[doc = " See ::optixGetErrorName()."]
+ pub optixGetErrorName: ::std::option::Option<
+ unsafe extern "C" fn(result: OptixResult) -> *const ::std::os::raw::c_char,
+ >,
+ #[doc = " See ::optixGetErrorString()."]
+ pub optixGetErrorString: ::std::option::Option<
+ unsafe extern "C" fn(result: OptixResult) -> *const ::std::os::raw::c_char,
+ >,
+ #[doc = " See ::optixDeviceContextCreate()."]
+ pub optixDeviceContextCreate: ::std::option::Option<
+ unsafe extern "C" fn(
+ fromContext: CUcontext,
+ options: *const OptixDeviceContextOptions,
+ context: *mut OptixDeviceContext,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDeviceContextDestroy()."]
+ pub optixDeviceContextDestroy:
+ ::std::option::Option<unsafe extern "C" fn(context: OptixDeviceContext) -> OptixResult>,
+ #[doc = " See ::optixDeviceContextGetProperty()."]
+ pub optixDeviceContextGetProperty: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ property: OptixDeviceProperty,
+ value: *mut ::std::os::raw::c_void,
+ sizeInBytes: usize,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDeviceContextSetLogCallback()."]
+ pub optixDeviceContextSetLogCallback: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ callbackFunction: OptixLogCallback,
+ callbackData: *mut ::std::os::raw::c_void,
+ callbackLevel: ::std::os::raw::c_uint,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDeviceContextSetCacheEnabled()."]
+ pub optixDeviceContextSetCacheEnabled: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ enabled: ::std::os::raw::c_int,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDeviceContextSetCacheLocation()."]
+ pub optixDeviceContextSetCacheLocation: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ location: *const ::std::os::raw::c_char,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDeviceContextSetCacheDatabaseSizes()."]
+ pub optixDeviceContextSetCacheDatabaseSizes: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ lowWaterMark: usize,
+ highWaterMark: usize,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDeviceContextGetCacheEnabled()."]
+ pub optixDeviceContextGetCacheEnabled: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ enabled: *mut ::std::os::raw::c_int,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDeviceContextGetCacheLocation()."]
+ pub optixDeviceContextGetCacheLocation: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ location: *mut ::std::os::raw::c_char,
+ locationSize: usize,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDeviceContextGetCacheDatabaseSizes()."]
+ pub optixDeviceContextGetCacheDatabaseSizes: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ lowWaterMark: *mut usize,
+ highWaterMark: *mut usize,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixModuleCreateFromPTX()."]
+ pub optixModuleCreateFromPTX: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ moduleCompileOptions: *const OptixModuleCompileOptions,
+ pipelineCompileOptions: *const OptixPipelineCompileOptions,
+ PTX: *const ::std::os::raw::c_char,
+ PTXsize: usize,
+ logString: *mut ::std::os::raw::c_char,
+ logStringSize: *mut usize,
+ module: *mut OptixModule,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixModuleCreateFromPTXWithTasks()."]
+ pub optixModuleCreateFromPTXWithTasks: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ moduleCompileOptions: *const OptixModuleCompileOptions,
+ pipelineCompileOptions: *const OptixPipelineCompileOptions,
+ PTX: *const ::std::os::raw::c_char,
+ PTXsize: usize,
+ logString: *mut ::std::os::raw::c_char,
+ logStringSize: *mut usize,
+ module: *mut OptixModule,
+ firstTask: *mut OptixTask,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixModuleGetCompilationState()."]
+ pub optixModuleGetCompilationState: ::std::option::Option<
+ unsafe extern "C" fn(
+ module: OptixModule,
+ state: *mut OptixModuleCompileState,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixModuleDestroy()."]
+ pub optixModuleDestroy:
+ ::std::option::Option<unsafe extern "C" fn(module: OptixModule) -> OptixResult>,
+ #[doc = " See ::optixBuiltinISModuleGet()."]
+ pub optixBuiltinISModuleGet: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ moduleCompileOptions: *const OptixModuleCompileOptions,
+ pipelineCompileOptions: *const OptixPipelineCompileOptions,
+ builtinISOptions: *const OptixBuiltinISOptions,
+ builtinModule: *mut OptixModule,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixTaskExecute()."]
+ pub optixTaskExecute: ::std::option::Option<
+ unsafe extern "C" fn(
+ task: OptixTask,
+ additionalTasks: *mut OptixTask,
+ maxNumAdditionalTasks: ::std::os::raw::c_uint,
+ numAdditionalTasksCreated: *mut ::std::os::raw::c_uint,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixProgramGroupCreate()."]
+ pub optixProgramGroupCreate: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ programDescriptions: *const OptixProgramGroupDesc,
+ numProgramGroups: ::std::os::raw::c_uint,
+ options: *const OptixProgramGroupOptions,
+ logString: *mut ::std::os::raw::c_char,
+ logStringSize: *mut usize,
+ programGroups: *mut OptixProgramGroup,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixProgramGroupDestroy()."]
+ pub optixProgramGroupDestroy:
+ ::std::option::Option<unsafe extern "C" fn(programGroup: OptixProgramGroup) -> OptixResult>,
+ #[doc = " See ::optixProgramGroupGetStackSize()."]
+ pub optixProgramGroupGetStackSize: ::std::option::Option<
+ unsafe extern "C" fn(
+ programGroup: OptixProgramGroup,
+ stackSizes: *mut OptixStackSizes,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixPipelineCreate()."]
+ pub optixPipelineCreate: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ pipelineCompileOptions: *const OptixPipelineCompileOptions,
+ pipelineLinkOptions: *const OptixPipelineLinkOptions,
+ programGroups: *const OptixProgramGroup,
+ numProgramGroups: ::std::os::raw::c_uint,
+ logString: *mut ::std::os::raw::c_char,
+ logStringSize: *mut usize,
+ pipeline: *mut OptixPipeline,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixPipelineDestroy()."]
+ pub optixPipelineDestroy:
+ ::std::option::Option<unsafe extern "C" fn(pipeline: OptixPipeline) -> OptixResult>,
+ #[doc = " See ::optixPipelineSetStackSize()."]
+ pub optixPipelineSetStackSize: ::std::option::Option<
+ unsafe extern "C" fn(
+ pipeline: OptixPipeline,
+ directCallableStackSizeFromTraversal: ::std::os::raw::c_uint,
+ directCallableStackSizeFromState: ::std::os::raw::c_uint,
+ continuationStackSize: ::std::os::raw::c_uint,
+ maxTraversableGraphDepth: ::std::os::raw::c_uint,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixAccelComputeMemoryUsage()."]
+ pub optixAccelComputeMemoryUsage: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ accelOptions: *const OptixAccelBuildOptions,
+ buildInputs: *const OptixBuildInput,
+ numBuildInputs: ::std::os::raw::c_uint,
+ bufferSizes: *mut OptixAccelBufferSizes,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixAccelBuild()."]
+ pub optixAccelBuild: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ stream: CUstream,
+ accelOptions: *const OptixAccelBuildOptions,
+ buildInputs: *const OptixBuildInput,
+ numBuildInputs: ::std::os::raw::c_uint,
+ tempBuffer: CUdeviceptr,
+ tempBufferSizeInBytes: usize,
+ outputBuffer: CUdeviceptr,
+ outputBufferSizeInBytes: usize,
+ outputHandle: *mut OptixTraversableHandle,
+ emittedProperties: *const OptixAccelEmitDesc,
+ numEmittedProperties: ::std::os::raw::c_uint,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixAccelGetRelocationInfo()."]
+ pub optixAccelGetRelocationInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ handle: OptixTraversableHandle,
+ info: *mut OptixAccelRelocationInfo,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixAccelCheckRelocationCompatibility()."]
+ pub optixAccelCheckRelocationCompatibility: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ info: *const OptixAccelRelocationInfo,
+ compatible: *mut ::std::os::raw::c_int,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixAccelRelocate()."]
+ pub optixAccelRelocate: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ stream: CUstream,
+ info: *const OptixAccelRelocationInfo,
+ instanceTraversableHandles: CUdeviceptr,
+ numInstanceTraversableHandles: usize,
+ targetAccel: CUdeviceptr,
+ targetAccelSizeInBytes: usize,
+ targetHandle: *mut OptixTraversableHandle,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixAccelCompact()."]
+ pub optixAccelCompact: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ stream: CUstream,
+ inputHandle: OptixTraversableHandle,
+ outputBuffer: CUdeviceptr,
+ outputBufferSizeInBytes: usize,
+ outputHandle: *mut OptixTraversableHandle,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixConvertPointerToTraversableHandle()."]
+ pub optixConvertPointerToTraversableHandle: ::std::option::Option<
+ unsafe extern "C" fn(
+ onDevice: OptixDeviceContext,
+ pointer: CUdeviceptr,
+ traversableType: OptixTraversableType,
+ traversableHandle: *mut OptixTraversableHandle,
+ ) -> OptixResult,
+ >,
+ pub reserved1: ::std::option::Option<unsafe extern "C" fn()>,
+ pub reserved2: ::std::option::Option<unsafe extern "C" fn()>,
+ #[doc = " See ::optixConvertPointerToTraversableHandle()."]
+ pub optixSbtRecordPackHeader: ::std::option::Option<
+ unsafe extern "C" fn(
+ programGroup: OptixProgramGroup,
+ sbtRecordHeaderHostPointer: *mut ::std::os::raw::c_void,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixConvertPointerToTraversableHandle()."]
+ pub optixLaunch: ::std::option::Option<
+ unsafe extern "C" fn(
+ pipeline: OptixPipeline,
+ stream: CUstream,
+ pipelineParams: CUdeviceptr,
+ pipelineParamsSize: usize,
+ sbt: *const OptixShaderBindingTable,
+ width: ::std::os::raw::c_uint,
+ height: ::std::os::raw::c_uint,
+ depth: ::std::os::raw::c_uint,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDenoiserCreate()."]
+ pub optixDenoiserCreate: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ modelKind: OptixDenoiserModelKind,
+ options: *const OptixDenoiserOptions,
+ returnHandle: *mut OptixDenoiser,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDenoiserDestroy()."]
+ pub optixDenoiserDestroy:
+ ::std::option::Option<unsafe extern "C" fn(handle: OptixDenoiser) -> OptixResult>,
+ #[doc = " See ::optixDenoiserComputeMemoryResources()."]
+ pub optixDenoiserComputeMemoryResources: ::std::option::Option<
+ unsafe extern "C" fn(
+ handle: OptixDenoiser,
+ maximumInputWidth: ::std::os::raw::c_uint,
+ maximumInputHeight: ::std::os::raw::c_uint,
+ returnSizes: *mut OptixDenoiserSizes,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDenoiserSetup()."]
+ pub optixDenoiserSetup: ::std::option::Option<
+ unsafe extern "C" fn(
+ denoiser: OptixDenoiser,
+ stream: CUstream,
+ inputWidth: ::std::os::raw::c_uint,
+ inputHeight: ::std::os::raw::c_uint,
+ state: CUdeviceptr,
+ stateSizeInBytes: usize,
+ scratch: CUdeviceptr,
+ scratchSizeInBytes: usize,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDenoiserInvoke()."]
+ pub optixDenoiserInvoke: ::std::option::Option<
+ unsafe extern "C" fn(
+ denoiser: OptixDenoiser,
+ stream: CUstream,
+ params: *const OptixDenoiserParams,
+ denoiserState: CUdeviceptr,
+ denoiserStateSizeInBytes: usize,
+ guideLayer: *const OptixDenoiserGuideLayer,
+ layers: *const OptixDenoiserLayer,
+ numLayers: ::std::os::raw::c_uint,
+ inputOffsetX: ::std::os::raw::c_uint,
+ inputOffsetY: ::std::os::raw::c_uint,
+ scratch: CUdeviceptr,
+ scratchSizeInBytes: usize,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDenoiserComputeIntensity()."]
+ pub optixDenoiserComputeIntensity: ::std::option::Option<
+ unsafe extern "C" fn(
+ handle: OptixDenoiser,
+ stream: CUstream,
+ inputImage: *const OptixImage2D,
+ outputIntensity: CUdeviceptr,
+ scratch: CUdeviceptr,
+ scratchSizeInBytes: usize,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDenoiserComputeAverageColor()."]
+ pub optixDenoiserComputeAverageColor: ::std::option::Option<
+ unsafe extern "C" fn(
+ handle: OptixDenoiser,
+ stream: CUstream,
+ inputImage: *const OptixImage2D,
+ outputAverageColor: CUdeviceptr,
+ scratch: CUdeviceptr,
+ scratchSizeInBytes: usize,
+ ) -> OptixResult,
+ >,
+ #[doc = " See ::optixDenoiserCreateWithUserModel()."]
+ pub optixDenoiserCreateWithUserModel: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: OptixDeviceContext,
+ data: *const ::std::os::raw::c_void,
+ dataSizeInBytes: usize,
+ returnHandle: *mut OptixDenoiser,
+ ) -> OptixResult,
+ >,
+}
diff --git a/optix_base/src/optix6.rs b/optix_base/src/optix6.rs
new file mode 100644
index 0000000..f6ba983
--- /dev/null
+++ b/optix_base/src/optix6.rs
@@ -0,0 +1,16049 @@
+/* automatically generated by rust-bindgen 0.59.2 */
+
+impl RTformat {
+ #[doc = "< Format unknown"]
+ pub const RT_FORMAT_UNKNOWN: RTformat = RTformat(256);
+}
+impl RTformat {
+ #[doc = "< Float"]
+ pub const RT_FORMAT_FLOAT: RTformat = RTformat(257);
+}
+impl RTformat {
+ #[doc = "< sizeof(float)*2"]
+ pub const RT_FORMAT_FLOAT2: RTformat = RTformat(258);
+}
+impl RTformat {
+ #[doc = "< sizeof(float)*3"]
+ pub const RT_FORMAT_FLOAT3: RTformat = RTformat(259);
+}
+impl RTformat {
+ #[doc = "< sizeof(float)*4"]
+ pub const RT_FORMAT_FLOAT4: RTformat = RTformat(260);
+}
+impl RTformat {
+ #[doc = "< BYTE"]
+ pub const RT_FORMAT_BYTE: RTformat = RTformat(261);
+}
+impl RTformat {
+ #[doc = "< sizeof(CHAR)*2"]
+ pub const RT_FORMAT_BYTE2: RTformat = RTformat(262);
+}
+impl RTformat {
+ #[doc = "< sizeof(CHAR)*3"]
+ pub const RT_FORMAT_BYTE3: RTformat = RTformat(263);
+}
+impl RTformat {
+ #[doc = "< sizeof(CHAR)*4"]
+ pub const RT_FORMAT_BYTE4: RTformat = RTformat(264);
+}
+impl RTformat {
+ #[doc = "< UCHAR"]
+ pub const RT_FORMAT_UNSIGNED_BYTE: RTformat = RTformat(265);
+}
+impl RTformat {
+ #[doc = "< sizeof(UCHAR)*2"]
+ pub const RT_FORMAT_UNSIGNED_BYTE2: RTformat = RTformat(266);
+}
+impl RTformat {
+ #[doc = "< sizeof(UCHAR)*3"]
+ pub const RT_FORMAT_UNSIGNED_BYTE3: RTformat = RTformat(267);
+}
+impl RTformat {
+ #[doc = "< sizeof(UCHAR)*4"]
+ pub const RT_FORMAT_UNSIGNED_BYTE4: RTformat = RTformat(268);
+}
+impl RTformat {
+ #[doc = "< SHORT"]
+ pub const RT_FORMAT_SHORT: RTformat = RTformat(269);
+}
+impl RTformat {
+ #[doc = "< sizeof(SHORT)*2"]
+ pub const RT_FORMAT_SHORT2: RTformat = RTformat(270);
+}
+impl RTformat {
+ #[doc = "< sizeof(SHORT)*3"]
+ pub const RT_FORMAT_SHORT3: RTformat = RTformat(271);
+}
+impl RTformat {
+ #[doc = "< sizeof(SHORT)*4"]
+ pub const RT_FORMAT_SHORT4: RTformat = RTformat(272);
+}
+impl RTformat {
+ #[doc = "< USHORT"]
+ pub const RT_FORMAT_UNSIGNED_SHORT: RTformat = RTformat(273);
+}
+impl RTformat {
+ #[doc = "< sizeof(USHORT)*2"]
+ pub const RT_FORMAT_UNSIGNED_SHORT2: RTformat = RTformat(274);
+}
+impl RTformat {
+ #[doc = "< sizeof(USHORT)*3"]
+ pub const RT_FORMAT_UNSIGNED_SHORT3: RTformat = RTformat(275);
+}
+impl RTformat {
+ #[doc = "< sizeof(USHORT)*4"]
+ pub const RT_FORMAT_UNSIGNED_SHORT4: RTformat = RTformat(276);
+}
+impl RTformat {
+ #[doc = "< INT"]
+ pub const RT_FORMAT_INT: RTformat = RTformat(277);
+}
+impl RTformat {
+ #[doc = "< sizeof(INT)*2"]
+ pub const RT_FORMAT_INT2: RTformat = RTformat(278);
+}
+impl RTformat {
+ #[doc = "< sizeof(INT)*3"]
+ pub const RT_FORMAT_INT3: RTformat = RTformat(279);
+}
+impl RTformat {
+ #[doc = "< sizeof(INT)*4"]
+ pub const RT_FORMAT_INT4: RTformat = RTformat(280);
+}
+impl RTformat {
+ #[doc = "< sizeof(UINT)"]
+ pub const RT_FORMAT_UNSIGNED_INT: RTformat = RTformat(281);
+}
+impl RTformat {
+ #[doc = "< sizeof(UINT)*2"]
+ pub const RT_FORMAT_UNSIGNED_INT2: RTformat = RTformat(282);
+}
+impl RTformat {
+ #[doc = "< sizeof(UINT)*3"]
+ pub const RT_FORMAT_UNSIGNED_INT3: RTformat = RTformat(283);
+}
+impl RTformat {
+ #[doc = "< sizeof(UINT)*4"]
+ pub const RT_FORMAT_UNSIGNED_INT4: RTformat = RTformat(284);
+}
+impl RTformat {
+ #[doc = "< User Format"]
+ pub const RT_FORMAT_USER: RTformat = RTformat(285);
+}
+impl RTformat {
+ #[doc = "< Buffer Id"]
+ pub const RT_FORMAT_BUFFER_ID: RTformat = RTformat(286);
+}
+impl RTformat {
+ #[doc = "< Program Id"]
+ pub const RT_FORMAT_PROGRAM_ID: RTformat = RTformat(287);
+}
+impl RTformat {
+ #[doc = "< half float"]
+ pub const RT_FORMAT_HALF: RTformat = RTformat(288);
+}
+impl RTformat {
+ #[doc = "< sizeof(half float)*2"]
+ pub const RT_FORMAT_HALF2: RTformat = RTformat(289);
+}
+impl RTformat {
+ #[doc = "< sizeof(half float)*3"]
+ pub const RT_FORMAT_HALF3: RTformat = RTformat(290);
+}
+impl RTformat {
+ #[doc = "< sizeof(half float)*4"]
+ pub const RT_FORMAT_HALF4: RTformat = RTformat(291);
+}
+impl RTformat {
+ #[doc = "< LONG_LONG"]
+ pub const RT_FORMAT_LONG_LONG: RTformat = RTformat(292);
+}
+impl RTformat {
+ #[doc = "< sizeof(LONG_LONG)*2"]
+ pub const RT_FORMAT_LONG_LONG2: RTformat = RTformat(293);
+}
+impl RTformat {
+ #[doc = "< sizeof(LONG_LONG)*3"]
+ pub const RT_FORMAT_LONG_LONG3: RTformat = RTformat(294);
+}
+impl RTformat {
+ #[doc = "< sizeof(LONG_LONG)*4"]
+ pub const RT_FORMAT_LONG_LONG4: RTformat = RTformat(295);
+}
+impl RTformat {
+ #[doc = "< sizeof(ULONG_LONG)"]
+ pub const RT_FORMAT_UNSIGNED_LONG_LONG: RTformat = RTformat(296);
+}
+impl RTformat {
+ #[doc = "< sizeof(ULONG_LONG)*2"]
+ pub const RT_FORMAT_UNSIGNED_LONG_LONG2: RTformat = RTformat(297);
+}
+impl RTformat {
+ #[doc = "< sizeof(ULONG_LONG)*3"]
+ pub const RT_FORMAT_UNSIGNED_LONG_LONG3: RTformat = RTformat(298);
+}
+impl RTformat {
+ #[doc = "< sizeof(ULONG_LONG)*4"]
+ pub const RT_FORMAT_UNSIGNED_LONG_LONG4: RTformat = RTformat(299);
+}
+impl RTformat {
+ #[doc = "< Block Compressed RGB + optional 1-bit alpha BC1,"]
+ #[doc = "sizeof(UINT)*2"]
+ pub const RT_FORMAT_UNSIGNED_BC1: RTformat = RTformat(300);
+}
+impl RTformat {
+ #[doc = "< Block Compressed RGB + 4-bit alpha BC2,"]
+ #[doc = "sizeof(UINT)*4"]
+ pub const RT_FORMAT_UNSIGNED_BC2: RTformat = RTformat(301);
+}
+impl RTformat {
+ #[doc = "< Block Compressed RGBA BC3,"]
+ #[doc = "sizeof(UINT)*4"]
+ pub const RT_FORMAT_UNSIGNED_BC3: RTformat = RTformat(302);
+}
+impl RTformat {
+ #[doc = "< Block Compressed unsigned grayscale BC4,"]
+ #[doc = "sizeof(UINT)*2"]
+ pub const RT_FORMAT_UNSIGNED_BC4: RTformat = RTformat(303);
+}
+impl RTformat {
+ #[doc = "< Block Compressed signed grayscale BC4,"]
+ #[doc = "sizeof(UINT)*2"]
+ pub const RT_FORMAT_BC4: RTformat = RTformat(304);
+}
+impl RTformat {
+ #[doc = "< Block Compressed unsigned 2 x grayscale BC5,"]
+ #[doc = "sizeof(UINT)*4"]
+ pub const RT_FORMAT_UNSIGNED_BC5: RTformat = RTformat(305);
+}
+impl RTformat {
+ #[doc = "< Block compressed signed 2 x grayscale BC5,"]
+ #[doc = "sizeof(UINT)*4"]
+ pub const RT_FORMAT_BC5: RTformat = RTformat(306);
+}
+impl RTformat {
+ #[doc = "< Block compressed BC6 unsigned half-float,"]
+ #[doc = "sizeof(UINT)*4"]
+ pub const RT_FORMAT_UNSIGNED_BC6H: RTformat = RTformat(307);
+}
+impl RTformat {
+ #[doc = "< Block compressed BC6 signed half-float,"]
+ #[doc = "sizeof(UINT)*4"]
+ pub const RT_FORMAT_BC6H: RTformat = RTformat(308);
+}
+impl RTformat {
+ #[doc = "< Block compressed BC7,"]
+ #[doc = "sizeof(UINT)*4"]
+ pub const RT_FORMAT_UNSIGNED_BC7: RTformat = RTformat(309);
+}
+#[repr(transparent)]
+#[doc = " OptiX formats"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTformat(pub ::std::os::raw::c_uint);
+impl RTobjecttype {
+ #[doc = "< Object Type Unknown"]
+ pub const RT_OBJECTTYPE_UNKNOWN: RTobjecttype = RTobjecttype(512);
+}
+impl RTobjecttype {
+ #[doc = "< Group Type"]
+ pub const RT_OBJECTTYPE_GROUP: RTobjecttype = RTobjecttype(513);
+}
+impl RTobjecttype {
+ #[doc = "< Geometry Group Type"]
+ pub const RT_OBJECTTYPE_GEOMETRY_GROUP: RTobjecttype = RTobjecttype(514);
+}
+impl RTobjecttype {
+ #[doc = "< Transform Type"]
+ pub const RT_OBJECTTYPE_TRANSFORM: RTobjecttype = RTobjecttype(515);
+}
+impl RTobjecttype {
+ #[doc = "< Selector Type"]
+ pub const RT_OBJECTTYPE_SELECTOR: RTobjecttype = RTobjecttype(516);
+}
+impl RTobjecttype {
+ #[doc = "< Geometry Instance Type"]
+ pub const RT_OBJECTTYPE_GEOMETRY_INSTANCE: RTobjecttype = RTobjecttype(517);
+}
+impl RTobjecttype {
+ #[doc = "< Buffer Type"]
+ pub const RT_OBJECTTYPE_BUFFER: RTobjecttype = RTobjecttype(518);
+}
+impl RTobjecttype {
+ #[doc = "< Texture Sampler Type"]
+ pub const RT_OBJECTTYPE_TEXTURE_SAMPLER: RTobjecttype = RTobjecttype(519);
+}
+impl RTobjecttype {
+ #[doc = "< Object Type"]
+ pub const RT_OBJECTTYPE_OBJECT: RTobjecttype = RTobjecttype(520);
+}
+impl RTobjecttype {
+ #[doc = "< Matrix Float 2x2"]
+ pub const RT_OBJECTTYPE_MATRIX_FLOAT2x2: RTobjecttype = RTobjecttype(521);
+}
+impl RTobjecttype {
+ #[doc = "< Matrix Float 2x3"]
+ pub const RT_OBJECTTYPE_MATRIX_FLOAT2x3: RTobjecttype = RTobjecttype(522);
+}
+impl RTobjecttype {
+ #[doc = "< Matrix Float 2x4"]
+ pub const RT_OBJECTTYPE_MATRIX_FLOAT2x4: RTobjecttype = RTobjecttype(523);
+}
+impl RTobjecttype {
+ #[doc = "< Matrix Float 3x2"]
+ pub const RT_OBJECTTYPE_MATRIX_FLOAT3x2: RTobjecttype = RTobjecttype(524);
+}
+impl RTobjecttype {
+ #[doc = "< Matrix Float 3x3"]
+ pub const RT_OBJECTTYPE_MATRIX_FLOAT3x3: RTobjecttype = RTobjecttype(525);
+}
+impl RTobjecttype {
+ #[doc = "< Matrix Float 3x4"]
+ pub const RT_OBJECTTYPE_MATRIX_FLOAT3x4: RTobjecttype = RTobjecttype(526);
+}
+impl RTobjecttype {
+ #[doc = "< Matrix Float 4x2"]
+ pub const RT_OBJECTTYPE_MATRIX_FLOAT4x2: RTobjecttype = RTobjecttype(527);
+}
+impl RTobjecttype {
+ #[doc = "< Matrix Float 4x3"]
+ pub const RT_OBJECTTYPE_MATRIX_FLOAT4x3: RTobjecttype = RTobjecttype(528);
+}
+impl RTobjecttype {
+ #[doc = "< Matrix Float 4x4"]
+ pub const RT_OBJECTTYPE_MATRIX_FLOAT4x4: RTobjecttype = RTobjecttype(529);
+}
+impl RTobjecttype {
+ #[doc = "< Float Type"]
+ pub const RT_OBJECTTYPE_FLOAT: RTobjecttype = RTobjecttype(530);
+}
+impl RTobjecttype {
+ #[doc = "< Float2 Type"]
+ pub const RT_OBJECTTYPE_FLOAT2: RTobjecttype = RTobjecttype(531);
+}
+impl RTobjecttype {
+ #[doc = "< Float3 Type"]
+ pub const RT_OBJECTTYPE_FLOAT3: RTobjecttype = RTobjecttype(532);
+}
+impl RTobjecttype {
+ #[doc = "< Float4 Type"]
+ pub const RT_OBJECTTYPE_FLOAT4: RTobjecttype = RTobjecttype(533);
+}
+impl RTobjecttype {
+ #[doc = "< 32 Bit Integer Type"]
+ pub const RT_OBJECTTYPE_INT: RTobjecttype = RTobjecttype(534);
+}
+impl RTobjecttype {
+ #[doc = "< 32 Bit Integer2 Type"]
+ pub const RT_OBJECTTYPE_INT2: RTobjecttype = RTobjecttype(535);
+}
+impl RTobjecttype {
+ #[doc = "< 32 Bit Integer3 Type"]
+ pub const RT_OBJECTTYPE_INT3: RTobjecttype = RTobjecttype(536);
+}
+impl RTobjecttype {
+ #[doc = "< 32 Bit Integer4 Type"]
+ pub const RT_OBJECTTYPE_INT4: RTobjecttype = RTobjecttype(537);
+}
+impl RTobjecttype {
+ #[doc = "< 32 Bit Unsigned Integer Type"]
+ pub const RT_OBJECTTYPE_UNSIGNED_INT: RTobjecttype = RTobjecttype(538);
+}
+impl RTobjecttype {
+ #[doc = "< 32 Bit Unsigned Integer2 Type"]
+ pub const RT_OBJECTTYPE_UNSIGNED_INT2: RTobjecttype = RTobjecttype(539);
+}
+impl RTobjecttype {
+ #[doc = "< 32 Bit Unsigned Integer3 Type"]
+ pub const RT_OBJECTTYPE_UNSIGNED_INT3: RTobjecttype = RTobjecttype(540);
+}
+impl RTobjecttype {
+ #[doc = "< 32 Bit Unsigned Integer4 Type"]
+ pub const RT_OBJECTTYPE_UNSIGNED_INT4: RTobjecttype = RTobjecttype(541);
+}
+impl RTobjecttype {
+ #[doc = "< User Object Type"]
+ pub const RT_OBJECTTYPE_USER: RTobjecttype = RTobjecttype(542);
+}
+impl RTobjecttype {
+ #[doc = "< Object Type Program - Added in OptiX 3.0"]
+ pub const RT_OBJECTTYPE_PROGRAM: RTobjecttype = RTobjecttype(543);
+}
+impl RTobjecttype {
+ #[doc = "< Object Type Command List - Added in OptiX 5.0"]
+ pub const RT_OBJECTTYPE_COMMANDLIST: RTobjecttype = RTobjecttype(544);
+}
+impl RTobjecttype {
+ #[doc = "< Object Type Postprocessing Stage - Added in OptiX 5.0"]
+ pub const RT_OBJECTTYPE_POSTPROCESSINGSTAGE: RTobjecttype = RTobjecttype(545);
+}
+impl RTobjecttype {
+ #[doc = "< 64 Bit Integer Type - Added in Optix 6.0"]
+ pub const RT_OBJECTTYPE_LONG_LONG: RTobjecttype = RTobjecttype(546);
+}
+impl RTobjecttype {
+ #[doc = "< 64 Bit Integer2 Type - Added in Optix 6.0"]
+ pub const RT_OBJECTTYPE_LONG_LONG2: RTobjecttype = RTobjecttype(547);
+}
+impl RTobjecttype {
+ #[doc = "< 64 Bit Integer3 Type - Added in Optix 6.0"]
+ pub const RT_OBJECTTYPE_LONG_LONG3: RTobjecttype = RTobjecttype(548);
+}
+impl RTobjecttype {
+ #[doc = "< 64 Bit Integer4 Type - Added in Optix 6.0"]
+ pub const RT_OBJECTTYPE_LONG_LONG4: RTobjecttype = RTobjecttype(549);
+}
+impl RTobjecttype {
+ #[doc = "< 64 Bit Unsigned Integer Type - Added in Optix 6.0"]
+ pub const RT_OBJECTTYPE_UNSIGNED_LONG_LONG: RTobjecttype = RTobjecttype(550);
+}
+impl RTobjecttype {
+ #[doc = "< 64 Bit Unsigned Integer2 Type - Added in Optix 6.0"]
+ pub const RT_OBJECTTYPE_UNSIGNED_LONG_LONG2: RTobjecttype = RTobjecttype(551);
+}
+impl RTobjecttype {
+ #[doc = "< 64 Bit Unsigned Integer3 Type - Added in Optix 6.0"]
+ pub const RT_OBJECTTYPE_UNSIGNED_LONG_LONG3: RTobjecttype = RTobjecttype(552);
+}
+impl RTobjecttype {
+ #[doc = "< 64 Bit Unsigned Integer4 Type - Added in Optix 6.0"]
+ pub const RT_OBJECTTYPE_UNSIGNED_LONG_LONG4: RTobjecttype = RTobjecttype(553);
+}
+#[repr(transparent)]
+#[doc = " OptiX Object Types"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTobjecttype(pub ::std::os::raw::c_uint);
+impl RTwrapmode {
+ #[doc = "< Wrap repeat"]
+ pub const RT_WRAP_REPEAT: RTwrapmode = RTwrapmode(0);
+}
+impl RTwrapmode {
+ #[doc = "< Clamp to edge"]
+ pub const RT_WRAP_CLAMP_TO_EDGE: RTwrapmode = RTwrapmode(1);
+}
+impl RTwrapmode {
+ #[doc = "< Mirror"]
+ pub const RT_WRAP_MIRROR: RTwrapmode = RTwrapmode(2);
+}
+impl RTwrapmode {
+ #[doc = "< Clamp to border"]
+ pub const RT_WRAP_CLAMP_TO_BORDER: RTwrapmode = RTwrapmode(3);
+}
+#[repr(transparent)]
+#[doc = " Wrap mode"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTwrapmode(pub ::std::os::raw::c_uint);
+impl RTfiltermode {
+ #[doc = "< Nearest"]
+ pub const RT_FILTER_NEAREST: RTfiltermode = RTfiltermode(0);
+}
+impl RTfiltermode {
+ #[doc = "< Linear"]
+ pub const RT_FILTER_LINEAR: RTfiltermode = RTfiltermode(1);
+}
+impl RTfiltermode {
+ #[doc = "< No filter"]
+ pub const RT_FILTER_NONE: RTfiltermode = RTfiltermode(2);
+}
+#[repr(transparent)]
+#[doc = " Filter mode"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTfiltermode(pub ::std::os::raw::c_uint);
+impl RTtexturereadmode {
+ #[doc = "< Read element type"]
+ pub const RT_TEXTURE_READ_ELEMENT_TYPE: RTtexturereadmode = RTtexturereadmode(0);
+}
+impl RTtexturereadmode {
+ #[doc = "< Read normalized float"]
+ pub const RT_TEXTURE_READ_NORMALIZED_FLOAT: RTtexturereadmode = RTtexturereadmode(1);
+}
+impl RTtexturereadmode {
+ #[doc = "< Read element type and apply sRGB to linear conversion during texture read for 8-bit integer buffer formats"]
+ pub const RT_TEXTURE_READ_ELEMENT_TYPE_SRGB: RTtexturereadmode = RTtexturereadmode(2);
+}
+impl RTtexturereadmode {
+ #[doc = "< Read normalized float and apply sRGB to linear conversion during texture read for 8-bit integer buffer formats"]
+ pub const RT_TEXTURE_READ_NORMALIZED_FLOAT_SRGB: RTtexturereadmode = RTtexturereadmode(3);
+}
+#[repr(transparent)]
+#[doc = " Texture read mode"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTtexturereadmode(pub ::std::os::raw::c_uint);
+impl RTgltarget {
+ #[doc = "< GL texture 2D"]
+ pub const RT_TARGET_GL_TEXTURE_2D: RTgltarget = RTgltarget(0);
+}
+impl RTgltarget {
+ #[doc = "< GL texture rectangle"]
+ pub const RT_TARGET_GL_TEXTURE_RECTANGLE: RTgltarget = RTgltarget(1);
+}
+impl RTgltarget {
+ #[doc = "< GL texture 3D"]
+ pub const RT_TARGET_GL_TEXTURE_3D: RTgltarget = RTgltarget(2);
+}
+impl RTgltarget {
+ #[doc = "< GL render buffer"]
+ pub const RT_TARGET_GL_RENDER_BUFFER: RTgltarget = RTgltarget(3);
+}
+impl RTgltarget {
+ #[doc = "< GL texture 1D"]
+ pub const RT_TARGET_GL_TEXTURE_1D: RTgltarget = RTgltarget(4);
+}
+impl RTgltarget {
+ #[doc = "< GL array of 1D textures"]
+ pub const RT_TARGET_GL_TEXTURE_1D_ARRAY: RTgltarget = RTgltarget(5);
+}
+impl RTgltarget {
+ #[doc = "< GL array of 2D textures"]
+ pub const RT_TARGET_GL_TEXTURE_2D_ARRAY: RTgltarget = RTgltarget(6);
+}
+impl RTgltarget {
+ #[doc = "< GL cube map texture"]
+ pub const RT_TARGET_GL_TEXTURE_CUBE_MAP: RTgltarget = RTgltarget(7);
+}
+impl RTgltarget {
+ #[doc = "< GL array of cube maps"]
+ pub const RT_TARGET_GL_TEXTURE_CUBE_MAP_ARRAY: RTgltarget = RTgltarget(8);
+}
+#[repr(transparent)]
+#[doc = " GL Target"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTgltarget(pub ::std::os::raw::c_uint);
+impl RTtextureindexmode {
+ #[doc = "< Texture Index normalized coordinates"]
+ pub const RT_TEXTURE_INDEX_NORMALIZED_COORDINATES: RTtextureindexmode = RTtextureindexmode(0);
+}
+impl RTtextureindexmode {
+ #[doc = "< Texture Index Array"]
+ pub const RT_TEXTURE_INDEX_ARRAY_INDEX: RTtextureindexmode = RTtextureindexmode(1);
+}
+#[repr(transparent)]
+#[doc = " Texture index mode"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTtextureindexmode(pub ::std::os::raw::c_uint);
+impl RTbuffertype {
+ #[doc = "< Input buffer for the GPU"]
+ pub const RT_BUFFER_INPUT: RTbuffertype = RTbuffertype(1);
+}
+impl RTbuffertype {
+ #[doc = "< Output buffer for the GPU"]
+ pub const RT_BUFFER_OUTPUT: RTbuffertype = RTbuffertype(2);
+}
+impl RTbuffertype {
+ #[doc = "< Ouput/Input buffer for the GPU"]
+ pub const RT_BUFFER_INPUT_OUTPUT: RTbuffertype = RTbuffertype(3);
+}
+impl RTbuffertype {
+ #[doc = "< Progressive stream buffer"]
+ pub const RT_BUFFER_PROGRESSIVE_STREAM: RTbuffertype = RTbuffertype(16);
+}
+#[repr(transparent)]
+#[doc = " Buffer type"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTbuffertype(pub ::std::os::raw::c_uint);
+impl RTbufferflag {
+ #[doc = "< An @ref RT_BUFFER_INPUT_OUTPUT has separate copies on each device that are not synchronized"]
+ pub const RT_BUFFER_GPU_LOCAL: RTbufferflag = RTbufferflag(4);
+}
+impl RTbufferflag {
+ #[doc = "< A CUDA Interop buffer will only be synchronized across devices when dirtied by @ref rtBufferMap or @ref rtBufferMarkDirty"]
+ pub const RT_BUFFER_COPY_ON_DIRTY: RTbufferflag = RTbufferflag(8);
+}
+impl RTbufferflag {
+ #[doc = "< An @ref RT_BUFFER_INPUT for which a synchronize is forced on unmapping from host and the host memory is freed"]
+ pub const RT_BUFFER_DISCARD_HOST_MEMORY: RTbufferflag = RTbufferflag(32);
+}
+impl RTbufferflag {
+ #[doc = "< Depth specifies the number of layers, not the depth of a 3D array"]
+ pub const RT_BUFFER_LAYERED: RTbufferflag = RTbufferflag(2097152);
+}
+impl RTbufferflag {
+ #[doc = "< Enables creation of cubemaps. If this flag is set, Width must be equal to Height, and Depth must be six. If the @ref RT_BUFFER_LAYERED flag is also set, then Depth must be a multiple of six"]
+ pub const RT_BUFFER_CUBEMAP: RTbufferflag = RTbufferflag(4194304);
+}
+#[repr(transparent)]
+#[doc = " Buffer flags"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTbufferflag(pub ::std::os::raw::c_uint);
+impl RTbuffermapflag {
+ #[doc = "< Map buffer memory for reading"]
+ pub const RT_BUFFER_MAP_READ: RTbuffermapflag = RTbuffermapflag(1);
+}
+impl RTbuffermapflag {
+ #[doc = "< Map buffer memory for both reading and writing"]
+ pub const RT_BUFFER_MAP_READ_WRITE: RTbuffermapflag = RTbuffermapflag(2);
+}
+impl RTbuffermapflag {
+ #[doc = "< Map buffer memory for writing"]
+ pub const RT_BUFFER_MAP_WRITE: RTbuffermapflag = RTbuffermapflag(4);
+}
+impl RTbuffermapflag {
+ #[doc = "< Map buffer memory for writing, with the previous contents being undefined"]
+ pub const RT_BUFFER_MAP_WRITE_DISCARD: RTbuffermapflag = RTbuffermapflag(8);
+}
+#[repr(transparent)]
+#[doc = " Buffer mapping flags"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTbuffermapflag(pub ::std::os::raw::c_uint);
+impl RTexception {
+ #[doc = "< Payload access out of bounds - Added in OptiX 6.0"]
+ pub const RT_EXCEPTION_PAYLOAD_ACCESS_OUT_OF_BOUNDS: RTexception = RTexception(1003);
+}
+impl RTexception {
+ #[doc = "< Exception code of user exception out of bounds - Added in OptiX 6.0"]
+ pub const RT_EXCEPTION_USER_EXCEPTION_CODE_OUT_OF_BOUNDS: RTexception = RTexception(1004);
+}
+impl RTexception {
+ #[doc = "< Trace depth exceeded - Added in Optix 6.0"]
+ pub const RT_EXCEPTION_TRACE_DEPTH_EXCEEDED: RTexception = RTexception(1005);
+}
+impl RTexception {
+ #[doc = "< Program ID not valid"]
+ pub const RT_EXCEPTION_PROGRAM_ID_INVALID: RTexception = RTexception(1006);
+}
+impl RTexception {
+ #[doc = "< Texture ID not valid"]
+ pub const RT_EXCEPTION_TEXTURE_ID_INVALID: RTexception = RTexception(1007);
+}
+impl RTexception {
+ #[doc = "< Buffer ID not valid"]
+ pub const RT_EXCEPTION_BUFFER_ID_INVALID: RTexception = RTexception(1018);
+}
+impl RTexception {
+ #[doc = "< Index out of bounds"]
+ pub const RT_EXCEPTION_INDEX_OUT_OF_BOUNDS: RTexception = RTexception(1019);
+}
+impl RTexception {
+ #[doc = "< Stack overflow"]
+ pub const RT_EXCEPTION_STACK_OVERFLOW: RTexception = RTexception(1020);
+}
+impl RTexception {
+ #[doc = "< Buffer index out of bounds"]
+ pub const RT_EXCEPTION_BUFFER_INDEX_OUT_OF_BOUNDS: RTexception = RTexception(1021);
+}
+impl RTexception {
+ #[doc = "< Invalid ray"]
+ pub const RT_EXCEPTION_INVALID_RAY: RTexception = RTexception(1022);
+}
+impl RTexception {
+ #[doc = "< Internal error"]
+ pub const RT_EXCEPTION_INTERNAL_ERROR: RTexception = RTexception(1023);
+}
+impl RTexception {
+ #[doc = "< First user exception code"]
+ pub const RT_EXCEPTION_USER: RTexception = RTexception(1024);
+}
+impl RTexception {
+ #[doc = "< Last user exception code"]
+ pub const RT_EXCEPTION_USER_MAX: RTexception = RTexception(65535);
+}
+impl RTexception {
+ #[doc = "< All exceptions"]
+ pub const RT_EXCEPTION_ALL: RTexception = RTexception(2147483647);
+}
+#[repr(transparent)]
+#[doc = " Exceptions"]
+#[doc = ""]
+#[doc = " <B>See also</B>"]
+#[doc = " @ref rtContextSetExceptionEnabled,"]
+#[doc = " @ref rtContextGetExceptionEnabled,"]
+#[doc = " @ref rtGetExceptionCode,"]
+#[doc = " @ref rtThrow,"]
+#[doc = " @ref rtPrintf"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTexception(pub ::std::os::raw::c_uint);
+impl RTresult {
+ #[doc = "< Success"]
+ pub const RT_SUCCESS: RTresult = RTresult(0);
+}
+impl RTresult {
+ #[doc = "< Timeout callback"]
+ pub const RT_TIMEOUT_CALLBACK: RTresult = RTresult(256);
+}
+impl RTresult {
+ #[doc = "< Invalid Context"]
+ pub const RT_ERROR_INVALID_CONTEXT: RTresult = RTresult(1280);
+}
+impl RTresult {
+ #[doc = "< Invalid Value"]
+ pub const RT_ERROR_INVALID_VALUE: RTresult = RTresult(1281);
+}
+impl RTresult {
+ #[doc = "< Timeout callback"]
+ pub const RT_ERROR_MEMORY_ALLOCATION_FAILED: RTresult = RTresult(1282);
+}
+impl RTresult {
+ #[doc = "< Type Mismatch"]
+ pub const RT_ERROR_TYPE_MISMATCH: RTresult = RTresult(1283);
+}
+impl RTresult {
+ #[doc = "< Variable not found"]
+ pub const RT_ERROR_VARIABLE_NOT_FOUND: RTresult = RTresult(1284);
+}
+impl RTresult {
+ #[doc = "< Variable redeclared"]
+ pub const RT_ERROR_VARIABLE_REDECLARED: RTresult = RTresult(1285);
+}
+impl RTresult {
+ #[doc = "< Illegal symbol"]
+ pub const RT_ERROR_ILLEGAL_SYMBOL: RTresult = RTresult(1286);
+}
+impl RTresult {
+ #[doc = "< Invalid source"]
+ pub const RT_ERROR_INVALID_SOURCE: RTresult = RTresult(1287);
+}
+impl RTresult {
+ #[doc = "< Version mismatch"]
+ pub const RT_ERROR_VERSION_MISMATCH: RTresult = RTresult(1288);
+}
+impl RTresult {
+ #[doc = "< Object creation failed"]
+ pub const RT_ERROR_OBJECT_CREATION_FAILED: RTresult = RTresult(1536);
+}
+impl RTresult {
+ #[doc = "< No device"]
+ pub const RT_ERROR_NO_DEVICE: RTresult = RTresult(1537);
+}
+impl RTresult {
+ #[doc = "< Invalid device"]
+ pub const RT_ERROR_INVALID_DEVICE: RTresult = RTresult(1538);
+}
+impl RTresult {
+ #[doc = "< Invalid image"]
+ pub const RT_ERROR_INVALID_IMAGE: RTresult = RTresult(1539);
+}
+impl RTresult {
+ #[doc = "< File not found"]
+ pub const RT_ERROR_FILE_NOT_FOUND: RTresult = RTresult(1540);
+}
+impl RTresult {
+ #[doc = "< Already mapped"]
+ pub const RT_ERROR_ALREADY_MAPPED: RTresult = RTresult(1541);
+}
+impl RTresult {
+ #[doc = "< Invalid driver version"]
+ pub const RT_ERROR_INVALID_DRIVER_VERSION: RTresult = RTresult(1542);
+}
+impl RTresult {
+ #[doc = "< Context creation failed"]
+ pub const RT_ERROR_CONTEXT_CREATION_FAILED: RTresult = RTresult(1543);
+}
+impl RTresult {
+ #[doc = "< Resource not registered"]
+ pub const RT_ERROR_RESOURCE_NOT_REGISTERED: RTresult = RTresult(1544);
+}
+impl RTresult {
+ #[doc = "< Resource already registered"]
+ pub const RT_ERROR_RESOURCE_ALREADY_REGISTERED: RTresult = RTresult(1545);
+}
+impl RTresult {
+ #[doc = "< OptiX DLL failed to load"]
+ pub const RT_ERROR_OPTIX_NOT_LOADED: RTresult = RTresult(1546);
+}
+impl RTresult {
+ #[doc = "< Denoiser DLL failed to load"]
+ pub const RT_ERROR_DENOISER_NOT_LOADED: RTresult = RTresult(1547);
+}
+impl RTresult {
+ #[doc = "< SSIM predictor DLL failed to load"]
+ pub const RT_ERROR_SSIM_PREDICTOR_NOT_LOADED: RTresult = RTresult(1548);
+}
+impl RTresult {
+ #[doc = "< Driver version retrieval failed"]
+ pub const RT_ERROR_DRIVER_VERSION_FAILED: RTresult = RTresult(1549);
+}
+impl RTresult {
+ #[doc = "< No write permission on disk cache file"]
+ pub const RT_ERROR_DATABASE_FILE_PERMISSIONS: RTresult = RTresult(1550);
+}
+impl RTresult {
+ #[doc = "< Launch failed"]
+ pub const RT_ERROR_LAUNCH_FAILED: RTresult = RTresult(2304);
+}
+impl RTresult {
+ #[doc = "< Not supported"]
+ pub const RT_ERROR_NOT_SUPPORTED: RTresult = RTresult(2560);
+}
+impl RTresult {
+ #[doc = "< Connection failed"]
+ pub const RT_ERROR_CONNECTION_FAILED: RTresult = RTresult(2816);
+}
+impl RTresult {
+ #[doc = "< Authentication failed"]
+ pub const RT_ERROR_AUTHENTICATION_FAILED: RTresult = RTresult(2817);
+}
+impl RTresult {
+ #[doc = "< Connection already exists"]
+ pub const RT_ERROR_CONNECTION_ALREADY_EXISTS: RTresult = RTresult(2818);
+}
+impl RTresult {
+ #[doc = "< Network component failed to load"]
+ pub const RT_ERROR_NETWORK_LOAD_FAILED: RTresult = RTresult(2819);
+}
+impl RTresult {
+ #[doc = "< Network initialization failed"]
+ pub const RT_ERROR_NETWORK_INIT_FAILED: RTresult = RTresult(2820);
+}
+impl RTresult {
+ #[doc = "< No cluster is running"]
+ pub const RT_ERROR_CLUSTER_NOT_RUNNING: RTresult = RTresult(2822);
+}
+impl RTresult {
+ #[doc = "< Cluster is already running"]
+ pub const RT_ERROR_CLUSTER_ALREADY_RUNNING: RTresult = RTresult(2823);
+}
+impl RTresult {
+ #[doc = "< Not enough free nodes"]
+ pub const RT_ERROR_INSUFFICIENT_FREE_NODES: RTresult = RTresult(2824);
+}
+impl RTresult {
+ #[doc = "< Invalid global attribute"]
+ pub const RT_ERROR_INVALID_GLOBAL_ATTRIBUTE: RTresult = RTresult(3072);
+}
+impl RTresult {
+ #[doc = "< Error unknown"]
+ pub const RT_ERROR_UNKNOWN: RTresult = RTresult(-1);
+}
+#[repr(transparent)]
+#[doc = " Result"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTresult(pub ::std::os::raw::c_int);
+impl RTdeviceattribute {
+ #[doc = "< Max Threads per Block sizeof(int)"]
+ pub const RT_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK: RTdeviceattribute = RTdeviceattribute(0);
+}
+impl RTdeviceattribute {
+ #[doc = "< Clock rate sizeof(int)"]
+ pub const RT_DEVICE_ATTRIBUTE_CLOCK_RATE: RTdeviceattribute = RTdeviceattribute(1);
+}
+impl RTdeviceattribute {
+ #[doc = "< Multiprocessor count sizeof(int)"]
+ pub const RT_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT: RTdeviceattribute = RTdeviceattribute(2);
+}
+impl RTdeviceattribute {
+ #[doc = "< Execution timeout enabled sizeof(int)"]
+ pub const RT_DEVICE_ATTRIBUTE_EXECUTION_TIMEOUT_ENABLED: RTdeviceattribute =
+ RTdeviceattribute(3);
+}
+impl RTdeviceattribute {
+ #[doc = "< Hardware Texture count sizeof(int)"]
+ pub const RT_DEVICE_ATTRIBUTE_MAX_HARDWARE_TEXTURE_COUNT: RTdeviceattribute =
+ RTdeviceattribute(4);
+}
+impl RTdeviceattribute {
+ #[doc = "< Attribute Name"]
+ pub const RT_DEVICE_ATTRIBUTE_NAME: RTdeviceattribute = RTdeviceattribute(5);
+}
+impl RTdeviceattribute {
+ #[doc = "< Compute Capabilities sizeof(int2)"]
+ pub const RT_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY: RTdeviceattribute = RTdeviceattribute(6);
+}
+impl RTdeviceattribute {
+ #[doc = "< Total Memory sizeof(RTsize)"]
+ pub const RT_DEVICE_ATTRIBUTE_TOTAL_MEMORY: RTdeviceattribute = RTdeviceattribute(7);
+}
+impl RTdeviceattribute {
+ #[doc = "< TCC driver sizeof(int)"]
+ pub const RT_DEVICE_ATTRIBUTE_TCC_DRIVER: RTdeviceattribute = RTdeviceattribute(8);
+}
+impl RTdeviceattribute {
+ #[doc = "< CUDA device ordinal sizeof(int)"]
+ pub const RT_DEVICE_ATTRIBUTE_CUDA_DEVICE_ORDINAL: RTdeviceattribute = RTdeviceattribute(9);
+}
+impl RTdeviceattribute {
+ #[doc = "< PCI Bus Id"]
+ pub const RT_DEVICE_ATTRIBUTE_PCI_BUS_ID: RTdeviceattribute = RTdeviceattribute(10);
+}
+impl RTdeviceattribute {
+ #[doc = "< Ordinals of compatible devices sizeof(int=N) + N*sizeof(int)"]
+ pub const RT_DEVICE_ATTRIBUTE_COMPATIBLE_DEVICES: RTdeviceattribute = RTdeviceattribute(11);
+}
+impl RTdeviceattribute {
+ #[doc = "< RT core version (0 for no support, 10 for version 1.0) sizeof(int)"]
+ pub const RT_DEVICE_ATTRIBUTE_RTCORE_VERSION: RTdeviceattribute = RTdeviceattribute(12);
+}
+#[repr(transparent)]
+#[doc = " Device attributes"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTdeviceattribute(pub ::std::os::raw::c_uint);
+impl RTglobalattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_GLOBAL_ATTRIBUTE_DISPLAY_DRIVER_VERSION_MAJOR: RTglobalattribute =
+ RTglobalattribute(1);
+}
+impl RTglobalattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_GLOBAL_ATTRIBUTE_DISPLAY_DRIVER_VERSION_MINOR: RTglobalattribute =
+ RTglobalattribute(2);
+}
+impl RTglobalattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_GLOBAL_ATTRIBUTE_ENABLE_RTX: RTglobalattribute = RTglobalattribute(268435456);
+}
+impl RTglobalattribute {
+ #[doc = "< Knobs string"]
+ pub const RT_GLOBAL_ATTRIBUTE_DEVELOPER_OPTIONS: RTglobalattribute =
+ RTglobalattribute(268435457);
+}
+#[repr(transparent)]
+#[doc = " Global attributes"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTglobalattribute(pub ::std::os::raw::c_uint);
+impl RTcontextattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_CONTEXT_ATTRIBUTE_MAX_TEXTURE_COUNT: RTcontextattribute = RTcontextattribute(0);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_CONTEXT_ATTRIBUTE_CPU_NUM_THREADS: RTcontextattribute = RTcontextattribute(1);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(RTsize)"]
+ pub const RT_CONTEXT_ATTRIBUTE_USED_HOST_MEMORY: RTcontextattribute = RTcontextattribute(2);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_CONTEXT_ATTRIBUTE_GPU_PAGING_ACTIVE: RTcontextattribute = RTcontextattribute(3);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_CONTEXT_ATTRIBUTE_GPU_PAGING_FORCED_OFF: RTcontextattribute =
+ RTcontextattribute(4);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_CONTEXT_ATTRIBUTE_DISK_CACHE_ENABLED: RTcontextattribute = RTcontextattribute(5);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_CONTEXT_ATTRIBUTE_PREFER_FAST_RECOMPILES: RTcontextattribute =
+ RTcontextattribute(6);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_CONTEXT_ATTRIBUTE_FORCE_INLINE_USER_FUNCTIONS: RTcontextattribute =
+ RTcontextattribute(7);
+}
+impl RTcontextattribute {
+ #[doc = "< 32"]
+ pub const RT_CONTEXT_ATTRIBUTE_OPTIX_SALT: RTcontextattribute = RTcontextattribute(8);
+}
+impl RTcontextattribute {
+ #[doc = "< 32"]
+ pub const RT_CONTEXT_ATTRIBUTE_VENDOR_SALT: RTcontextattribute = RTcontextattribute(9);
+}
+impl RTcontextattribute {
+ #[doc = "< variable"]
+ pub const RT_CONTEXT_ATTRIBUTE_PUBLIC_VENDOR_KEY: RTcontextattribute = RTcontextattribute(10);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(char*)"]
+ pub const RT_CONTEXT_ATTRIBUTE_DISK_CACHE_LOCATION: RTcontextattribute = RTcontextattribute(11);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(RTsize[2])"]
+ pub const RT_CONTEXT_ATTRIBUTE_DISK_CACHE_MEMORY_LIMITS: RTcontextattribute =
+ RTcontextattribute(12);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_CONTEXT_ATTRIBUTE_PREFER_WATERTIGHT_TRAVERSAL: RTcontextattribute =
+ RTcontextattribute(13);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_CONTEXT_ATTRIBUTE_MAX_CONCURRENT_LAUNCHES: RTcontextattribute =
+ RTcontextattribute(14);
+}
+impl RTcontextattribute {
+ #[doc = "< sizeof(RTsize)"]
+ pub const RT_CONTEXT_ATTRIBUTE_AVAILABLE_DEVICE_MEMORY: RTcontextattribute =
+ RTcontextattribute(268435456);
+}
+#[repr(transparent)]
+#[doc = " Context attributes"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTcontextattribute(pub ::std::os::raw::c_uint);
+impl RTbufferattribute {
+ #[doc = "< Format string"]
+ pub const RT_BUFFER_ATTRIBUTE_STREAM_FORMAT: RTbufferattribute = RTbufferattribute(0);
+}
+impl RTbufferattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_BUFFER_ATTRIBUTE_STREAM_BITRATE: RTbufferattribute = RTbufferattribute(1);
+}
+impl RTbufferattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_BUFFER_ATTRIBUTE_STREAM_FPS: RTbufferattribute = RTbufferattribute(2);
+}
+impl RTbufferattribute {
+ #[doc = "< sizeof(float)"]
+ pub const RT_BUFFER_ATTRIBUTE_STREAM_GAMMA: RTbufferattribute = RTbufferattribute(3);
+}
+impl RTbufferattribute {
+ #[doc = "< sizeof(int)"]
+ pub const RT_BUFFER_ATTRIBUTE_PAGE_SIZE: RTbufferattribute = RTbufferattribute(4);
+}
+#[repr(transparent)]
+#[doc = " Buffer attributes"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTbufferattribute(pub ::std::os::raw::c_uint);
+impl RTmotionbordermode {
+ #[doc = "< Clamp outside of bounds"]
+ pub const RT_MOTIONBORDERMODE_CLAMP: RTmotionbordermode = RTmotionbordermode(0);
+}
+impl RTmotionbordermode {
+ #[doc = "< Vanish outside of bounds"]
+ pub const RT_MOTIONBORDERMODE_VANISH: RTmotionbordermode = RTmotionbordermode(1);
+}
+#[repr(transparent)]
+#[doc = " Motion border modes"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTmotionbordermode(pub ::std::os::raw::c_uint);
+impl RTmotionkeytype {
+ #[doc = "< No motion keys set"]
+ pub const RT_MOTIONKEYTYPE_NONE: RTmotionkeytype = RTmotionkeytype(0);
+}
+impl RTmotionkeytype {
+ #[doc = "< Affine matrix format - 12 floats"]
+ pub const RT_MOTIONKEYTYPE_MATRIX_FLOAT12: RTmotionkeytype = RTmotionkeytype(1);
+}
+impl RTmotionkeytype {
+ #[doc = "< SRT format - 16 floats"]
+ pub const RT_MOTIONKEYTYPE_SRT_FLOAT16: RTmotionkeytype = RTmotionkeytype(2);
+}
+#[repr(transparent)]
+#[doc = " Motion key type"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTmotionkeytype(pub ::std::os::raw::c_uint);
+impl RTgeometrybuildflags {
+ #[doc = "< No special flags set"]
+ pub const RT_GEOMETRY_BUILD_FLAG_NONE: RTgeometrybuildflags = RTgeometrybuildflags(0);
+}
+impl RTgeometrybuildflags {
+ #[doc = "< User buffers are released after consumption by acceleration structure build"]
+ pub const RT_GEOMETRY_BUILD_FLAG_RELEASE_BUFFERS: RTgeometrybuildflags =
+ RTgeometrybuildflags(16);
+}
+#[repr(transparent)]
+#[doc = " GeometryX build flags"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTgeometrybuildflags(pub ::std::os::raw::c_uint);
+impl RTgeometryflags {
+ #[doc = "< No special flags set"]
+ pub const RT_GEOMETRY_FLAG_NONE: RTgeometryflags = RTgeometryflags(0);
+}
+impl RTgeometryflags {
+ #[doc = "< Disable any-hit program execution (execution will be skipped,including the no-op any-hit program"]
+ #[doc = "used when an any-hit program is not specified)."]
+ #[doc = "Can be overridden by ray and instance flags, precedence: RTrayflags > RTinstanceflags > RTgeometryflags"]
+ pub const RT_GEOMETRY_FLAG_DISABLE_ANYHIT: RTgeometryflags = RTgeometryflags(1);
+}
+impl RTgeometryflags {
+ #[doc = "< Disable primitive splitting to avoid potential multiple any-hit program execution for a single intersection"]
+ pub const RT_GEOMETRY_FLAG_NO_SPLITTING: RTgeometryflags = RTgeometryflags(2);
+}
+#[repr(transparent)]
+#[doc = " Material-dependent flags set on Geometry/GeometryTriangles"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTgeometryflags(pub ::std::os::raw::c_uint);
+impl RTinstanceflags {
+ #[doc = "< No special flag set"]
+ pub const RT_INSTANCE_FLAG_NONE: RTinstanceflags = RTinstanceflags(0);
+}
+impl RTinstanceflags {
+ #[doc = "< Prevent triangles from getting culled due to face orientation (overrides ray culling flags)."]
+ pub const RT_INSTANCE_FLAG_DISABLE_TRIANGLE_CULLING: RTinstanceflags = RTinstanceflags(1);
+}
+impl RTinstanceflags {
+ #[doc = "< Flip triangle orientation. This affects front/back face culling."]
+ pub const RT_INSTANCE_FLAG_FLIP_TRIANGLE_FACING: RTinstanceflags = RTinstanceflags(2);
+}
+impl RTinstanceflags {
+ #[doc = "< Disable any-hit program execution (including the no-op any-hit program"]
+ #[doc = "used when an any-hit program is not specified)."]
+ #[doc = "This may yield significantly higher performance even in cases"]
+ #[doc = "where no any-hit programs are set."]
+ #[doc = "Mutually exclusive with RT_INSTANCE_FLAG_FORCE_ANYHIT."]
+ #[doc = "If set, overrides any potentially set @ref RT_RAY_FLAG_FORCE_ANYHIT, @ref RT_RAY_FLAG_DISABLE_ANYHIT, @ref RT_GEOMETRY_FLAG_DISABLE_ANYHIT."]
+ #[doc = "Can be overridden by ray flag @ref RT_RAY_FLAG_FORCE_ANYHIT."]
+ #[doc = "Precedence: RTrayflags > RTinstanceflags > RTgeometryflags"]
+ pub const RT_INSTANCE_FLAG_DISABLE_ANYHIT: RTinstanceflags = RTinstanceflags(4);
+}
+impl RTinstanceflags {
+ #[doc = "< Force any-hit program execution."]
+ #[doc = "Mutually exclusive with RT_INSTANCE_FLAG_DISABLE_ANYHIT."]
+ #[doc = "If set, overrides any potentially set @ref RT_RAY_FLAG_FORCE_ANYHIT, @ref RT_RAY_FLAG_DISABLE_ANYHIT, @ref RT_GEOMETRY_FLAG_DISABLE_ANYHIT."]
+ #[doc = "Can be overridden by ray flag @ref RT_RAY_FLAG_DISABLE_ANYHIT."]
+ #[doc = "Overriding precedence: RTrayflags > RTinstanceflags > RTgeometryflags"]
+ pub const RT_INSTANCE_FLAG_FORCE_ANYHIT: RTinstanceflags = RTinstanceflags(8);
+}
+#[repr(transparent)]
+#[doc = " Instance flags which override the behavior of geometry."]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTinstanceflags(pub ::std::os::raw::c_uint);
+impl RTrayflags {
+ pub const RT_RAY_FLAG_NONE: RTrayflags = RTrayflags(0);
+}
+impl RTrayflags {
+ #[doc = "< Disable any-hit program execution for the ray (execution will be skipped,including the no-op any-hit program"]
+ #[doc = "used when an any-hit program is not specified)."]
+ #[doc = "Mutually exclusive with RT_RAY_FLAG_FORCE_ANYHIT."]
+ #[doc = "If set, overrides any potentially set @ref RT_INSTANCE_FLAG_FORCE_ANYHIT."]
+ #[doc = "Overriding precedence: RTrayflags > RTinstanceflags > RTgeometryflags"]
+ pub const RT_RAY_FLAG_DISABLE_ANYHIT: RTrayflags = RTrayflags(1);
+}
+impl RTrayflags {
+ #[doc = "< Force any-hit program execution for the ray. See @ref RT_RAY_FLAG_DISABLE_ANYHIT."]
+ #[doc = "Mutually exclusive with RT_RAY_FLAG_DISABLE_ANYHIT."]
+ #[doc = "If set, overrides any potentially set @ref RT_GEOMETRY_FLAG_DISABLE_ANYHIT, @ref RT_INSTANCE_FLAG_DISABLE_ANYHIT."]
+ #[doc = "Overriding precedence: RTrayflags > RTinstanceflags > RTgeometryflags"]
+ pub const RT_RAY_FLAG_FORCE_ANYHIT: RTrayflags = RTrayflags(2);
+}
+impl RTrayflags {
+ #[doc = "< Terminate the ray after the first hit, also reports the first hit as closest hit."]
+ pub const RT_RAY_FLAG_TERMINATE_ON_FIRST_HIT: RTrayflags = RTrayflags(4);
+}
+impl RTrayflags {
+ #[doc = "< Disable closest-hit program execution for the ray."]
+ pub const RT_RAY_FLAG_DISABLE_CLOSESTHIT: RTrayflags = RTrayflags(8);
+}
+impl RTrayflags {
+ #[doc = "< Do not intersect triangle back faces."]
+ pub const RT_RAY_FLAG_CULL_BACK_FACING_TRIANGLES: RTrayflags = RTrayflags(16);
+}
+impl RTrayflags {
+ #[doc = "< Do not intersect triangle front faces."]
+ pub const RT_RAY_FLAG_CULL_FRONT_FACING_TRIANGLES: RTrayflags = RTrayflags(32);
+}
+impl RTrayflags {
+ #[doc = "< Do not intersect geometry which disables any-hit programs (due to any geometry, instance, or ray flag)."]
+ pub const RT_RAY_FLAG_CULL_DISABLED_ANYHIT: RTrayflags = RTrayflags(64);
+}
+impl RTrayflags {
+ #[doc = "< Do not intersect geometry which executes any-hit programs (i.e., forced or not disabled any-hit program execution, this includes a potential no-op any-hit program)."]
+ pub const RT_RAY_FLAG_CULL_ENABLED_ANYHIT: RTrayflags = RTrayflags(128);
+}
+#[repr(transparent)]
+#[doc = " Ray flags"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTrayflags(pub ::std::os::raw::c_uint);
+pub type RTvisibilitymask = ::std::os::raw::c_uint;
+#[doc = "< Default @ref RTvisibilitymask"]
+pub const RT_VISIBILITY_ALL: _bindgen_ty_1 = _bindgen_ty_1(255);
+#[repr(transparent)]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct _bindgen_ty_1(pub ::std::os::raw::c_uint);
+impl RTbufferidnull {
+ #[doc = "< sentinel for describing a non-existent buffer id"]
+ pub const RT_BUFFER_ID_NULL: RTbufferidnull = RTbufferidnull(0);
+}
+#[repr(transparent)]
+#[doc = " Sentinel values"]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTbufferidnull(pub ::std::os::raw::c_uint);
+impl RTprogramidnull {
+ #[doc = "< sentinel for describing a non-existent program id"]
+ pub const RT_PROGRAM_ID_NULL: RTprogramidnull = RTprogramidnull(0);
+}
+#[repr(transparent)]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTprogramidnull(pub ::std::os::raw::c_uint);
+impl RTtextureidnull {
+ #[doc = "< sentinel for describing a non-existent texture id"]
+ pub const RT_TEXTURE_ID_NULL: RTtextureidnull = RTtextureidnull(0);
+}
+#[repr(transparent)]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTtextureidnull(pub ::std::os::raw::c_uint);
+impl RTcommandlistidnull {
+ #[doc = "< sentinel for describing a non-existent command list id"]
+ pub const RT_COMMAND_LIST_ID_NULL: RTcommandlistidnull = RTcommandlistidnull(0);
+}
+#[repr(transparent)]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTcommandlistidnull(pub ::std::os::raw::c_uint);
+impl RTpostprocessingstagenull {
+ #[doc = "< sentinel for describing a non-existent post-processing stage id"]
+ pub const RT_POSTPROCESSING_STAGE_ID_NULL: RTpostprocessingstagenull =
+ RTpostprocessingstagenull(0);
+}
+#[repr(transparent)]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RTpostprocessingstagenull(pub ::std::os::raw::c_uint);
+pub type RTsize = ::std::os::raw::c_ulonglong;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTacceleration_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Acceleration Structures - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTacceleration = *mut RTacceleration_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTbuffer_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Buffers - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTbuffer = *mut RTbuffer_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTcontext_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Contexts - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTcontext = *mut RTcontext_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTgeometry_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Geometry - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTgeometry = *mut RTgeometry_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTgeometrytriangles_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle GeometryTriangles - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTgeometrytriangles = *mut RTgeometrytriangles_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTgeometryinstance_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Geometry Instance - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTgeometryinstance = *mut RTgeometryinstance_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTgeometrygroup_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Geometry Group - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTgeometrygroup = *mut RTgeometrygroup_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTgroup_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Group - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTgroup = *mut RTgroup_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTmaterial_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Material - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTmaterial = *mut RTmaterial_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTprogram_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Program - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTprogram = *mut RTprogram_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTselector_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Selector - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTselector = *mut RTselector_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTtexturesampler_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Texture Sampler - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTtexturesampler = *mut RTtexturesampler_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTtransform_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Transform - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTtransform = *mut RTtransform_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTvariable_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle Variable - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTvariable = *mut RTvariable_api;
+#[doc = " Opaque type to handle Object - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+#[repr(transparent)]
+#[derive(Copy, Clone)]
+pub struct RTobject(pub *mut ::std::os::raw::c_void);
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTpostprocessingstage_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle PostprocessingStage - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTpostprocessingstage = *mut RTpostprocessingstage_api;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTcommandlist_api {
+ _unused: [u8; 0],
+}
+#[doc = " Opaque type to handle CommandList - Note that the *_api type should never be used directly."]
+#[doc = "Only the typedef target name will be guaranteed to remain unchanged"]
+pub type RTcommandlist = *mut RTcommandlist_api;
+#[doc = " Callback signature for use with rtContextSetTimeoutCallback."]
+#[doc = " Deprecated in OptiX 6.0."]
+pub type RTtimeoutcallback = ::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_int>;
+#[doc = " Callback signature for use with rtContextSetUsageReportCallback."]
+pub type RTusagereportcallback = ::std::option::Option<
+ unsafe extern "C" fn(
+ arg1: ::std::os::raw::c_int,
+ arg2: *const ::std::os::raw::c_char,
+ arg3: *const ::std::os::raw::c_char,
+ arg4: *mut ::std::os::raw::c_void,
+ ),
+>;
+extern "C" {
+ #[doc = " @brief Returns the current OptiX version"]
+ #[doc = ""]
+ #[doc = " @ingroup ContextFreeFunctions"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGetVersion returns in \\a version a numerically comparable"]
+ #[doc = " version number of the current OptiX library."]
+ #[doc = ""]
+ #[doc = " The encoding for the version number prior to OptiX 4.0.0 is major*1000 + minor*10 + micro."]
+ #[doc = " For versions 4.0.0 and higher, the encoding is major*10000 + minor*100 + micro."]
+ #[doc = " For example, for version 3.5.1 this function would return 3051, and for version 4.5.1 it would return 40501."]
+ #[doc = ""]
+ #[doc = " @param[out] version OptiX version number"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGetVersion was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtDeviceGetDeviceCount"]
+ #[doc = ""]
+ pub fn rtGetVersion(version: *mut ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Set a global attribute"]
+ #[doc = ""]
+ #[doc = " @ingroup ContextFreeFunctions"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGlobalSetAttribute sets \\a p as the value of the global attribute"]
+ #[doc = " specified by \\a attrib."]
+ #[doc = ""]
+ #[doc = " Each attribute can have a different size. The sizes are given in the following list:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_GLOBAL_ATTRIBUTE_ENABLE_RTX sizeof(int)"]
+ #[doc = ""]
+ #[doc = " @ref RT_GLOBAL_ATTRIBUTE_ENABLE_RTX sets the execution strategy used by Optix for the"]
+ #[doc = " next context to be created."]
+ #[doc = " Possible values: 0 (legacy megakernel execution strategy), 1 (RTX execution strategy)."]
+ #[doc = ""]
+ #[doc = " @param[in] attrib Attribute to set"]
+ #[doc = " @param[in] size Size of the attribute being set"]
+ #[doc = " @param[in] p Pointer to where the value of the attribute will be copied from. This must point to at least \\a size bytes of memory"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_GLOBAL_ATTRIBUTE - Can be returned if an unknown attribute was addressed."]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE - Can be returned if \\a size does not match the proper size of the attribute, or if \\a p"]
+ #[doc = " is \\a NULL"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGlobalSetAttribute was introduced in OptiX 5.1."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGlobalGetAttribute"]
+ #[doc = ""]
+ pub fn rtGlobalSetAttribute(
+ attrib: RTglobalattribute,
+ size: RTsize,
+ p: *const ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a global attribute"]
+ #[doc = ""]
+ #[doc = " @ingroup ContextFreeFunctions"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGlobalGetAttribute returns in \\a p the value of the global attribute"]
+ #[doc = " specified by \\a attrib."]
+ #[doc = ""]
+ #[doc = " Each attribute can have a different size. The sizes are given in the following list:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_GLOBAL_ATTRIBUTE_ENABLE_RTX sizeof(int)"]
+ #[doc = " - @ref RT_GLOBAL_ATTRIBUTE_DISPLAY_DRIVER_VERSION_MAJOR sizeof(unsigned int)"]
+ #[doc = " - @ref RT_GLOBAL_ATTRIBUTE_DISPLAY_DRIVER_VERSION_MINOR sizeof(unsigend int)"]
+ #[doc = ""]
+ #[doc = " @ref RT_GLOBAL_ATTRIBUTE_ENABLE_RTX is an experimental setting which sets the execution strategy"]
+ #[doc = " used by Optix for the next context to be created."]
+ #[doc = ""]
+ #[doc = " @ref RT_GLOBAL_ATTRIBUTE_DISPLAY_DRIVER_VERSION_MAJOR is an attribute to query the major version of the display driver"]
+ #[doc = " found on the system. It's the first number in the driver version displayed as xxx.yy."]
+ #[doc = ""]
+ #[doc = " @ref RT_GLOBAL_ATTRIBUTE_DISPLAY_DRIVER_VERSION_MINOR is an attribute to query the minor version of the display driver"]
+ #[doc = " found on the system. It's the second number in the driver version displayed as xxx.yy."]
+ #[doc = ""]
+ #[doc = " @param[in] attrib Attribute to query"]
+ #[doc = " @param[in] size Size of the attribute being queried. Parameter \\a p must have at least this much memory allocated"]
+ #[doc = " @param[out] p Return pointer where the value of the attribute will be copied into. This must point to at least \\a size bytes of memory"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_GLOBAL_ATTRIBUTE - Can be returned if an unknown attribute was addressed."]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE - Can be returned if \\a size does not match the proper size of the attribute, if \\a p is"]
+ #[doc = " \\a NULL, or if \\a attribute+ordinal does not correspond to an OptiX device"]
+ #[doc = " - @ref RT_ERROR_DRIVER_VERSION_FAILED - Can be returned if the display driver version could not be obtained."]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGlobalGetAttribute was introduced in OptiX 5.1."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGlobalSetAttribute,"]
+ #[doc = ""]
+ pub fn rtGlobalGetAttribute(
+ attrib: RTglobalattribute,
+ size: RTsize,
+ p: *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of OptiX capable devices"]
+ #[doc = ""]
+ #[doc = " @ingroup ContextFreeFunctions"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetDeviceCount returns in \\a count the number of compute"]
+ #[doc = " devices that are available in the host system and will be used by"]
+ #[doc = " OptiX."]
+ #[doc = ""]
+ #[doc = " @param[out] count Number devices available for OptiX"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetDeviceCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGetVersion"]
+ #[doc = ""]
+ pub fn rtDeviceGetDeviceCount(count: *mut ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns an attribute specific to an OptiX device"]
+ #[doc = ""]
+ #[doc = " @ingroup ContextFreeFunctions"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetAttribute returns in \\a p the value of the per device attribute"]
+ #[doc = " specified by \\a attrib for device \\a ordinal."]
+ #[doc = ""]
+ #[doc = " Each attribute can have a different size. The sizes are given in the following list:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK sizeof(int)"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_CLOCK_RATE sizeof(int)"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT sizeof(int)"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_EXECUTION_TIMEOUT_ENABLED sizeof(int)"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_MAX_HARDWARE_TEXTURE_COUNT sizeof(int)"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_NAME up to size-1"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY sizeof(int2)"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_TOTAL_MEMORY sizeof(RTsize)"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_TCC_DRIVER sizeof(int)"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_CUDA_DEVICE_ORDINAL sizeof(int)"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_PCI_BUS_ID up to size-1, at most 13 chars"]
+ #[doc = " - @ref RT_DEVICE_ATTRIBUTE_COMPATIBLE_DEVICES sizeof(int)*(number of devices + 1)"]
+ #[doc = ""]
+ #[doc = " For \\a RT_DEVICE_ATTRIBUTE_COMPATIBLE_DEVICES, the first \\a int returned is the number"]
+ #[doc = " of compatible device ordinals returned. A device is always compatible with itself, so"]
+ #[doc = " the count will always be at least one. Size the output buffer based on the number of"]
+ #[doc = " devices as returned by \\a rtDeviceGetDeviceCount."]
+ #[doc = ""]
+ #[doc = " @param[in] ordinal OptiX device ordinal"]
+ #[doc = " @param[in] attrib Attribute to query"]
+ #[doc = " @param[in] size Size of the attribute being queried. Parameter \\a p must have at least this much memory allocated"]
+ #[doc = " @param[out] p Return pointer where the value of the attribute will be copied into. This must point to at least \\a size bytes of memory"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE - Can be returned if size does not match the proper size of the attribute, if \\a p is"]
+ #[doc = " \\a NULL, or if \\a ordinal does not correspond to an OptiX device"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetAttribute was introduced in OptiX 2.0."]
+ #[doc = " @ref RT_DEVICE_ATTRIBUTE_TCC_DRIVER was introduced in OptiX 3.0."]
+ #[doc = " @ref RT_DEVICE_ATTRIBUTE_CUDA_DEVICE_ORDINAL was introduced in OptiX 3.0."]
+ #[doc = " @ref RT_DEVICE_ATTRIBUTE_COMPATIBLE_DEVICES was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtDeviceGetDeviceCount,"]
+ #[doc = " @ref rtContextGetAttribute"]
+ #[doc = ""]
+ pub fn rtDeviceGetAttribute(
+ ordinal: ::std::os::raw::c_int,
+ attrib: RTdeviceattribute,
+ size: RTsize,
+ p: *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @ingroup rtVariableSet Variable setters"]
+ #[doc = ""]
+ #[doc = " @brief Functions designed to modify the value of a program variable"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableSet functions modify the value of a program variable or variable array. The"]
+ #[doc = " target variable is specificed by \\a v, which should be a value returned by"]
+ #[doc = " @ref rtContextGetVariable."]
+ #[doc = ""]
+ #[doc = " The commands \\a rtVariableSet{1-2-3-4}{f-i-ui}v are used to modify the value of a"]
+ #[doc = " program variable specified by \\a v using the values passed as arguments."]
+ #[doc = " The number specified in the command should match the number of components in"]
+ #[doc = " the data type of the specified program variable (e.g., 1 for float, int,"]
+ #[doc = " unsigned int; 2 for float2, int2, uint2, etc.). The suffix \\a f indicates"]
+ #[doc = " that \\a v has floating point type, the suffix \\a i indicates that"]
+ #[doc = " \\a v has integral type, and the suffix \\a ui indicates that that"]
+ #[doc = " \\a v has unsigned integral type. The \\a v variants of this function"]
+ #[doc = " should be used to load the program variable's value from the array specified by"]
+ #[doc = " parameter \\a v. In this case, the array \\a v should contain as many elements as"]
+ #[doc = " there are program variable components."]
+ #[doc = ""]
+ #[doc = " The commands \\a rtVariableSetMatrix{2-3-4}x{2-3-4}fv are used to modify the value"]
+ #[doc = " of a program variable whose data type is a matrix. The numbers in the command"]
+ #[doc = " names are the number of rows and columns, respectively."]
+ #[doc = " For example, \\a 2x4 indicates a matrix with 2 rows and 4 columns (i.e., 8 values)."]
+ #[doc = " If \\a transpose is \\a 0, the matrix is specified in row-major order, otherwise"]
+ #[doc = " in column-major order or, equivalently, as a matrix with the number of rows and"]
+ #[doc = " columns swapped in row-major order."]
+ #[doc = ""]
+ #[doc = " If \\a v is not a valid variable, these calls have no effect and return"]
+ #[doc = " @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableSet were introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtVariableGet,"]
+ #[doc = " @ref rtVariableSet,"]
+ #[doc = " @ref rtDeclareVariable"]
+ #[doc = ""]
+ #[doc = " @{"]
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] f1 Specifies the new float value of the program variable"]
+ pub fn rtVariableSet1f(v: RTvariable, f1: f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] f1 Specifies the new float value of the program variable"]
+ #[doc = " @param[in] f2 Specifies the new float value of the program variable"]
+ pub fn rtVariableSet2f(v: RTvariable, f1: f32, f2: f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] f1 Specifies the new float value of the program variable"]
+ #[doc = " @param[in] f2 Specifies the new float value of the program variable"]
+ #[doc = " @param[in] f3 Specifies the new float value of the program variable"]
+ pub fn rtVariableSet3f(v: RTvariable, f1: f32, f2: f32, f3: f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] f1 Specifies the new float value of the program variable"]
+ #[doc = " @param[in] f2 Specifies the new float value of the program variable"]
+ #[doc = " @param[in] f3 Specifies the new float value of the program variable"]
+ #[doc = " @param[in] f4 Specifies the new float value of the program variable"]
+ pub fn rtVariableSet4f(v: RTvariable, f1: f32, f2: f32, f3: f32, f4: f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] f Array of float values to set the variable to"]
+ pub fn rtVariableSet1fv(v: RTvariable, f: *const f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] f Array of float values to set the variable to"]
+ pub fn rtVariableSet2fv(v: RTvariable, f: *const f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] f Array of float values to set the variable to"]
+ pub fn rtVariableSet3fv(v: RTvariable, f: *const f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] f Array of float values to set the variable to"]
+ pub fn rtVariableSet4fv(v: RTvariable, f: *const f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] i1 Specifies the new integer value of the program variable"]
+ pub fn rtVariableSet1i(v: RTvariable, i1: ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] i1 Specifies the new integer value of the program variable"]
+ #[doc = " @param[in] i2 Specifies the new integer value of the program variable"]
+ pub fn rtVariableSet2i(
+ v: RTvariable,
+ i1: ::std::os::raw::c_int,
+ i2: ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] i1 Specifies the new integer value of the program variable"]
+ #[doc = " @param[in] i2 Specifies the new integer value of the program variable"]
+ #[doc = " @param[in] i3 Specifies the new integer value of the program variable"]
+ pub fn rtVariableSet3i(
+ v: RTvariable,
+ i1: ::std::os::raw::c_int,
+ i2: ::std::os::raw::c_int,
+ i3: ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] i1 Specifies the new integer value of the program variable"]
+ #[doc = " @param[in] i2 Specifies the new integer value of the program variable"]
+ #[doc = " @param[in] i3 Specifies the new integer value of the program variable"]
+ #[doc = " @param[in] i4 Specifies the new integer value of the program variable"]
+ pub fn rtVariableSet4i(
+ v: RTvariable,
+ i1: ::std::os::raw::c_int,
+ i2: ::std::os::raw::c_int,
+ i3: ::std::os::raw::c_int,
+ i4: ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] i Array of integer values to set the variable to"]
+ pub fn rtVariableSet1iv(v: RTvariable, i: *const ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] i Array of integer values to set the variable to"]
+ pub fn rtVariableSet2iv(v: RTvariable, i: *const ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] i Array of integer values to set the variable to"]
+ pub fn rtVariableSet3iv(v: RTvariable, i: *const ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] i Array of integer values to set the variable to"]
+ pub fn rtVariableSet4iv(v: RTvariable, i: *const ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] u1 Specifies the new unsigned integer value of the program variable"]
+ pub fn rtVariableSet1ui(v: RTvariable, u1: ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] u1 Specifies the new unsigned integer value of the program variable"]
+ #[doc = " @param[in] u2 Specifies the new unsigned integer value of the program variable"]
+ pub fn rtVariableSet2ui(
+ v: RTvariable,
+ u1: ::std::os::raw::c_uint,
+ u2: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] u1 Specifies the new unsigned integer value of the program variable"]
+ #[doc = " @param[in] u2 Specifies the new unsigned integer value of the program variable"]
+ #[doc = " @param[in] u3 Specifies the new unsigned integer value of the program variable"]
+ pub fn rtVariableSet3ui(
+ v: RTvariable,
+ u1: ::std::os::raw::c_uint,
+ u2: ::std::os::raw::c_uint,
+ u3: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] u1 Specifies the new unsigned integer value of the program variable"]
+ #[doc = " @param[in] u2 Specifies the new unsigned integer value of the program variable"]
+ #[doc = " @param[in] u3 Specifies the new unsigned integer value of the program variable"]
+ #[doc = " @param[in] u4 Specifies the new unsigned integer value of the program variable"]
+ pub fn rtVariableSet4ui(
+ v: RTvariable,
+ u1: ::std::os::raw::c_uint,
+ u2: ::std::os::raw::c_uint,
+ u3: ::std::os::raw::c_uint,
+ u4: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] u Array of unsigned integer values to set the variable to"]
+ pub fn rtVariableSet1uiv(v: RTvariable, u: *const ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] u Array of unsigned integer values to set the variable to"]
+ pub fn rtVariableSet2uiv(v: RTvariable, u: *const ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] u Array of unsigned integer values to set the variable to"]
+ pub fn rtVariableSet3uiv(v: RTvariable, u: *const ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] u Array of unsigned integer values to set the variable to"]
+ pub fn rtVariableSet4uiv(v: RTvariable, u: *const ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ll1 Specifies the new long long value of the program variable"]
+ pub fn rtVariableSet1ll(v: RTvariable, ll1: ::std::os::raw::c_longlong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ll1 Specifies the new long long value of the program variable"]
+ #[doc = " @param[in] ll2 Specifies the new long long value of the program variable"]
+ pub fn rtVariableSet2ll(
+ v: RTvariable,
+ ll1: ::std::os::raw::c_longlong,
+ ll2: ::std::os::raw::c_longlong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ll1 Specifies the new long long value of the program variable"]
+ #[doc = " @param[in] ll2 Specifies the new long long value of the program variable"]
+ #[doc = " @param[in] ll3 Specifies the new long long value of the program variable"]
+ pub fn rtVariableSet3ll(
+ v: RTvariable,
+ ll1: ::std::os::raw::c_longlong,
+ ll2: ::std::os::raw::c_longlong,
+ ll3: ::std::os::raw::c_longlong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ll1 Specifies the new long long value of the program variable"]
+ #[doc = " @param[in] ll2 Specifies the new long long value of the program variable"]
+ #[doc = " @param[in] ll3 Specifies the new long long value of the program variable"]
+ #[doc = " @param[in] ll4 Specifies the new long long value of the program variable"]
+ pub fn rtVariableSet4ll(
+ v: RTvariable,
+ ll1: ::std::os::raw::c_longlong,
+ ll2: ::std::os::raw::c_longlong,
+ ll3: ::std::os::raw::c_longlong,
+ ll4: ::std::os::raw::c_longlong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ll Array of long long values to set the variable to"]
+ pub fn rtVariableSet1llv(v: RTvariable, ll: *const ::std::os::raw::c_longlong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ll Array of long long values to set the variable to"]
+ pub fn rtVariableSet2llv(v: RTvariable, ll: *const ::std::os::raw::c_longlong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ll Array of long long values to set the variable to"]
+ pub fn rtVariableSet3llv(v: RTvariable, ll: *const ::std::os::raw::c_longlong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ll Array of long long values to set the variable to"]
+ pub fn rtVariableSet4llv(v: RTvariable, ll: *const ::std::os::raw::c_longlong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ull1 Specifies the new unsigned long long value of the program variable"]
+ pub fn rtVariableSet1ull(v: RTvariable, ull1: ::std::os::raw::c_ulonglong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ull1 Specifies the new unsigned long long value of the program variable"]
+ #[doc = " @param[in] ull2 Specifies the new unsigned long long value of the program variable"]
+ pub fn rtVariableSet2ull(
+ v: RTvariable,
+ ull1: ::std::os::raw::c_ulonglong,
+ ull2: ::std::os::raw::c_ulonglong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ull1 Specifies the new unsigned long long value of the program variable"]
+ #[doc = " @param[in] ull2 Specifies the new unsigned long long value of the program variable"]
+ #[doc = " @param[in] ull3 Specifies the new unsigned long long value of the program variable"]
+ pub fn rtVariableSet3ull(
+ v: RTvariable,
+ ull1: ::std::os::raw::c_ulonglong,
+ ull2: ::std::os::raw::c_ulonglong,
+ ull3: ::std::os::raw::c_ulonglong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ull1 Specifies the new unsigned long long value of the program variable"]
+ #[doc = " @param[in] ull2 Specifies the new unsigned long long value of the program variable"]
+ #[doc = " @param[in] ull3 Specifies the new unsigned long long value of the program variable"]
+ #[doc = " @param[in] ull4 Specifies the new unsigned long long value of the program variable"]
+ pub fn rtVariableSet4ull(
+ v: RTvariable,
+ ull1: ::std::os::raw::c_ulonglong,
+ ull2: ::std::os::raw::c_ulonglong,
+ ull3: ::std::os::raw::c_ulonglong,
+ ull4: ::std::os::raw::c_ulonglong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ull Array of unsigned long long values to set the variable to"]
+ pub fn rtVariableSet1ullv(v: RTvariable, ull: *const ::std::os::raw::c_ulonglong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ull Array of unsigned long long values to set the variable to"]
+ pub fn rtVariableSet2ullv(v: RTvariable, ull: *const ::std::os::raw::c_ulonglong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ull Array of unsigned long long values to set the variable to"]
+ pub fn rtVariableSet3ullv(v: RTvariable, ull: *const ::std::os::raw::c_ulonglong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] ull Array of unsigned long long values to set the variable to"]
+ pub fn rtVariableSet4ullv(v: RTvariable, ull: *const ::std::os::raw::c_ulonglong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] transpose Specifies row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to set the matrix to"]
+ pub fn rtVariableSetMatrix2x2fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] transpose Specifies row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to set the matrix to"]
+ pub fn rtVariableSetMatrix2x3fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] transpose Specifies row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to set the matrix to"]
+ pub fn rtVariableSetMatrix2x4fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] transpose Specifies row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to set the matrix to"]
+ pub fn rtVariableSetMatrix3x2fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] transpose Specifies row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to set the matrix to"]
+ pub fn rtVariableSetMatrix3x3fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] transpose Specifies row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to set the matrix to"]
+ pub fn rtVariableSetMatrix3x4fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] transpose Specifies row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to set the matrix to"]
+ pub fn rtVariableSetMatrix4x2fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] transpose Specifies row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to set the matrix to"]
+ pub fn rtVariableSetMatrix4x3fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] transpose Specifies row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to set the matrix to"]
+ pub fn rtVariableSetMatrix4x4fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets a program variable value to a OptiX object"]
+ #[doc = ""]
+ #[doc = " @ingroup Variables"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableSetObject sets a program variable to an OptiX object value. The target"]
+ #[doc = " variable is specified by \\a v. The new value of the program variable is"]
+ #[doc = " specified by \\a object. The concrete type of \\a object can be one of @ref RTbuffer,"]
+ #[doc = " @ref RTtexturesampler, @ref RTgroup, @ref RTprogram, @ref RTselector, @ref"]
+ #[doc = " RTgeometrygroup, or @ref RTtransform. If \\a v is not a valid variable or \\a"]
+ #[doc = " object is not a valid OptiX object, this call has no effect and returns @ref"]
+ #[doc = " RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] v Specifies the program variable to be set"]
+ #[doc = " @param[in] object Specifies the new value of the program variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableSetObject was introduced in OptiX 1.0. The ability to bind an @ref"]
+ #[doc = " RTprogram to a variable was introduced in OptiX 3.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtVariableGetObject,"]
+ #[doc = " @ref rtContextDeclareVariable"]
+ #[doc = ""]
+ pub fn rtVariableSetObject(v: RTvariable, object: RTobject) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Defined"]
+ #[doc = ""]
+ #[doc = " @ingroup Variables"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableSetUserData modifies the value of a program variable whose data type is"]
+ #[doc = " user-defined. The value copied into the variable is defined by an arbitrary region of"]
+ #[doc = " memory, pointed to by \\a ptr. The size of the memory region is given by \\a size. The"]
+ #[doc = " target variable is specified by \\a v. If \\a v is not a valid variable,"]
+ #[doc = " this call has no effect and returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] v Specifies the program variable to be modified"]
+ #[doc = " @param[in] size Specifies the size of the new value, in bytes"]
+ #[doc = " @param[in] ptr Specifies a pointer to the new value of the program variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableSetUserData was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtVariableGetUserData,"]
+ #[doc = " @ref rtContextDeclareVariable"]
+ #[doc = ""]
+ pub fn rtVariableSetUserData(
+ v: RTvariable,
+ size: RTsize,
+ ptr: *const ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @ingroup rtVariableGet"]
+ #[doc = ""]
+ #[doc = " @brief Functions designed to modify the value of a program variable"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGet functions return the value of a program variable or variable"]
+ #[doc = " array. The target variable is specificed by \\a v."]
+ #[doc = ""]
+ #[doc = " The commands \\a rtVariableGet{1-2-3-4}{f-i-ui}v are used to query the value"]
+ #[doc = " of a program variable specified by \\a v using the pointers passed as arguments"]
+ #[doc = " as return locations for each component of the vector-typed variable. The number"]
+ #[doc = " specified in the command should match the number of components in the data type"]
+ #[doc = " of the specified program variable (e.g., 1 for float, int, unsigned int; 2 for"]
+ #[doc = " float2, int2, uint2, etc.). The suffix \\a f indicates that floating-point"]
+ #[doc = " values are expected to be returned, the suffix \\a i indicates that integer"]
+ #[doc = " values are expected, and the suffix \\a ui indicates that unsigned integer"]
+ #[doc = " values are expected, and this type should also match the data type of the"]
+ #[doc = " specified program variable. The \\a f variants of this function should be used"]
+ #[doc = " to query values for program variables defined as float, float2, float3, float4,"]
+ #[doc = " or arrays of these. The \\a i variants of this function should be used to"]
+ #[doc = " query values for program variables defined as int, int2, int3, int4, or"]
+ #[doc = " arrays of these. The \\a ui variants of this function should be used to query"]
+ #[doc = " values for program variables defined as unsigned int, uint2, uint3, uint4,"]
+ #[doc = " or arrays of these. The \\a v variants of this function should be used to"]
+ #[doc = " return the program variable's value to the array specified by parameter"]
+ #[doc = " \\a v. In this case, the array \\a v should be large enough to accommodate all"]
+ #[doc = " of the program variable's components."]
+ #[doc = ""]
+ #[doc = " The commands \\a rtVariableGetMatrix{2-3-4}x{2-3-4}fv are used to query the"]
+ #[doc = " value of a program variable whose data type is a matrix. The numbers in the"]
+ #[doc = " command names are interpreted as the dimensionality of the matrix. For example,"]
+ #[doc = " \\a 2x4 indicates a 2 x 4 matrix with 2 columns and 4 rows (i.e., 8"]
+ #[doc = " values). If \\a transpose is \\a 0, the matrix is returned in row major order,"]
+ #[doc = " otherwise in column major order."]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGet were introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtVariableSet,"]
+ #[doc = " @ref rtVariableGetType,"]
+ #[doc = " @ref rtContextDeclareVariable"]
+ #[doc = ""]
+ #[doc = " @{"]
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] f1 Float value to be returned"]
+ pub fn rtVariableGet1f(v: RTvariable, f1: *mut f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] f1 Float value to be returned"]
+ #[doc = " @param[in] f2 Float value to be returned"]
+ pub fn rtVariableGet2f(v: RTvariable, f1: *mut f32, f2: *mut f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] f1 Float value to be returned"]
+ #[doc = " @param[in] f2 Float value to be returned"]
+ #[doc = " @param[in] f3 Float value to be returned"]
+ pub fn rtVariableGet3f(v: RTvariable, f1: *mut f32, f2: *mut f32, f3: *mut f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] f1 Float value to be returned"]
+ #[doc = " @param[in] f2 Float value to be returned"]
+ #[doc = " @param[in] f3 Float value to be returned"]
+ #[doc = " @param[in] f4 Float value to be returned"]
+ pub fn rtVariableGet4f(
+ v: RTvariable,
+ f1: *mut f32,
+ f2: *mut f32,
+ f3: *mut f32,
+ f4: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] f Array of float value(s) to be returned"]
+ pub fn rtVariableGet1fv(v: RTvariable, f: *mut f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] f Array of float value(s) to be returned"]
+ pub fn rtVariableGet2fv(v: RTvariable, f: *mut f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] f Array of float value(s) to be returned"]
+ pub fn rtVariableGet3fv(v: RTvariable, f: *mut f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] f Array of float value(s) to be returned"]
+ pub fn rtVariableGet4fv(v: RTvariable, f: *mut f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] i1 Integer value to be returned"]
+ pub fn rtVariableGet1i(v: RTvariable, i1: *mut ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] i1 Integer value to be returned"]
+ #[doc = " @param[in] i2 Integer value to be returned"]
+ pub fn rtVariableGet2i(
+ v: RTvariable,
+ i1: *mut ::std::os::raw::c_int,
+ i2: *mut ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] i1 Integer value to be returned"]
+ #[doc = " @param[in] i2 Integer value to be returned"]
+ #[doc = " @param[in] i3 Integer value to be returned"]
+ pub fn rtVariableGet3i(
+ v: RTvariable,
+ i1: *mut ::std::os::raw::c_int,
+ i2: *mut ::std::os::raw::c_int,
+ i3: *mut ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] i1 Integer value to be returned"]
+ #[doc = " @param[in] i2 Integer value to be returned"]
+ #[doc = " @param[in] i3 Integer value to be returned"]
+ #[doc = " @param[in] i4 Integer value to be returned"]
+ pub fn rtVariableGet4i(
+ v: RTvariable,
+ i1: *mut ::std::os::raw::c_int,
+ i2: *mut ::std::os::raw::c_int,
+ i3: *mut ::std::os::raw::c_int,
+ i4: *mut ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] i Array of integer values to be returned"]
+ pub fn rtVariableGet1iv(v: RTvariable, i: *mut ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] i Array of integer values to be returned"]
+ pub fn rtVariableGet2iv(v: RTvariable, i: *mut ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] i Array of integer values to be returned"]
+ pub fn rtVariableGet3iv(v: RTvariable, i: *mut ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] i Array of integer values to be returned"]
+ pub fn rtVariableGet4iv(v: RTvariable, i: *mut ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u1 Unsigned integer value to be returned"]
+ pub fn rtVariableGet1ui(v: RTvariable, u1: *mut ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u1 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u2 Unsigned integer value to be returned"]
+ pub fn rtVariableGet2ui(
+ v: RTvariable,
+ u1: *mut ::std::os::raw::c_uint,
+ u2: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u1 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u2 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u3 Unsigned integer value to be returned"]
+ pub fn rtVariableGet3ui(
+ v: RTvariable,
+ u1: *mut ::std::os::raw::c_uint,
+ u2: *mut ::std::os::raw::c_uint,
+ u3: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u1 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u2 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u3 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u4 Unsigned integer value to be returned"]
+ pub fn rtVariableGet4ui(
+ v: RTvariable,
+ u1: *mut ::std::os::raw::c_uint,
+ u2: *mut ::std::os::raw::c_uint,
+ u3: *mut ::std::os::raw::c_uint,
+ u4: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u Array of unsigned integer values to be returned"]
+ pub fn rtVariableGet1uiv(v: RTvariable, u: *mut ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u Array of unsigned integer values to be returned"]
+ pub fn rtVariableGet2uiv(v: RTvariable, u: *mut ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u Array of unsigned integer values to be returned"]
+ pub fn rtVariableGet3uiv(v: RTvariable, u: *mut ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u Array of unsigned integer values to be returned"]
+ pub fn rtVariableGet4uiv(v: RTvariable, u: *mut ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ll1 Integer value to be returned"]
+ pub fn rtVariableGet1ll(v: RTvariable, ll1: *mut ::std::os::raw::c_longlong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ll1 Integer value to be returned"]
+ #[doc = " @param[in] ll2 Integer value to be returned"]
+ pub fn rtVariableGet2ll(
+ v: RTvariable,
+ ll1: *mut ::std::os::raw::c_longlong,
+ ll2: *mut ::std::os::raw::c_longlong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ll1 Integer value to be returned"]
+ #[doc = " @param[in] ll2 Integer value to be returned"]
+ #[doc = " @param[in] ll3 Integer value to be returned"]
+ pub fn rtVariableGet3ll(
+ v: RTvariable,
+ ll1: *mut ::std::os::raw::c_longlong,
+ ll2: *mut ::std::os::raw::c_longlong,
+ ll3: *mut ::std::os::raw::c_longlong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ll1 Integer value to be returned"]
+ #[doc = " @param[in] ll2 Integer value to be returned"]
+ #[doc = " @param[in] ll3 Integer value to be returned"]
+ #[doc = " @param[in] ll4 Integer value to be returned"]
+ pub fn rtVariableGet4ll(
+ v: RTvariable,
+ ll1: *mut ::std::os::raw::c_longlong,
+ ll2: *mut ::std::os::raw::c_longlong,
+ ll3: *mut ::std::os::raw::c_longlong,
+ ll4: *mut ::std::os::raw::c_longlong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ll Array of integer values to be returned"]
+ pub fn rtVariableGet1llv(v: RTvariable, ll: *mut ::std::os::raw::c_longlong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ll Array of integer values to be returned"]
+ pub fn rtVariableGet2llv(v: RTvariable, ll: *mut ::std::os::raw::c_longlong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ll Array of integer values to be returned"]
+ pub fn rtVariableGet3llv(v: RTvariable, ll: *mut ::std::os::raw::c_longlong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ll Array of integer values to be returned"]
+ pub fn rtVariableGet4llv(v: RTvariable, ll: *mut ::std::os::raw::c_longlong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u1 Unsigned integer value to be returned"]
+ pub fn rtVariableGet1ull(v: RTvariable, u1: *mut ::std::os::raw::c_ulonglong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u1 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u2 Unsigned integer value to be returned"]
+ pub fn rtVariableGet2ull(
+ v: RTvariable,
+ u1: *mut ::std::os::raw::c_ulonglong,
+ u2: *mut ::std::os::raw::c_ulonglong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u1 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u2 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u3 Unsigned integer value to be returned"]
+ pub fn rtVariableGet3ull(
+ v: RTvariable,
+ u1: *mut ::std::os::raw::c_ulonglong,
+ u2: *mut ::std::os::raw::c_ulonglong,
+ u3: *mut ::std::os::raw::c_ulonglong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] u1 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u2 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u3 Unsigned integer value to be returned"]
+ #[doc = " @param[in] u4 Unsigned integer value to be returned"]
+ pub fn rtVariableGet4ull(
+ v: RTvariable,
+ u1: *mut ::std::os::raw::c_ulonglong,
+ u2: *mut ::std::os::raw::c_ulonglong,
+ u3: *mut ::std::os::raw::c_ulonglong,
+ u4: *mut ::std::os::raw::c_ulonglong,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ull Array of unsigned integer values to be returned"]
+ pub fn rtVariableGet1ullv(v: RTvariable, ull: *mut ::std::os::raw::c_ulonglong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ull Array of unsigned integer values to be returned"]
+ pub fn rtVariableGet2ullv(v: RTvariable, ull: *mut ::std::os::raw::c_ulonglong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ull Array of unsigned integer values to be returned"]
+ pub fn rtVariableGet3ullv(v: RTvariable, ull: *mut ::std::os::raw::c_ulonglong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] ull Array of unsigned integer values to be returned"]
+ pub fn rtVariableGet4ullv(v: RTvariable, ull: *mut ::std::os::raw::c_ulonglong) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] transpose Specify(ies) row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to be returned"]
+ pub fn rtVariableGetMatrix2x2fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] transpose Specify(ies) row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to be returned"]
+ pub fn rtVariableGetMatrix2x3fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] transpose Specify(ies) row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to be returned"]
+ pub fn rtVariableGetMatrix2x4fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] transpose Specify(ies) row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to be returned"]
+ pub fn rtVariableGetMatrix3x2fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] transpose Specify(ies) row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to be returned"]
+ pub fn rtVariableGetMatrix3x3fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] transpose Specify(ies) row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to be returned"]
+ pub fn rtVariableGetMatrix3x4fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] transpose Specify(ies) row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to be returned"]
+ pub fn rtVariableGetMatrix4x2fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] transpose Specify(ies) row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to be returned"]
+ pub fn rtVariableGetMatrix4x3fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @param[in] v Specifies the program variable whose value is to be returned"]
+ #[doc = " @param[in] transpose Specify(ies) row-major or column-major order"]
+ #[doc = " @param[in] m Array of float values to be returned"]
+ pub fn rtVariableGetMatrix4x4fv(
+ v: RTvariable,
+ transpose: ::std::os::raw::c_int,
+ m: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the value of a OptiX object program variable"]
+ #[doc = ""]
+ #[doc = " @ingroup Variables"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetObject queries the value of a program variable whose data type is a"]
+ #[doc = " OptiX object. The target variable is specified by \\a v. The value of the"]
+ #[doc = " program variable is returned in \\a *object. The concrete"]
+ #[doc = " type of the program variable can be queried using @ref rtVariableGetType, and the @ref"]
+ #[doc = " RTobject handle returned by @ref rtVariableGetObject may safely be cast to an OptiX"]
+ #[doc = " handle of corresponding type. If \\a v is not a valid variable, this call sets"]
+ #[doc = " \\a *object to \\a NULL and returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] v Specifies the program variable to be queried"]
+ #[doc = " @param[out] object Returns the value of the program variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetObject was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtVariableSetObject,"]
+ #[doc = " @ref rtVariableGetType,"]
+ #[doc = " @ref rtContextDeclareVariable"]
+ #[doc = ""]
+ pub fn rtVariableGetObject(v: RTvariable, object: *mut RTobject) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Defined"]
+ #[doc = ""]
+ #[doc = " @ingroup Variables"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetUserData queries the value of a program variable whose data type is"]
+ #[doc = " user-defined. The variable of interest is specified by \\a v. The size of the"]
+ #[doc = " variable's value must match the value given by the parameter \\a size. The value of"]
+ #[doc = " the program variable is copied to the memory region pointed to by \\a ptr. The storage"]
+ #[doc = " at location \\a ptr must be large enough to accommodate all of the program variable's"]
+ #[doc = " value data. If \\a v is not a valid variable, this call has no effect and"]
+ #[doc = " returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] v Specifies the program variable to be queried"]
+ #[doc = " @param[in] size Specifies the size of the program variable, in bytes"]
+ #[doc = " @param[out] ptr Location in which to store the value of the variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetUserData was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtVariableSetUserData,"]
+ #[doc = " @ref rtContextDeclareVariable"]
+ #[doc = ""]
+ pub fn rtVariableGetUserData(
+ v: RTvariable,
+ size: RTsize,
+ ptr: *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Queries the name of a program variable"]
+ #[doc = ""]
+ #[doc = " @ingroup Variables"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Queries a program variable's name. The variable of interest is specified by \\a"]
+ #[doc = " variable, which should be a value returned by @ref rtContextDeclareVariable. A pointer"]
+ #[doc = " to the string containing the name of the variable is returned in \\a *nameReturn."]
+ #[doc = " If \\a v is not a valid variable, this"]
+ #[doc = " call sets \\a *nameReturn to \\a NULL and returns @ref RT_ERROR_INVALID_VALUE. \\a"]
+ #[doc = " *nameReturn will point to valid memory until another API function that returns a"]
+ #[doc = " string is called."]
+ #[doc = ""]
+ #[doc = " @param[in] v Specifies the program variable to be queried"]
+ #[doc = " @param[out] nameReturn Returns the program variable's name"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetName was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextDeclareVariable"]
+ #[doc = ""]
+ pub fn rtVariableGetName(
+ v: RTvariable,
+ nameReturn: *mut *const ::std::os::raw::c_char,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Queries the annotation string of a program variable"]
+ #[doc = ""]
+ #[doc = " @ingroup Variables"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetAnnotation queries a program variable's annotation string. A pointer"]
+ #[doc = " to the string containing the annotation is returned in \\a *annotationReturn."]
+ #[doc = " If \\a v is not a valid variable, this call sets"]
+ #[doc = " \\a *annotationReturn to \\a NULL and returns @ref RT_ERROR_INVALID_VALUE. \\a"]
+ #[doc = " *annotationReturn will point to valid memory until another API function that returns"]
+ #[doc = " a string is called."]
+ #[doc = ""]
+ #[doc = " @param[in] v Specifies the program variable to be queried"]
+ #[doc = " @param[out] annotationReturn Returns the program variable's annotation string"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetAnnotation was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtDeclareVariable,"]
+ #[doc = " @ref rtDeclareAnnotation"]
+ #[doc = ""]
+ pub fn rtVariableGetAnnotation(
+ v: RTvariable,
+ annotationReturn: *mut *const ::std::os::raw::c_char,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns type information about a program variable"]
+ #[doc = ""]
+ #[doc = " @ingroup Variables"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetType queries a program variable's type. The variable of interest is"]
+ #[doc = " specified by \\a v. The program variable's type enumeration is returned in \\a *typeReturn,"]
+ #[doc = " if it is not \\a NULL. It is one of the following:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_OBJECTTYPE_UNKNOWN"]
+ #[doc = " - @ref RT_OBJECTTYPE_GROUP"]
+ #[doc = " - @ref RT_OBJECTTYPE_GEOMETRY_GROUP"]
+ #[doc = " - @ref RT_OBJECTTYPE_TRANSFORM"]
+ #[doc = " - @ref RT_OBJECTTYPE_SELECTOR"]
+ #[doc = " - @ref RT_OBJECTTYPE_GEOMETRY_INSTANCE"]
+ #[doc = " - @ref RT_OBJECTTYPE_BUFFER"]
+ #[doc = " - @ref RT_OBJECTTYPE_TEXTURE_SAMPLER"]
+ #[doc = " - @ref RT_OBJECTTYPE_OBJECT"]
+ #[doc = " - @ref RT_OBJECTTYPE_MATRIX_FLOAT2x2"]
+ #[doc = " - @ref RT_OBJECTTYPE_MATRIX_FLOAT2x3"]
+ #[doc = " - @ref RT_OBJECTTYPE_MATRIX_FLOAT2x4"]
+ #[doc = " - @ref RT_OBJECTTYPE_MATRIX_FLOAT3x2"]
+ #[doc = " - @ref RT_OBJECTTYPE_MATRIX_FLOAT3x3"]
+ #[doc = " - @ref RT_OBJECTTYPE_MATRIX_FLOAT3x4"]
+ #[doc = " - @ref RT_OBJECTTYPE_MATRIX_FLOAT4x2"]
+ #[doc = " - @ref RT_OBJECTTYPE_MATRIX_FLOAT4x3"]
+ #[doc = " - @ref RT_OBJECTTYPE_MATRIX_FLOAT4x4"]
+ #[doc = " - @ref RT_OBJECTTYPE_FLOAT"]
+ #[doc = " - @ref RT_OBJECTTYPE_FLOAT2"]
+ #[doc = " - @ref RT_OBJECTTYPE_FLOAT3"]
+ #[doc = " - @ref RT_OBJECTTYPE_FLOAT4"]
+ #[doc = " - @ref RT_OBJECTTYPE_INT"]
+ #[doc = " - @ref RT_OBJECTTYPE_INT2"]
+ #[doc = " - @ref RT_OBJECTTYPE_INT3"]
+ #[doc = " - @ref RT_OBJECTTYPE_INT4"]
+ #[doc = " - @ref RT_OBJECTTYPE_UNSIGNED_INT"]
+ #[doc = " - @ref RT_OBJECTTYPE_UNSIGNED_INT2"]
+ #[doc = " - @ref RT_OBJECTTYPE_UNSIGNED_INT3"]
+ #[doc = " - @ref RT_OBJECTTYPE_UNSIGNED_INT4"]
+ #[doc = " - @ref RT_OBJECTTYPE_USER"]
+ #[doc = ""]
+ #[doc = " Sets \\a *typeReturn to @ref RT_OBJECTTYPE_UNKNOWN if \\a v is not a valid variable."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if given a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] v Specifies the program variable to be queried"]
+ #[doc = " @param[out] typeReturn Returns the type of the program variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetType was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextDeclareVariable"]
+ #[doc = ""]
+ pub fn rtVariableGetType(v: RTvariable, typeReturn: *mut RTobjecttype) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context associated with a program variable"]
+ #[doc = ""]
+ #[doc = " @ingroup Variables"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetContext queries the context associated with a program variable. The"]
+ #[doc = " target variable is specified by \\a v. The context of the program variable is"]
+ #[doc = " returned to \\a *context if the pointer \\a context is not \\a NULL. If \\a v is"]
+ #[doc = " not a valid variable, \\a *context is set to \\a NULL and @ref RT_ERROR_INVALID_VALUE is"]
+ #[doc = " returned."]
+ #[doc = ""]
+ #[doc = " @param[in] v Specifies the program variable to be queried"]
+ #[doc = " @param[out] context Returns the context associated with the program variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextDeclareVariable"]
+ #[doc = ""]
+ pub fn rtVariableGetContext(v: RTvariable, context: *mut RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Queries the size, in bytes, of a variable"]
+ #[doc = ""]
+ #[doc = " @ingroup Variables"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetSize queries a declared program variable for its size in bytes."]
+ #[doc = " This is most often used to query the size of a variable that has a user-defined type."]
+ #[doc = " Builtin types (int, float, unsigned int, etc.) may be queried, but object typed"]
+ #[doc = " variables, such as buffers, texture samplers and graph nodes, cannot be queried and"]
+ #[doc = " will return @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] v Specifies the program variable to be queried"]
+ #[doc = " @param[out] size Specifies a pointer where the size of the variable, in bytes, will be returned"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtVariableGetSize was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtVariableGetUserData,"]
+ #[doc = " @ref rtContextDeclareVariable"]
+ #[doc = ""]
+ pub fn rtVariableGetSize(v: RTvariable, size: *mut RTsize) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new context object"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextCreate allocates and returns a handle to a new context object."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if passed a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[out] context Handle to context for return value"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_NO_DEVICE"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = ""]
+ #[doc = ""]
+ pub fn rtContextCreate(context: *mut RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a context and frees all associated resources"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextDestroy frees all resources, including OptiX objects, associated with"]
+ #[doc = " this object. Returns @ref RT_ERROR_INVALID_VALUE if passed a \\a NULL context. @ref"]
+ #[doc = " RT_ERROR_LAUNCH_FAILED may be returned if a previous call to @ref rtContextLaunch \"rtContextLaunch\""]
+ #[doc = " failed."]
+ #[doc = ""]
+ #[doc = " @param[in] context Handle of the context to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_LAUNCH_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextCreate"]
+ #[doc = ""]
+ pub fn rtContextDestroy(context: RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Checks the given context for valid internal state"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextValidate checks the the given context and all of its associated OptiX"]
+ #[doc = " objects for a valid state. These checks include tests for presence of necessary"]
+ #[doc = " programs (e.g. an intersection program for a geometry node), invalid internal state"]
+ #[doc = " such as \\a NULL children in graph nodes, and presence of variables required by all"]
+ #[doc = " specified programs. @ref rtContextGetErrorString can be used to retrieve a description"]
+ #[doc = " of a validation failure."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_SOURCE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetErrorString"]
+ #[doc = ""]
+ pub fn rtContextValidate(context: RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the error string associated with a given"]
+ #[doc = " error"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetErrorString return a descriptive string given an error code. If \\a"]
+ #[doc = " context is valid and additional information is available from the last OptiX failure,"]
+ #[doc = " it will be appended to the generic error code description. \\a stringReturn will be"]
+ #[doc = " set to point to this string. The memory \\a stringReturn points to will be valid"]
+ #[doc = " until the next API call that returns a string."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context object to be queried, or \\a NULL"]
+ #[doc = " @param[in] code The error code to be converted to string"]
+ #[doc = " @param[out] stringReturn The return parameter for the error string"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetErrorString does not return a value"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetErrorString was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = ""]
+ #[doc = ""]
+ pub fn rtContextGetErrorString(
+ context: RTcontext,
+ code: RTresult,
+ stringReturn: *mut *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ #[doc = " @brief Set an attribute specific to an OptiX context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetAttribute sets \\a p as the value of the per context attribute"]
+ #[doc = " specified by \\a attrib."]
+ #[doc = ""]
+ #[doc = " Each attribute can have a different size. The sizes are given in the following list:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_CPU_NUM_THREADS sizeof(int)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_PREFER_FAST_RECOMPILES sizeof(int)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_FORCE_INLINE_USER_FUNCTIONS sizeof(int)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_DISK_CACHE_LOCATION sizeof(char*)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_DISK_CACHE_MEMORY_LIMITS sizeof(RTSize[2])"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_MAX_CONCURRENT_LAUNCHES sizeof(int)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_PREFER_WATERTIGHT_TRAVERSAL sizeof(int)"]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_CPU_NUM_THREADS sets the number of host CPU threads OptiX"]
+ #[doc = " can use for various tasks."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_PREFER_FAST_RECOMPILES is a hint about scene usage. By"]
+ #[doc = " default OptiX produces device kernels that are optimized for the current scene. Such"]
+ #[doc = " kernels generally run faster, but must be recompiled after some types of scene"]
+ #[doc = " changes, causing delays. Setting PREFER_FAST_RECOMPILES to 1 will leave out some"]
+ #[doc = " scene-specific optimizations, producing kernels that generally run slower but are less"]
+ #[doc = " sensitive to changes in the scene."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_FORCE_INLINE_USER_FUNCTIONS sets whether or not OptiX will"]
+ #[doc = " automatically inline user functions, which is the default behavior. Please see the"]
+ #[doc = " Programming Guide for more information about the benefits and limitations of disabling"]
+ #[doc = " automatic inlining."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_DISK_CACHE_LOCATION sets the location where the OptiX disk"]
+ #[doc = " cache will be created. The location must be provided as a \\a NULL-terminated"]
+ #[doc = " string. OptiX will attempt to create the directory if it does not exist. An exception"]
+ #[doc = " will be thrown if OptiX is unable to create the cache database file at the specified"]
+ #[doc = " location for any reason (e.g., the path is invalid or the directory is not writable)."]
+ #[doc = " The location of the disk cache can be overridden with the environment variable \\a"]
+ #[doc = " OPTIX_CACHE_PATH. This environment variable takes precedence over the RTcontext"]
+ #[doc = " attribute. The default location depends on the operating system:"]
+ #[doc = ""]
+ #[doc = " - Windows: %LOCALAPPDATA%\\\\NVIDIA\\\\OptixCache"]
+ #[doc = " - Linux: /var/tmp/OptixCache_\\<username\\> (or /tmp/OptixCache_\\<username\\> if the first"]
+ #[doc = " choice is not usable), the underscore and username suffix are omitted if the"]
+ #[doc = " username cannot be obtained"]
+ #[doc = " - MacOS X: /Library/Application Support/NVIDIA/OptixCache"]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_DISK_CACHE_MEMORY_LIMITS sets the low and high watermarks"]
+ #[doc = " for disk cache garbage collection. The limits must be passed in as a two-element"]
+ #[doc = " array of \\a RTsize values, with the low limit as the first element. OptiX will throw"]
+ #[doc = " an exception if either limit is non-zero and the high limit is not greater than the"]
+ #[doc = " low limit. Setting either limit to zero will disable garbage collection. Garbage"]
+ #[doc = " collection is triggered whenever the cache data size exceeds the high watermark and"]
+ #[doc = " proceeds until the size reaches the low watermark."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_MAX_CONCURRENT_LAUNCHES sets the maximum number of allowed"]
+ #[doc = " concurrent asynchronous launches per device. The actual number of launches can be less than"]
+ #[doc = " the set limit, and actual GPU scheduling may affect concurrency. This limit affects only"]
+ #[doc = " asynchronous launches. Valid values are from 1 to the maximum number of CUDA streams"]
+ #[doc = " supported by a device. Default value is 2."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_PREFER_WATERTIGHT_TRAVERSAL sets whether or not OptiX should prefer"]
+ #[doc = " to use a watertight traversal method or not. The default behaviour is preferring to use"]
+ #[doc = " watertight traversal. Note that OptiX might still choose to decide otherwise though."]
+ #[doc = " Please see the Programming Guide for more information about the different traversal methods."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context object to be modified"]
+ #[doc = " @param[in] attrib Attribute to set"]
+ #[doc = " @param[in] size Size of the attribute being set"]
+ #[doc = " @param[in] p Pointer to where the value of the attribute will be copied from. This must point to at least \\a size bytes of memory"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE - Can be returned if \\a size does not match the proper size of the attribute, or if \\a p"]
+ #[doc = " is \\a NULL"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetAttribute was introduced in OptiX 2.5."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetAttribute"]
+ #[doc = ""]
+ pub fn rtContextSetAttribute(
+ context: RTcontext,
+ attrib: RTcontextattribute,
+ size: RTsize,
+ p: *const ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns an attribute specific to an OptiX context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetAttribute returns in \\a p the value of the per context attribute"]
+ #[doc = " specified by \\a attrib."]
+ #[doc = ""]
+ #[doc = " Each attribute can have a different size. The sizes are given in the following list:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_MAX_TEXTURE_COUNT sizeof(int)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_CPU_NUM_THREADS sizeof(int)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_USED_HOST_MEMORY sizeof(RTsize)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_AVAILABLE_DEVICE_MEMORY sizeof(RTsize)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_DISK_CACHE_ENABLED sizeof(int)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_DISK_CACHE_LOCATION sizeof(char**)"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_DISK_CACHE_MEMORY_LIMITS sizeof(RTSize[2])"]
+ #[doc = " - @ref RT_CONTEXT_ATTRIBUTE_MAX_CONCURRENT_LAUNCHES sizeof(int)"]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_MAX_TEXTURE_COUNT queries the maximum number of textures"]
+ #[doc = " handled by OptiX. For OptiX versions below 2.5 this value depends on the number of"]
+ #[doc = " textures supported by CUDA."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_CPU_NUM_THREADS queries the number of host CPU threads OptiX"]
+ #[doc = " can use for various tasks."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_USED_HOST_MEMORY queries the amount of host memory allocated"]
+ #[doc = " by OptiX."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_AVAILABLE_DEVICE_MEMORY queries the amount of free device"]
+ #[doc = " memory."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_DISK_CACHE_ENABLED queries whether or not the OptiX disk"]
+ #[doc = " cache is enabled."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_DISK_CACHE_LOCATION queries the file path of the OptiX"]
+ #[doc = " disk cache."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_DISK_CACHE_MEMORY_LIMITS queries the low and high watermark values"]
+ #[doc = " for the OptiX disk cache."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_MAX_CONCURRENT_LAUNCHES queries the number of concurrent asynchronous"]
+ #[doc = " launches allowed per device."]
+ #[doc = ""]
+ #[doc = " Some attributes are used to get per device information. In contrast to @ref"]
+ #[doc = " rtDeviceGetAttribute, these attributes are determined by the context and are therefore"]
+ #[doc = " queried through the context. This is done by adding the attribute with the OptiX"]
+ #[doc = " device ordinal number when querying the attribute. The following are per device attributes."]
+ #[doc = ""]
+ #[doc = " @ref RT_CONTEXT_ATTRIBUTE_AVAILABLE_DEVICE_MEMORY"]
+ #[doc = ""]
+ #[doc = " @param[in] context The context object to be queried"]
+ #[doc = " @param[in] attrib Attribute to query"]
+ #[doc = " @param[in] size Size of the attribute being queried. Parameter \\a p must have at least this much memory allocated"]
+ #[doc = " @param[out] p Return pointer where the value of the attribute will be copied into. This must point to at least \\a size bytes of memory"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE - Can be returned if \\a size does not match the proper size of the attribute, if \\a p is"]
+ #[doc = " \\a NULL, or if \\a attribute+ordinal does not correspond to an OptiX device"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetAttribute was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetDeviceCount,"]
+ #[doc = " @ref rtContextSetAttribute,"]
+ #[doc = " @ref rtDeviceGetAttribute"]
+ #[doc = ""]
+ pub fn rtContextGetAttribute(
+ context: RTcontext,
+ attrib: RTcontextattribute,
+ size: RTsize,
+ p: *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Specify a list of hardware devices to be used by the"]
+ #[doc = " kernel"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetDevices specifies a list of hardware devices to be used during"]
+ #[doc = " execution of the subsequent trace kernels. Note that the device numbers are"]
+ #[doc = " OptiX device ordinals, which may not be the same as CUDA device ordinals."]
+ #[doc = " Use @ref rtDeviceGetAttribute with @ref RT_DEVICE_ATTRIBUTE_CUDA_DEVICE_ORDINAL to query the CUDA device"]
+ #[doc = " corresponding to a particular OptiX device."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to which the hardware list is applied"]
+ #[doc = " @param[in] count The number of devices in the list"]
+ #[doc = " @param[in] devices The list of devices"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_NO_DEVICE"]
+ #[doc = " - @ref RT_ERROR_INVALID_DEVICE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetDevices was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetDevices,"]
+ #[doc = " @ref rtContextGetDeviceCount"]
+ #[doc = ""]
+ pub fn rtContextSetDevices(
+ context: RTcontext,
+ count: ::std::os::raw::c_uint,
+ devices: *const ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Retrieve a list of hardware devices being used by the"]
+ #[doc = " kernel"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetDevices retrieves a list of hardware devices used by the context."]
+ #[doc = " Note that the device numbers are OptiX device ordinals, which may not be the same as CUDA device ordinals."]
+ #[doc = " Use @ref rtDeviceGetAttribute with @ref RT_DEVICE_ATTRIBUTE_CUDA_DEVICE_ORDINAL to query the CUDA device"]
+ #[doc = " corresponding to a particular OptiX device."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to which the hardware list is applied"]
+ #[doc = " @param[out] devices Return parameter for the list of devices. The memory must be able to hold entries"]
+ #[doc = " numbering least the number of devices as returned by @ref rtContextGetDeviceCount"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetDevices was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetDevices,"]
+ #[doc = " @ref rtContextGetDeviceCount"]
+ #[doc = ""]
+ pub fn rtContextGetDevices(context: RTcontext, devices: *mut ::std::os::raw::c_int)
+ -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query the number of devices currently being used"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetDeviceCount - Query the number of devices currently being used."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context containing the devices"]
+ #[doc = " @param[out] count Return parameter for the device count"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetDeviceCount was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetDevices,"]
+ #[doc = " @ref rtContextGetDevices"]
+ #[doc = ""]
+ pub fn rtContextGetDeviceCount(
+ context: RTcontext,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Set the stack size for a given context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetStackSize sets the stack size for the given context to"]
+ #[doc = " \\a bytes bytes. Not supported with the RTX execution strategy."]
+ #[doc = " With RTX execution strategy @ref rtContextSetMaxTraceDepth and @ref rtContextSetMaxCallableProgramDepth"]
+ #[doc = " should be used to control stack size."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if context is not valid."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be modified"]
+ #[doc = " @param[in] bytes The desired stack size in bytes"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetStackSize was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetStackSize"]
+ #[doc = ""]
+ pub fn rtContextSetStackSize(context: RTcontext, bytes: RTsize) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query the stack size for this context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetStackSize passes back the stack size associated with this context in"]
+ #[doc = " \\a bytes. Returns @ref RT_ERROR_INVALID_VALUE if passed a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be queried"]
+ #[doc = " @param[out] bytes Return parameter to store the size of the stack"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetStackSize was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetStackSize"]
+ #[doc = ""]
+ pub fn rtContextGetStackSize(context: RTcontext, bytes: *mut RTsize) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Set maximum callable program call depth for a given context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetMaxCallableProgramDepth sets the maximum call depth of a chain of callable programs"]
+ #[doc = " for the given context to \\a maxDepth. This value is only used for stack size computation."]
+ #[doc = " Only supported for RTX execution mode. Default value is 5."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if context is not valid."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be modified"]
+ #[doc = " @param[in] maxDepth The desired maximum depth"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetMaxCallableProgramDepth was introduced in OptiX 6.0"]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetMaxCallableProgramDepth"]
+ #[doc = ""]
+ pub fn rtContextSetMaxCallableProgramDepth(
+ context: RTcontext,
+ maxDepth: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query the maximum call depth for callable programs"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetMaxCallableProgramDepth passes back the maximum callable program call depth"]
+ #[doc = " associated with this context in \\a maxDepth."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if passed a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be queried"]
+ #[doc = " @param[out] maxDepth Return parameter to store the maximum callable program depth"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetMaxCallableProgramDepth was introduced in OptiX 6.0"]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetMaxCallableProgramDepth"]
+ #[doc = ""]
+ pub fn rtContextGetMaxCallableProgramDepth(
+ context: RTcontext,
+ maxDepth: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Set the maximum trace depth for a given context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetMaxTraceDepth sets the maximum trace depth for the given context to"]
+ #[doc = " \\a maxDepth. Only supported for RTX execution mode. Default value is 5. Maximum trace depth is 31."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if context is not valid."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be modified"]
+ #[doc = " @param[in] maxDepth The desired maximum depth"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetMaxTraceDepth was introduced in OptiX 6.0"]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetMaxTraceDepth"]
+ #[doc = ""]
+ pub fn rtContextSetMaxTraceDepth(
+ context: RTcontext,
+ maxDepth: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query the maximum trace depth for this context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetMaxTraceDepth passes back the maximum trace depth associated with this context in"]
+ #[doc = " \\a maxDepth. Returns @ref RT_ERROR_INVALID_VALUE if passed a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be queried"]
+ #[doc = " @param[out] maxDepth Return parameter to store the maximum trace depth"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetMaxTraceDepth was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetMaxTraceDepth"]
+ #[doc = ""]
+ pub fn rtContextGetMaxTraceDepth(
+ context: RTcontext,
+ maxDepth: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 6.0. Calling this function has no effect."]
+ pub fn rtContextSetTimeoutCallback(
+ context: RTcontext,
+ callback: RTtimeoutcallback,
+ minPollingSeconds: f64,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Set usage report callback function"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetUsageReportCallback sets an application-side callback"]
+ #[doc = " function \\a callback and a verbosity level \\a verbosity."]
+ #[doc = ""]
+ #[doc = " @ref RTusagereportcallback is defined as"]
+ #[doc = " \\a void (*RTusagereportcallback)(int, const char*, const char*, void*)."]
+ #[doc = ""]
+ #[doc = " The provided callback will be invoked with the message's verbosity level as"]
+ #[doc = " the first parameter. The second parameter is a descriptive tag string and"]
+ #[doc = " the third parameter is the message itself. The fourth parameter is a pointer"]
+ #[doc = " to user-defined data, which may be NULL. The descriptive tag will give a"]
+ #[doc = " terse message category description (eg, 'SCENE STAT'). The messages will"]
+ #[doc = " be unstructured and subject to change with subsequent releases. The"]
+ #[doc = " verbosity argument specifies the granularity of these messages."]
+ #[doc = ""]
+ #[doc = " \\a verbosity of 0 disables reporting. \\a callback is ignored in this case."]
+ #[doc = ""]
+ #[doc = " \\a verbosity of 1 enables error messages and important warnings. This"]
+ #[doc = " verbosity level can be expected to be efficient and have no significant"]
+ #[doc = " overhead."]
+ #[doc = ""]
+ #[doc = " \\a verbosity of 2 additionally enables minor warnings, performance"]
+ #[doc = " recommendations, and scene statistics at startup or recompilation"]
+ #[doc = " granularity. This level may have a performance cost."]
+ #[doc = ""]
+ #[doc = " \\a verbosity of 3 additionally enables informational messages and per-launch"]
+ #[doc = " statistics and messages."]
+ #[doc = ""]
+ #[doc = " A NULL \\a callback when verbosity is non-zero or a \\a verbosity outside of"]
+ #[doc = " [0, 3] will result in @ref RT_ERROR_INVALID_VALUE return code."]
+ #[doc = ""]
+ #[doc = " Only one report callback function can be specified at any time."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be modified"]
+ #[doc = " @param[in] callback The function to be called"]
+ #[doc = " @param[in] verbosity The verbosity of report messages"]
+ #[doc = " @param[in] cbdata Pointer to user-defined data that will be sent to the callback. Can be NULL."]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetUsageReportCallback was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = ""]
+ pub fn rtContextSetUsageReportCallback(
+ context: RTcontext,
+ callback: RTusagereportcallback,
+ verbosity: ::std::os::raw::c_int,
+ cbdata: *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Set the number of entry points for a given context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetEntryPointCount sets the number of entry points associated with"]
+ #[doc = " the given context to \\a count."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to be modified"]
+ #[doc = " @param[in] count The number of entry points to use"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetEntryPointCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetEntryPointCount"]
+ #[doc = ""]
+ pub fn rtContextSetEntryPointCount(
+ context: RTcontext,
+ count: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query the number of entry points for this"]
+ #[doc = " context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetEntryPointCount passes back the number of entry points associated"]
+ #[doc = " with this context in \\a count. Returns @ref RT_ERROR_INVALID_VALUE if"]
+ #[doc = " passed a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be queried"]
+ #[doc = " @param[out] count Return parameter for passing back the entry point count"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetEntryPointCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetEntryPointCount"]
+ #[doc = ""]
+ pub fn rtContextGetEntryPointCount(
+ context: RTcontext,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Specifies the ray generation program for"]
+ #[doc = " a given context entry point"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetRayGenerationProgram sets \\a context's ray generation program at"]
+ #[doc = " entry point \\a entryPointIndex. @ref RT_ERROR_INVALID_VALUE is returned if \\a"]
+ #[doc = " entryPointIndex is outside of the range [\\a 0, @ref rtContextGetEntryPointCount"]
+ #[doc = " \\a -1]."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to which the exception program will be added"]
+ #[doc = " @param[in] entryPointIndex The entry point the program will be associated with"]
+ #[doc = " @param[in] program The ray generation program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetRayGenerationProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetEntryPointCount,"]
+ #[doc = " @ref rtContextGetRayGenerationProgram"]
+ #[doc = ""]
+ pub fn rtContextSetRayGenerationProgram(
+ context: RTcontext,
+ entryPointIndex: ::std::os::raw::c_uint,
+ program: RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Queries the ray generation program"]
+ #[doc = " associated with the given context and entry point"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetRayGenerationProgram passes back the ray generation program"]
+ #[doc = " associated with the given context and entry point. This program is set via @ref"]
+ #[doc = " rtContextSetRayGenerationProgram. Returns @ref RT_ERROR_INVALID_VALUE if given an"]
+ #[doc = " invalid entry point index or \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node associated with the ray generation program"]
+ #[doc = " @param[in] entryPointIndex The entry point index for the desired ray generation program"]
+ #[doc = " @param[out] program Return parameter to store the ray generation program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetRayGenerationProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetRayGenerationProgram"]
+ #[doc = ""]
+ pub fn rtContextGetRayGenerationProgram(
+ context: RTcontext,
+ entryPointIndex: ::std::os::raw::c_uint,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Specifies the exception program for a given context entry point"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetExceptionProgram sets \\a context's exception program at entry point"]
+ #[doc = " \\a entryPointIndex. @ref RT_ERROR_INVALID_VALUE is returned if \\a entryPointIndex"]
+ #[doc = " is outside of the range [\\a 0, @ref rtContextGetEntryPointCount \\a -1]."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to which the exception program will be added"]
+ #[doc = " @param[in] entryPointIndex The entry point the program will be associated with"]
+ #[doc = " @param[in] program The exception program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetExceptionProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetEntryPointCount,"]
+ #[doc = " @ref rtContextGetExceptionProgram"]
+ #[doc = " @ref rtContextSetExceptionEnabled,"]
+ #[doc = " @ref rtContextGetExceptionEnabled,"]
+ #[doc = " @ref rtGetExceptionCode,"]
+ #[doc = " @ref rtThrow,"]
+ #[doc = " @ref rtPrintExceptionDetails"]
+ #[doc = ""]
+ pub fn rtContextSetExceptionProgram(
+ context: RTcontext,
+ entryPointIndex: ::std::os::raw::c_uint,
+ program: RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Queries the exception program associated with"]
+ #[doc = " the given context and entry point"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetExceptionProgram passes back the exception program associated with"]
+ #[doc = " the given context and entry point. This program is set via @ref"]
+ #[doc = " rtContextSetExceptionProgram. Returns @ref RT_ERROR_INVALID_VALUE if given an invalid"]
+ #[doc = " entry point index or \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node associated with the exception program"]
+ #[doc = " @param[in] entryPointIndex The entry point index for the desired exception program"]
+ #[doc = " @param[out] program Return parameter to store the exception program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetExceptionProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetExceptionProgram,"]
+ #[doc = " @ref rtContextSetEntryPointCount,"]
+ #[doc = " @ref rtContextSetExceptionEnabled,"]
+ #[doc = " @ref rtContextGetExceptionEnabled,"]
+ #[doc = " @ref rtGetExceptionCode,"]
+ #[doc = " @ref rtThrow,"]
+ #[doc = " @ref rtPrintExceptionDetails"]
+ #[doc = ""]
+ pub fn rtContextGetExceptionProgram(
+ context: RTcontext,
+ entryPointIndex: ::std::os::raw::c_uint,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Enable or disable an exception"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetExceptionEnabled is used to enable or disable specific exceptions."]
+ #[doc = " If an exception is enabled, the exception condition is checked for at runtime, and the"]
+ #[doc = " exception program is invoked if the condition is met. The exception program can query"]
+ #[doc = " the type of the caught exception by calling @ref rtGetExceptionCode."]
+ #[doc = " \\a exception may take one of the following values:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_EXCEPTION_PAYLOAD_ACCESS_OUT_OF_BOUNDS"]
+ #[doc = " - @ref RT_EXCEPTION_USER_EXCEPTION_CODE_OUT_OF_BOUNDS"]
+ #[doc = " - @ref RT_EXCEPTION_TRACE_DEPTH_EXCEEDED"]
+ #[doc = " - @ref RT_EXCEPTION_TEXTURE_ID_INVALID"]
+ #[doc = " - @ref RT_EXCEPTION_BUFFER_ID_INVALID"]
+ #[doc = " - @ref RT_EXCEPTION_INDEX_OUT_OF_BOUNDS"]
+ #[doc = " - @ref RT_EXCEPTION_STACK_OVERFLOW"]
+ #[doc = " - @ref RT_EXCEPTION_BUFFER_INDEX_OUT_OF_BOUNDS"]
+ #[doc = " - @ref RT_EXCEPTION_INVALID_RAY"]
+ #[doc = " - @ref RT_EXCEPTION_INTERNAL_ERROR"]
+ #[doc = " - @ref RT_EXCEPTION_USER"]
+ #[doc = " - @ref RT_EXCEPTION_ALL"]
+ #[doc = ""]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_PAYLOAD_ACCESS_OUT_OF_BOUNDS verifies that accesses to the ray payload are"]
+ #[doc = " within valid bounds. This exception is only supported with the RTX execution strategy."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_USER_EXCEPTION_CODE_OUT_OF_BOUNDS verifies that the exception code passed"]
+ #[doc = " to @ref rtThrow is within the valid range from RT_EXCEPTION_USER to RT_EXCEPTION_USER_MAX."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_TRACE_DEPTH_EXCEEDED verifies that the depth of the @ref rtTrace"]
+ #[doc = " tree does not exceed the configured trace depth (see @ref rtContextSetMaxTraceDepth). This"]
+ #[doc = " exception is only supported with the RTX execution strategy."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_TEXTURE_ID_INVALID verifies that every access of a texture id is"]
+ #[doc = " valid, including use of RT_TEXTURE_ID_NULL and IDs out of bounds."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_BUFFER_ID_INVALID verifies that every access of a buffer id is"]
+ #[doc = " valid, including use of RT_BUFFER_ID_NULL and IDs out of bounds."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_INDEX_OUT_OF_BOUNDS checks that @ref rtIntersectChild and @ref"]
+ #[doc = " rtReportIntersection are called with a valid index."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_STACK_OVERFLOW checks the runtime stack against overflow. The most common"]
+ #[doc = " cause for an overflow is a too small trace depth (see @ref rtContextSetMaxTraceDepth). In rare"]
+ #[doc = " cases, stack overflows might not be detected unless @ref RT_EXCEPTION_TRACE_DEPTH_EXCEEDED is"]
+ #[doc = " enabled as well."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_BUFFER_INDEX_OUT_OF_BOUNDS checks every read and write access to"]
+ #[doc = " @ref rtBuffer objects to be within valid bounds. This exception is supported with the RTX"]
+ #[doc = " execution strategy only."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_INVALID_RAY checks the each ray's origin and direction values"]
+ #[doc = " against \\a NaNs and \\a infinity values."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_INTERNAL_ERROR indicates an unexpected internal error in the"]
+ #[doc = " runtime."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_USER is used to enable or disable all user-defined exceptions. See"]
+ #[doc = " @ref rtThrow for more information."]
+ #[doc = ""]
+ #[doc = " @ref RT_EXCEPTION_ALL is a placeholder value which can be used to enable or disable"]
+ #[doc = " all possible exceptions with a single call to @ref rtContextSetExceptionEnabled."]
+ #[doc = ""]
+ #[doc = " By default, @ref RT_EXCEPTION_STACK_OVERFLOW is enabled and all other exceptions are"]
+ #[doc = " disabled."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context for which the exception is to be enabled or disabled"]
+ #[doc = " @param[in] exception The exception which is to be enabled or disabled"]
+ #[doc = " @param[in] enabled Nonzero to enable the exception, \\a 0 to disable the exception"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetExceptionEnabled was introduced in OptiX 1.1."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetExceptionEnabled,"]
+ #[doc = " @ref rtContextSetExceptionProgram,"]
+ #[doc = " @ref rtContextGetExceptionProgram,"]
+ #[doc = " @ref rtGetExceptionCode,"]
+ #[doc = " @ref rtThrow,"]
+ #[doc = " @ref rtPrintExceptionDetails,"]
+ #[doc = " @ref RTexception"]
+ #[doc = ""]
+ pub fn rtContextSetExceptionEnabled(
+ context: RTcontext,
+ exception: RTexception,
+ enabled: ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query whether a specified exception is enabled"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetExceptionEnabled passes back \\a 1 in \\a *enabled if the given exception is"]
+ #[doc = " enabled, \\a 0 otherwise. \\a exception specifies the type of exception to be queried. For a list"]
+ #[doc = " of available types, see @ref rtContextSetExceptionEnabled. If \\a exception"]
+ #[doc = " is @ref RT_EXCEPTION_ALL, \\a enabled is set to \\a 1 only if all possible"]
+ #[doc = " exceptions are enabled."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to be queried"]
+ #[doc = " @param[in] exception The exception of which to query the state"]
+ #[doc = " @param[out] enabled Return parameter to store whether the exception is enabled"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetExceptionEnabled was introduced in OptiX 1.1."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetExceptionEnabled,"]
+ #[doc = " @ref rtContextSetExceptionProgram,"]
+ #[doc = " @ref rtContextGetExceptionProgram,"]
+ #[doc = " @ref rtGetExceptionCode,"]
+ #[doc = " @ref rtThrow,"]
+ #[doc = " @ref rtPrintExceptionDetails,"]
+ #[doc = " @ref RTexception"]
+ #[doc = ""]
+ pub fn rtContextGetExceptionEnabled(
+ context: RTcontext,
+ exception: RTexception,
+ enabled: *mut ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the number of ray types for a given context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetRayTypeCount Sets the number of ray types associated with the given"]
+ #[doc = " context."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node"]
+ #[doc = " @param[in] rayTypeCount The number of ray types to be used"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetRayTypeCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetRayTypeCount"]
+ #[doc = ""]
+ pub fn rtContextSetRayTypeCount(
+ context: RTcontext,
+ rayTypeCount: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query the number of ray types associated with this"]
+ #[doc = " context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetRayTypeCount passes back the number of entry points associated with"]
+ #[doc = " this context in \\a rayTypeCount. Returns @ref RT_ERROR_INVALID_VALUE if passed a \\a"]
+ #[doc = " NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be queried"]
+ #[doc = " @param[out] rayTypeCount Return parameter to store the number of ray types"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetRayTypeCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetRayTypeCount"]
+ #[doc = ""]
+ pub fn rtContextGetRayTypeCount(
+ context: RTcontext,
+ rayTypeCount: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Specifies the miss program for a given context ray type"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetMissProgram sets \\a context's miss program associated with ray type"]
+ #[doc = " \\a rayTypeIndex. @ref RT_ERROR_INVALID_VALUE is returned if \\a rayTypeIndex"]
+ #[doc = " is outside of the range [\\a 0, @ref rtContextGetRayTypeCount \\a -1]."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to which the miss program will be added"]
+ #[doc = " @param[in] rayTypeIndex The ray type the program will be associated with"]
+ #[doc = " @param[in] program The miss program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetMissProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetRayTypeCount,"]
+ #[doc = " @ref rtContextGetMissProgram"]
+ #[doc = ""]
+ pub fn rtContextSetMissProgram(
+ context: RTcontext,
+ rayTypeIndex: ::std::os::raw::c_uint,
+ program: RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Queries the miss program associated with the given"]
+ #[doc = " context and ray type"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetMissProgram passes back the miss program associated with the"]
+ #[doc = " given context and ray type. This program is set via @ref rtContextSetMissProgram."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if given an invalid ray type index or a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node associated with the miss program"]
+ #[doc = " @param[in] rayTypeIndex The ray type index for the desired miss program"]
+ #[doc = " @param[out] program Return parameter to store the miss program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetMissProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetMissProgram,"]
+ #[doc = " @ref rtContextGetRayTypeCount"]
+ #[doc = ""]
+ pub fn rtContextGetMissProgram(
+ context: RTcontext,
+ rayTypeIndex: ::std::os::raw::c_uint,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets an RTtexturesampler corresponding to the texture id"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetTextureSamplerFromId returns a handle to the texture sampler in \\a *sampler"]
+ #[doc = " corresponding to the \\a samplerId supplied. If \\a samplerId does not map to a valid"]
+ #[doc = " texture handle, \\a *sampler is \\a NULL or if \\a context is invalid, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context the sampler should be originated from"]
+ #[doc = " @param[in] samplerId The ID of the sampler to query"]
+ #[doc = " @param[out] sampler The return handle for the sampler object corresponding to the samplerId"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetTextureSamplerFromId was introduced in OptiX 3.5."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerGetId"]
+ #[doc = ""]
+ pub fn rtContextGetTextureSamplerFromId(
+ context: RTcontext,
+ samplerId: ::std::os::raw::c_int,
+ sampler: *mut RTtexturesampler,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 4.0. Calling this function has no effect. The kernel is automatically compiled at launch if needed."]
+ #[doc = ""]
+ pub fn rtContextCompile(context: RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Executes the computation kernel for a given context"]
+ #[doc = ""]
+ #[doc = " @ingroup rtContextLaunch"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextLaunch \"rtContextLaunch\" functions execute the computation kernel associated with the"]
+ #[doc = " given context. If the context has not yet been compiled, or if the context has been"]
+ #[doc = " modified since the last compile, @ref rtContextLaunch \"rtContextLaunch\" will recompile the kernel"]
+ #[doc = " internally. Acceleration structures of the context which are marked dirty will be"]
+ #[doc = " updated and their dirty flags will be cleared. Similarly, validation will occur if"]
+ #[doc = " necessary. The ray generation program specified by \\a entryPointIndex will be"]
+ #[doc = " invoked once for every element (pixel or voxel) of the computation grid specified by"]
+ #[doc = " \\a width, \\a height, and \\a depth."]
+ #[doc = ""]
+ #[doc = " For 3D launches, the product of \\a width and \\a depth must be smaller than 4294967296 (2^32)."]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_INVALID_SOURCE"]
+ #[doc = " - @ref RT_ERROR_LAUNCH_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextLaunch \"rtContextLaunch\" was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetRunningState,"]
+ #[doc = " @ref rtContextValidate"]
+ #[doc = ""]
+ #[doc = " @ingroup rtContextLaunch"]
+ #[doc = " @param[in] context The context to be executed"]
+ #[doc = " @param[in] entryPointIndex The initial entry point into kernel"]
+ #[doc = " @param[in] width Width of the computation grid"]
+ pub fn rtContextLaunch1D(
+ context: RTcontext,
+ entryPointIndex: ::std::os::raw::c_uint,
+ width: RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @ingroup rtContextLaunch"]
+ #[doc = " @param[in] context The context to be executed"]
+ #[doc = " @param[in] entryPointIndex The initial entry point into kernel"]
+ #[doc = " @param[in] width Width of the computation grid"]
+ #[doc = " @param[in] height Height of the computation grid"]
+ pub fn rtContextLaunch2D(
+ context: RTcontext,
+ entryPointIndex: ::std::os::raw::c_uint,
+ width: RTsize,
+ height: RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @ingroup rtContextLaunch"]
+ #[doc = " @param[in] context The context to be executed"]
+ #[doc = " @param[in] entryPointIndex The initial entry point into kernel"]
+ #[doc = " @param[in] width Width of the computation grid"]
+ #[doc = " @param[in] height Height of the computation grid"]
+ #[doc = " @param[in] depth Depth of the computation grid"]
+ pub fn rtContextLaunch3D(
+ context: RTcontext,
+ entryPointIndex: ::std::os::raw::c_uint,
+ width: RTsize,
+ height: RTsize,
+ depth: RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query whether the given context is currently"]
+ #[doc = " running"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " This function is currently unimplemented and it is provided as a placeholder for a future implementation."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be queried"]
+ #[doc = " @param[out] running Return parameter to store the running state"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Since unimplemented, this function will always throw an assertion failure."]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetRunningState was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextLaunch1D,"]
+ #[doc = " @ref rtContextLaunch2D,"]
+ #[doc = " @ref rtContextLaunch3D"]
+ #[doc = ""]
+ pub fn rtContextGetRunningState(
+ context: RTcontext,
+ running: *mut ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Executes a Progressive Launch for a given context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Starts the (potentially parallel) generation of subframes for progressive rendering. If"]
+ #[doc = " \\a maxSubframes is zero, there is no limit on the number of subframes generated. The"]
+ #[doc = " generated subframes are automatically composited into a single result and streamed to"]
+ #[doc = " the client at regular intervals, where they can be read by mapping an associated stream"]
+ #[doc = " buffer. An application can therefore initiate a progressive launch, and then repeatedly"]
+ #[doc = " map and display the contents of the stream buffer in order to visualize the progressive"]
+ #[doc = " refinement of the image."]
+ #[doc = ""]
+ #[doc = " The call is nonblocking. A polling approach should be used to decide when to map and"]
+ #[doc = " display the stream buffer contents (see @ref rtBufferGetProgressiveUpdateReady). If a"]
+ #[doc = " progressive launch is already in progress at the time of the call and its parameters"]
+ #[doc = " match the initial launch, the call has no effect. Otherwise, the accumulated result will be"]
+ #[doc = " reset and a new progressive launch will be started."]
+ #[doc = ""]
+ #[doc = " If any other OptiX function is called while a progressive launch is in progress, it will"]
+ #[doc = " cause the launch to stop generating new subframes (however, subframes that have"]
+ #[doc = " already been generated and are currently in flight may still arrive at the client). The only"]
+ #[doc = " exceptions to this rule are the operations to map a stream buffer, issuing another"]
+ #[doc = " progressive launch with unchanged parameters, and polling for an update. Those"]
+ #[doc = " exceptions do not cause the progressive launch to stop generating subframes."]
+ #[doc = ""]
+ #[doc = " There is no guarantee that the call actually produces any subframes, especially if"]
+ #[doc = " @ref rtContextLaunchProgressive2D and other OptiX commands are called in short"]
+ #[doc = " succession. For example, during an animation, @ref rtVariableSet calls may be tightly"]
+ #[doc = " interleaved with progressive launches, and when rendering remotely the server may decide to skip some of the"]
+ #[doc = " launches in order to avoid a large backlog in the command pipeline."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context in which the launch is to be executed"]
+ #[doc = " @param[in] entryIndex The initial entry point into kernel"]
+ #[doc = " @param[in] width Width of the computation grid"]
+ #[doc = " @param[in] height Height of the computation grid"]
+ #[doc = " @param[in] maxSubframes The maximum number of subframes to be generated. Set to zero to generate an unlimited number of subframes"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_LAUNCH_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextLaunchProgressive2D was introduced in OptiX 3.8."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextStopProgressive"]
+ #[doc = " @ref rtBufferGetProgressiveUpdateReady"]
+ #[doc = ""]
+ pub fn rtContextLaunchProgressive2D(
+ context: RTcontext,
+ entryIndex: ::std::os::raw::c_uint,
+ width: RTsize,
+ height: RTsize,
+ maxSubframes: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Stops a Progressive Launch"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " If a progressive launch is currently in progress, calling @ref rtContextStopProgressive"]
+ #[doc = " terminates it. Otherwise, the call has no effect. If a launch is stopped using this function,"]
+ #[doc = " no further subframes will arrive at the client, even if they have already been generated"]
+ #[doc = " by the server and are currently in flight."]
+ #[doc = ""]
+ #[doc = " This call should only be used if the application must guarantee that frames generated by"]
+ #[doc = " previous progressive launches won't be accessed. Do not call @ref rtContextStopProgressive in"]
+ #[doc = " the main rendering loop if the goal is only to change OptiX state (e.g. rtVariable values)."]
+ #[doc = " The call is unnecessary in that case and will degrade performance."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context associated with the progressive launch"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextStopProgressive was introduced in OptiX 3.8."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextLaunchProgressive2D"]
+ #[doc = ""]
+ pub fn rtContextStopProgressive(context: RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Enable or disable text printing from programs"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetPrintEnabled is used to control whether text printing in programs"]
+ #[doc = " through @ref rtPrintf is currently enabled for this context."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context for which printing is to be enabled or disabled"]
+ #[doc = " @param[in] enabled Setting this parameter to a nonzero value enables printing, \\a 0 disables printing"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetPrintEnabled was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPrintf,"]
+ #[doc = " @ref rtContextGetPrintEnabled,"]
+ #[doc = " @ref rtContextSetPrintBufferSize,"]
+ #[doc = " @ref rtContextGetPrintBufferSize,"]
+ #[doc = " @ref rtContextSetPrintLaunchIndex,"]
+ #[doc = " @ref rtContextGetPrintLaunchIndex"]
+ #[doc = ""]
+ pub fn rtContextSetPrintEnabled(context: RTcontext, enabled: ::std::os::raw::c_int)
+ -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query whether text printing from programs"]
+ #[doc = " is enabled"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetPrintEnabled passes back \\a 1 if text printing from programs through"]
+ #[doc = " @ref rtPrintf is currently enabled for this context; \\a 0 otherwise. Returns @ref"]
+ #[doc = " RT_ERROR_INVALID_VALUE if passed a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to be queried"]
+ #[doc = " @param[out] enabled Return parameter to store whether printing is enabled"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetPrintEnabled was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPrintf,"]
+ #[doc = " @ref rtContextSetPrintEnabled,"]
+ #[doc = " @ref rtContextSetPrintBufferSize,"]
+ #[doc = " @ref rtContextGetPrintBufferSize,"]
+ #[doc = " @ref rtContextSetPrintLaunchIndex,"]
+ #[doc = " @ref rtContextGetPrintLaunchIndex"]
+ #[doc = ""]
+ pub fn rtContextGetPrintEnabled(
+ context: RTcontext,
+ enabled: *mut ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Set the size of the print buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetPrintBufferSize is used to set the buffer size available to hold"]
+ #[doc = " data generated by @ref rtPrintf."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if it is called after the first invocation of rtContextLaunch."]
+ #[doc = ""]
+ #[doc = ""]
+ #[doc = " @param[in] context The context for which to set the print buffer size"]
+ #[doc = " @param[in] bufferSizeBytes The print buffer size in bytes"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetPrintBufferSize was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPrintf,"]
+ #[doc = " @ref rtContextSetPrintEnabled,"]
+ #[doc = " @ref rtContextGetPrintEnabled,"]
+ #[doc = " @ref rtContextGetPrintBufferSize,"]
+ #[doc = " @ref rtContextSetPrintLaunchIndex,"]
+ #[doc = " @ref rtContextGetPrintLaunchIndex"]
+ #[doc = ""]
+ pub fn rtContextSetPrintBufferSize(context: RTcontext, bufferSizeBytes: RTsize) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Get the current size of the print buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetPrintBufferSize is used to query the buffer size available to hold"]
+ #[doc = " data generated by @ref rtPrintf. Returns @ref RT_ERROR_INVALID_VALUE if passed a \\a"]
+ #[doc = " NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context from which to query the print buffer size"]
+ #[doc = " @param[out] bufferSizeBytes The returned print buffer size in bytes"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetPrintBufferSize was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPrintf,"]
+ #[doc = " @ref rtContextSetPrintEnabled,"]
+ #[doc = " @ref rtContextGetPrintEnabled,"]
+ #[doc = " @ref rtContextSetPrintBufferSize,"]
+ #[doc = " @ref rtContextSetPrintLaunchIndex,"]
+ #[doc = " @ref rtContextGetPrintLaunchIndex"]
+ #[doc = ""]
+ pub fn rtContextGetPrintBufferSize(
+ context: RTcontext,
+ bufferSizeBytes: *mut RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the active launch index to limit text output"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetPrintLaunchIndex is used to control for which launch indices @ref"]
+ #[doc = " rtPrintf generates output. The initial value of (x,y,z) is (\\a -1,\\a -1,\\a -1), which"]
+ #[doc = " generates output for all indices."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context for which to set the print launch index"]
+ #[doc = " @param[in] x The launch index in the x dimension to which to limit the output of @ref rtPrintf invocations."]
+ #[doc = " If set to \\a -1, output is generated for all launch indices in the x dimension"]
+ #[doc = " @param[in] y The launch index in the y dimension to which to limit the output of @ref rtPrintf invocations."]
+ #[doc = " If set to \\a -1, output is generated for all launch indices in the y dimension"]
+ #[doc = " @param[in] z The launch index in the z dimension to which to limit the output of @ref rtPrintf invocations."]
+ #[doc = " If set to \\a -1, output is generated for all launch indices in the z dimension"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetPrintLaunchIndex was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPrintf,"]
+ #[doc = " @ref rtContextGetPrintEnabled,"]
+ #[doc = " @ref rtContextSetPrintEnabled,"]
+ #[doc = " @ref rtContextSetPrintBufferSize,"]
+ #[doc = " @ref rtContextGetPrintBufferSize,"]
+ #[doc = " @ref rtContextGetPrintLaunchIndex"]
+ #[doc = ""]
+ pub fn rtContextSetPrintLaunchIndex(
+ context: RTcontext,
+ x: ::std::os::raw::c_int,
+ y: ::std::os::raw::c_int,
+ z: ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the active print launch index"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetPrintLaunchIndex is used to query for which launch indices @ref"]
+ #[doc = " rtPrintf generates output. The initial value of (x,y,z) is (\\a -1,\\a -1,\\a -1), which"]
+ #[doc = " generates output for all indices."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context from which to query the print launch index"]
+ #[doc = " @param[out] x Returns the launch index in the x dimension to which the output of @ref rtPrintf invocations"]
+ #[doc = " is limited. Will not be written to if a \\a NULL pointer is passed"]
+ #[doc = " @param[out] y Returns the launch index in the y dimension to which the output of @ref rtPrintf invocations"]
+ #[doc = " is limited. Will not be written to if a \\a NULL pointer is passed"]
+ #[doc = " @param[out] z Returns the launch index in the z dimension to which the output of @ref rtPrintf invocations"]
+ #[doc = " is limited. Will not be written to if a \\a NULL pointer is passed"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetPrintLaunchIndex was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPrintf,"]
+ #[doc = " @ref rtContextGetPrintEnabled,"]
+ #[doc = " @ref rtContextSetPrintEnabled,"]
+ #[doc = " @ref rtContextSetPrintBufferSize,"]
+ #[doc = " @ref rtContextGetPrintBufferSize,"]
+ #[doc = " @ref rtContextSetPrintLaunchIndex"]
+ #[doc = ""]
+ pub fn rtContextGetPrintLaunchIndex(
+ context: RTcontext,
+ x: *mut ::std::os::raw::c_int,
+ y: *mut ::std::os::raw::c_int,
+ z: *mut ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a new named variable associated with this"]
+ #[doc = " context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextDeclareVariable - Declares a new variable named \\a name and associated"]
+ #[doc = " with this context. Only a single variable of a given name can exist for a given"]
+ #[doc = " context and any attempt to create multiple variables with the same name will cause a"]
+ #[doc = " failure with a return value of @ref RT_ERROR_VARIABLE_REDECLARED. Returns @ref"]
+ #[doc = " RT_ERROR_INVALID_VALUE if passed a \\a NULL pointer. Return @ref"]
+ #[doc = " RT_ERROR_ILLEGAL_SYMBOL if \\a name is not syntactically valid."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to which the variable will be attached"]
+ #[doc = " @param[in] name The name that identifies the variable to be queried"]
+ #[doc = " @param[out] v Pointer to variable handle used to return the new object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_REDECLARED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextDeclareVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryDeclareVariable,"]
+ #[doc = " @ref rtGeometryInstanceDeclareVariable,"]
+ #[doc = " @ref rtMaterialDeclareVariable,"]
+ #[doc = " @ref rtProgramDeclareVariable,"]
+ #[doc = " @ref rtSelectorDeclareVariable,"]
+ #[doc = " @ref rtContextGetVariable,"]
+ #[doc = " @ref rtContextGetVariableCount,"]
+ #[doc = " @ref rtContextQueryVariable,"]
+ #[doc = " @ref rtContextRemoveVariable"]
+ #[doc = ""]
+ pub fn rtContextDeclareVariable(
+ context: RTcontext,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a named variable associated with this context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextQueryVariable queries a variable identified by the string \\a name"]
+ #[doc = " from \\a context and stores the result in \\a *v. A variable must"]
+ #[doc = " be declared with @ref rtContextDeclareVariable before it can be queried, otherwise \\a *v will be set to \\a NULL."]
+ #[doc = " @ref RT_ERROR_INVALID_VALUE will be returned if \\a name or \\a v is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to query a variable from"]
+ #[doc = " @param[in] name The name that identifies the variable to be queried"]
+ #[doc = " @param[out] v Return value to store the queried variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextQueryVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryQueryVariable,"]
+ #[doc = " @ref rtGeometryInstanceQueryVariable,"]
+ #[doc = " @ref rtMaterialQueryVariable,"]
+ #[doc = " @ref rtProgramQueryVariable,"]
+ #[doc = " @ref rtSelectorQueryVariable,"]
+ #[doc = " @ref rtContextDeclareVariable,"]
+ #[doc = " @ref rtContextGetVariableCount,"]
+ #[doc = " @ref rtContextGetVariable,"]
+ #[doc = " @ref rtContextRemoveVariable"]
+ #[doc = ""]
+ pub fn rtContextQueryVariable(
+ context: RTcontext,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Removes a variable from the given context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextRemoveVariable removes variable \\a v from \\a context if present."]
+ #[doc = " Returns @ref RT_ERROR_VARIABLE_NOT_FOUND if the variable is not attached to this"]
+ #[doc = " context. Returns @ref RT_ERROR_INVALID_VALUE if passed an invalid variable."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node from which to remove a variable"]
+ #[doc = " @param[in] v The variable to be removed"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextRemoveVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryRemoveVariable,"]
+ #[doc = " @ref rtGeometryInstanceRemoveVariable,"]
+ #[doc = " @ref rtMaterialRemoveVariable,"]
+ #[doc = " @ref rtProgramRemoveVariable,"]
+ #[doc = " @ref rtSelectorRemoveVariable,"]
+ #[doc = " @ref rtContextDeclareVariable,"]
+ #[doc = " @ref rtContextGetVariable,"]
+ #[doc = " @ref rtContextGetVariableCount,"]
+ #[doc = " @ref rtContextQueryVariable,"]
+ #[doc = ""]
+ pub fn rtContextRemoveVariable(context: RTcontext, v: RTvariable) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of variables associated"]
+ #[doc = " with this context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetVariableCount returns the number of variables that are currently"]
+ #[doc = " attached to \\a context. Returns @ref RT_ERROR_INVALID_VALUE if passed a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to be queried for number of attached variables"]
+ #[doc = " @param[out] count Return parameter to store the number of variables"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetVariableCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetVariableCount,"]
+ #[doc = " @ref rtGeometryInstanceGetVariableCount,"]
+ #[doc = " @ref rtMaterialGetVariableCount,"]
+ #[doc = " @ref rtProgramGetVariableCount,"]
+ #[doc = " @ref rtSelectorGetVariable,"]
+ #[doc = " @ref rtContextDeclareVariable,"]
+ #[doc = " @ref rtContextGetVariable,"]
+ #[doc = " @ref rtContextQueryVariable,"]
+ #[doc = " @ref rtContextRemoveVariable"]
+ #[doc = ""]
+ pub fn rtContextGetVariableCount(
+ context: RTcontext,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Queries an indexed variable associated with this context"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetVariable queries the variable at position \\a index in the"]
+ #[doc = " variable array from \\a context and stores the result in the parameter \\a v."]
+ #[doc = " A variable must be declared first with @ref rtContextDeclareVariable and"]
+ #[doc = " \\a index must be in the range [\\a 0, @ref rtContextGetVariableCount \\a -1]."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context node to be queried for an indexed variable"]
+ #[doc = " @param[in] index The index that identifies the variable to be queried"]
+ #[doc = " @param[out] v Return value to store the queried variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetVariable,"]
+ #[doc = " @ref rtGeometryInstanceGetVariable,"]
+ #[doc = " @ref rtMaterialGetVariable,"]
+ #[doc = " @ref rtProgramGetVariable,"]
+ #[doc = " @ref rtSelectorGetVariable,"]
+ #[doc = " @ref rtContextDeclareVariable,"]
+ #[doc = " @ref rtContextGetVariableCount,"]
+ #[doc = " @ref rtContextQueryVariable,"]
+ #[doc = " @ref rtContextRemoveVariable"]
+ #[doc = ""]
+ pub fn rtContextGetVariable(
+ context: RTcontext,
+ index: ::std::os::raw::c_uint,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new program object"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramCreateFromPTXString allocates and returns a handle to a new program"]
+ #[doc = " object. The program is created from PTX code held in the \\a NULL-terminated string \\a"]
+ #[doc = " ptx from function \\a programName."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the program in"]
+ #[doc = " @param[in] ptx The string containing the PTX code"]
+ #[doc = " @param[in] programName The name of the PTX function to create the program from"]
+ #[doc = " @param[in] program Handle to the program to be created"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_INVALID_SOURCE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramCreateFromPTXString was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref RT_PROGRAM,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramCreateFromPTXFiles,"]
+ #[doc = " @ref rtProgramCreateFromPTXStrings,"]
+ #[doc = " @ref rtProgramDestroy"]
+ #[doc = ""]
+ pub fn rtProgramCreateFromPTXString(
+ context: RTcontext,
+ ptx: *const ::std::os::raw::c_char,
+ programName: *const ::std::os::raw::c_char,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new program object"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramCreateFromPTXStrings allocates and returns a handle to a new program"]
+ #[doc = " object. The program is created by linking PTX code held in one or more \\a NULL-terminated strings."]
+ #[doc = " C-style linking rules apply: global functions and variables are visible across input strings and must"]
+ #[doc = " be defined uniquely. There must be a visible function for \\a programName."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the program in"]
+ #[doc = " @param[in] n Number of ptx strings"]
+ #[doc = " @param[in] ptxStrings Array of strings containing PTX code"]
+ #[doc = " @param[in] programName The name of the PTX function to create the program from"]
+ #[doc = " @param[in] program Handle to the program to be created"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_INVALID_SOURCE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref RT_PROGRAM,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramCreateFromPTXFiles,"]
+ #[doc = " @ref rtProgramCreateFromPTXString,"]
+ #[doc = " @ref rtProgramDestroy"]
+ #[doc = ""]
+ pub fn rtProgramCreateFromPTXStrings(
+ context: RTcontext,
+ n: ::std::os::raw::c_uint,
+ ptxStrings: *mut *const ::std::os::raw::c_char,
+ programName: *const ::std::os::raw::c_char,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new program object"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramCreateFromPTXFile allocates and returns a handle to a new program object."]
+ #[doc = " The program is created from PTX code held in \\a filename from function \\a programName."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the program in"]
+ #[doc = " @param[in] filename Path to the file containing the PTX code"]
+ #[doc = " @param[in] programName The name of the PTX function to create the program from"]
+ #[doc = " @param[in] program Handle to the program to be created"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_INVALID_SOURCE"]
+ #[doc = " - @ref RT_ERROR_FILE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramCreateFromPTXFile was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref RT_PROGRAM,"]
+ #[doc = " @ref rtProgramCreateFromPTXString,"]
+ #[doc = " @ref rtProgramDestroy"]
+ #[doc = ""]
+ pub fn rtProgramCreateFromPTXFile(
+ context: RTcontext,
+ filename: *const ::std::os::raw::c_char,
+ programName: *const ::std::os::raw::c_char,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new program object"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramCreateFromPTXFiles allocates and returns a handle to a new program object."]
+ #[doc = " The program is created by linking PTX code held in one or more files."]
+ #[doc = " C-style linking rules apply: global functions and variables are visible across input files and must"]
+ #[doc = " be defined uniquely. There must be a visible function for \\a programName."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the program in"]
+ #[doc = " @param[in] n Number of filenames"]
+ #[doc = " @param[in] filenames Array of one or more paths to files containing PTX code"]
+ #[doc = " @param[in] programName The name of the PTX function to create the program from"]
+ #[doc = " @param[in] program Handle to the program to be created"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_INVALID_SOURCE"]
+ #[doc = " - @ref RT_ERROR_FILE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref RT_PROGRAM,"]
+ #[doc = " @ref rtProgramCreateFromPTXString,"]
+ #[doc = " @ref rtProgramCreateFromPTXStrings,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramCreateFromProgram,"]
+ #[doc = " @ref rtProgramDestroy"]
+ #[doc = ""]
+ pub fn rtProgramCreateFromPTXFiles(
+ context: RTcontext,
+ n: ::std::os::raw::c_uint,
+ filenames: *mut *const ::std::os::raw::c_char,
+ programName: *const ::std::os::raw::c_char,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new program object"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramCreateFromProgram allocates and returns a handle to a new program object."]
+ #[doc = " The program code is taken from another program, but none of the other attributes are taken."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the program in"]
+ #[doc = " @param[in] program_in The program whose program code to use."]
+ #[doc = " @param[in] program_out Handle to the program to be created"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref RT_PROGRAM,"]
+ #[doc = " @ref rtProgramCreateFromPTXString,"]
+ #[doc = " @ref rtProgramCreateFromPTXStrings,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramDestroy"]
+ #[doc = ""]
+ pub fn rtProgramCreateFromProgram(
+ context: RTcontext,
+ program_in: RTprogram,
+ program_out: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a program object"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramDestroy removes \\a program from its context and deletes it."]
+ #[doc = " \\a program should be a value returned by \\a rtProgramCreate*."]
+ #[doc = " Associated variables declared via @ref rtProgramDeclareVariable are destroyed."]
+ #[doc = " After the call, \\a program is no longer a valid handle."]
+ #[doc = ""]
+ #[doc = " @param[in] program Handle of the program to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramCreateFromPTXString"]
+ #[doc = ""]
+ pub fn rtProgramDestroy(program: RTprogram) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Validates the state of a program"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramValidate checks \\a program for completeness. If \\a program or any of"]
+ #[doc = " the objects attached to \\a program are not valid, returns @ref"]
+ #[doc = " RT_ERROR_INVALID_CONTEXT."]
+ #[doc = ""]
+ #[doc = " @param[in] program The program to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramCreateFromPTXString"]
+ #[doc = ""]
+ pub fn rtProgramValidate(program: RTprogram) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the context object that created a program"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramGetContext returns a handle to the context object that was used to"]
+ #[doc = " create \\a program. Returns @ref RT_ERROR_INVALID_VALUE if \\a context is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] program The program to be queried for its context object"]
+ #[doc = " @param[out] context The return handle for the requested context object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextCreate"]
+ #[doc = ""]
+ pub fn rtProgramGetContext(program: RTprogram, context: *mut RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a new named variable associated with a program"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramDeclareVariable declares a new variable, \\a name, and associates it with"]
+ #[doc = " the program. A variable can only be declared with the same name once on the program."]
+ #[doc = " Any attempt to declare multiple variables with the same name will cause the call to"]
+ #[doc = " fail and return @ref RT_ERROR_VARIABLE_REDECLARED. If \\a name or\\a v is \\a NULL"]
+ #[doc = " returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] program The program the declared variable will be attached to"]
+ #[doc = " @param[in] name The name of the variable to be created"]
+ #[doc = " @param[out] v Return handle to the variable to be created"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_REDECLARED"]
+ #[doc = " - @ref RT_ERROR_ILLEGAL_SYMBOL"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramDeclareVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtProgramRemoveVariable,"]
+ #[doc = " @ref rtProgramGetVariable,"]
+ #[doc = " @ref rtProgramGetVariableCount,"]
+ #[doc = " @ref rtProgramQueryVariable"]
+ #[doc = ""]
+ pub fn rtProgramDeclareVariable(
+ program: RTprogram,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a handle to the named variable attached to a program"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramQueryVariable returns a handle to a variable object, in \\a *v, attached"]
+ #[doc = " to \\a program referenced by the \\a NULL-terminated string \\a name. If \\a name is not"]
+ #[doc = " the name of a variable attached to \\a program, \\a *v will be \\a NULL after the call."]
+ #[doc = ""]
+ #[doc = " @param[in] program The program to be queried for the named variable"]
+ #[doc = " @param[in] name The name of the program to be queried for"]
+ #[doc = " @param[out] v The return handle to the variable object"]
+ #[doc = " @param program Handle to the program to be created"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramQueryVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtProgramDeclareVariable,"]
+ #[doc = " @ref rtProgramRemoveVariable,"]
+ #[doc = " @ref rtProgramGetVariable,"]
+ #[doc = " @ref rtProgramGetVariableCount"]
+ #[doc = ""]
+ pub fn rtProgramQueryVariable(
+ program: RTprogram,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Removes the named variable from a program"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramRemoveVariable removes variable \\a v from the \\a program object. Once a"]
+ #[doc = " variable has been removed from this program, another variable with the same name as"]
+ #[doc = " the removed variable may be declared."]
+ #[doc = ""]
+ #[doc = " @param[in] program The program to remove the variable from"]
+ #[doc = " @param[in] v The variable to remove"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramRemoveVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtProgramDeclareVariable,"]
+ #[doc = " @ref rtProgramGetVariable,"]
+ #[doc = " @ref rtProgramGetVariableCount,"]
+ #[doc = " @ref rtProgramQueryVariable"]
+ #[doc = ""]
+ pub fn rtProgramRemoveVariable(program: RTprogram, v: RTvariable) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of variables attached to a program"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramGetVariableCount returns, in \\a *count, the number of variable objects that"]
+ #[doc = " have been attached to \\a program."]
+ #[doc = ""]
+ #[doc = " @param[in] program The program to be queried for its variable count"]
+ #[doc = " @param[out] count The return handle for the number of variables attached to this program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramGetVariableCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtProgramDeclareVariable,"]
+ #[doc = " @ref rtProgramRemoveVariable,"]
+ #[doc = " @ref rtProgramGetVariable,"]
+ #[doc = " @ref rtProgramQueryVariable"]
+ #[doc = ""]
+ pub fn rtProgramGetVariableCount(
+ program: RTprogram,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a handle to a variable attached to a program by index"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramGetVariable returns a handle to a variable in \\a *v attached to \\a"]
+ #[doc = " program with @ref rtProgramDeclareVariable by \\a index. \\a index must be between"]
+ #[doc = " 0 and one less than the value returned by @ref rtProgramGetVariableCount. The order"]
+ #[doc = " in which variables are enumerated is not constant and may change as variables are"]
+ #[doc = " attached and removed from the program object."]
+ #[doc = ""]
+ #[doc = " @param[in] program The program to be queried for the indexed variable object"]
+ #[doc = " @param[in] index The index of the variable to return"]
+ #[doc = " @param[out] v Return handle to the variable object specified by the index"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramGetVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtProgramDeclareVariable,"]
+ #[doc = " @ref rtProgramRemoveVariable,"]
+ #[doc = " @ref rtProgramGetVariableCount,"]
+ #[doc = " @ref rtProgramQueryVariable"]
+ #[doc = ""]
+ pub fn rtProgramGetVariable(
+ program: RTprogram,
+ index: ::std::os::raw::c_uint,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the ID for the Program object"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramGetId returns an ID for the provided program. The returned ID is used"]
+ #[doc = " to reference \\a program from device code. If \\a programId is \\a NULL or the \\a"]
+ #[doc = " program is not a valid \\a RTprogram, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = " @ref RT_PROGRAM_ID_NULL can be used as a sentinel for a non-existent program, since"]
+ #[doc = " this value will never be returned as a valid program id."]
+ #[doc = ""]
+ #[doc = " @param[in] program The program to be queried for its id"]
+ #[doc = " @param[out] programId The returned ID of the program."]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramGetId was introduced in OptiX 3.6."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetProgramFromId"]
+ #[doc = ""]
+ pub fn rtProgramGetId(program: RTprogram, programId: *mut ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the program ids that may potentially be called at a call site"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramCallsiteSetPotentialCallees specifies the program IDs of potential"]
+ #[doc = " callees at the call site in the \\a program identified by \\a name to the list"]
+ #[doc = " provided in \\a ids. If \\a program is bit a valid \\a RTprogram or the \\a program"]
+ #[doc = " does not contain a call site with the identifier \\a name or \\a ids contains"]
+ #[doc = " invalid program ids, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] program The program that includes the call site."]
+ #[doc = " @param[in] name The string identifier for the call site to modify."]
+ #[doc = " @param[in] ids The program IDs of the programs that may potentially be called at the call site"]
+ #[doc = " @param[in] numIds The size of the array passed in for \\a ids."]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtProgramCallsiteSetPotentialCallees was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtProgramGetId"]
+ #[doc = ""]
+ pub fn rtProgramCallsiteSetPotentialCallees(
+ program: RTprogram,
+ name: *const ::std::os::raw::c_char,
+ ids: *const ::std::os::raw::c_int,
+ numIds: ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets an RTprogram corresponding to the program id"]
+ #[doc = ""]
+ #[doc = " @ingroup Program"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetProgramFromId returns a handle to the program in \\a *program"]
+ #[doc = " corresponding to the \\a programId supplied. If \\a programId is not a valid"]
+ #[doc = " program handle, \\a *program is set to \\a NULL. Returns @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " if \\a context is invalid or \\a programId is not a valid program handle."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context the program should be originated from"]
+ #[doc = " @param[in] programId The ID of the program to query"]
+ #[doc = " @param[out] program The return handle for the program object corresponding to the programId"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetProgramFromId was introduced in OptiX 3.6."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtProgramGetId"]
+ #[doc = ""]
+ pub fn rtContextGetProgramFromId(
+ context: RTcontext,
+ programId: ::std::os::raw::c_int,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new group"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupCreate creates a new group within a context. \\a context"]
+ #[doc = " specifies the target context, and should be a value returned by"]
+ #[doc = " @ref rtContextCreate. Sets \\a *group to the handle of a newly created group"]
+ #[doc = " within \\a context. Returns @ref RT_ERROR_INVALID_VALUE if \\a group is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies a context within which to create a new group"]
+ #[doc = " @param[out] group Returns a newly created group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupDestroy,"]
+ #[doc = " @ref rtContextCreate"]
+ #[doc = ""]
+ pub fn rtGroupCreate(context: RTcontext, group: *mut RTgroup) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a group node"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupDestroy removes \\a group from its context and deletes it."]
+ #[doc = " \\a group should be a value returned by @ref rtGroupCreate."]
+ #[doc = " No child graph nodes are destroyed."]
+ #[doc = " After the call, \\a group is no longer a valid handle."]
+ #[doc = ""]
+ #[doc = " @param[in] group Handle of the group node to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupCreate"]
+ #[doc = ""]
+ pub fn rtGroupDestroy(group: RTgroup) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Verifies the state of the group"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupValidate checks \\a group for completeness. If \\a group or"]
+ #[doc = " any of the objects attached to \\a group are not valid, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] group Specifies the group to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupCreate"]
+ #[doc = ""]
+ pub fn rtGroupValidate(group: RTgroup) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context associated with a group"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetContext queries a group for its associated context."]
+ #[doc = " \\a group specifies the group to query, and must be a value returned by"]
+ #[doc = " @ref rtGroupCreate. Sets \\a *context to the context"]
+ #[doc = " associated with \\a group."]
+ #[doc = ""]
+ #[doc = " @param[in] group Specifies the group to query"]
+ #[doc = " @param[out] context Returns the context associated with the group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextCreate,"]
+ #[doc = " @ref rtGroupCreate"]
+ #[doc = ""]
+ pub fn rtGroupGetContext(group: RTgroup, context: *mut RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Set the acceleration structure for a group"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupSetAcceleration attaches an acceleration structure to a group. The acceleration"]
+ #[doc = " structure must have been previously created using @ref rtAccelerationCreate. Every group is"]
+ #[doc = " required to have an acceleration structure assigned in order to pass validation. The acceleration"]
+ #[doc = " structure will be built over the children of the group. For example, if an acceleration structure"]
+ #[doc = " is attached to a group that has a selector, a geometry group, and a transform child,"]
+ #[doc = " the acceleration structure will be built over the bounding volumes of these three objects."]
+ #[doc = ""]
+ #[doc = " Note that it is legal to attach a single RTacceleration object to multiple groups, as long as"]
+ #[doc = " the underlying bounds of the children are the same. For example, if another group has three"]
+ #[doc = " children which are known to have the same bounding volumes as the ones in the example"]
+ #[doc = " above, the two groups can share an acceleration structure, thus saving build time. This is"]
+ #[doc = " true even if the details of the children, such as the actual type of a node or its geometry"]
+ #[doc = " content, differ from the first set of group children. All that is required is for a child"]
+ #[doc = " node at a given index to have the same bounds as the other group's child node at the same index."]
+ #[doc = ""]
+ #[doc = " Sharing an acceleration structure this way corresponds to attaching an acceleration structure"]
+ #[doc = " to multiple geometry groups at lower graph levels using @ref rtGeometryGroupSetAcceleration."]
+ #[doc = ""]
+ #[doc = " @param[in] group The group handle"]
+ #[doc = " @param[in] acceleration The acceleration structure to attach to the group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupSetAcceleration was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupGetAcceleration,"]
+ #[doc = " @ref rtAccelerationCreate,"]
+ #[doc = " @ref rtGeometryGroupSetAcceleration"]
+ #[doc = ""]
+ pub fn rtGroupSetAcceleration(group: RTgroup, acceleration: RTacceleration) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the visibility mask for a group."]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " Geometry is intersected by rays if the ray's @ref RTvisibilitymask shares at"]
+ #[doc = " least one bit with the group's mask. This mechanism allows for a number of"]
+ #[doc = " user-defined visibility groups that can be excluded from certain types of rays"]
+ #[doc = " as needed."]
+ #[doc = " Note that the visibility mask is not checked for the root node of a trace call."]
+ #[doc = " (It is assumed to be visible otherwise trace should not be called)."]
+ #[doc = " Note that the @pre mask is currently limited to 8 bits."]
+ #[doc = ""]
+ #[doc = " @param[in] group The group handle"]
+ #[doc = " @param[in] mask A set of bits for which rays will intersect the group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupSetVisibilityMask was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupSetVisibilityMask,"]
+ #[doc = " @ref rtGroupGetVisibilityMask,"]
+ #[doc = " @ref rtTrace"]
+ pub fn rtGroupSetVisibilityMask(group: RTgroup, mask: RTvisibilitymask) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Retrieves the visibility mask of a group."]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " See @ref rtGroupSetVisibilityMask for details."]
+ #[doc = ""]
+ #[doc = " @param[in] group The group handle"]
+ #[doc = " @param[out] mask A set of bits for which rays will intersect the group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetVisibilityMask was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupGetVisibilityMask,"]
+ #[doc = " @ref rtGroupSetVisibilityMask,"]
+ #[doc = " @ref rtTrace"]
+ pub fn rtGroupGetVisibilityMask(group: RTgroup, mask: *mut RTvisibilitymask) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the acceleration structure attached to a group"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetAcceleration returns the acceleration structure attached to a group using @ref rtGroupSetAcceleration."]
+ #[doc = " If no acceleration structure has previously been set, \\a *acceleration is set to \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] group The group handle"]
+ #[doc = " @param[out] acceleration The returned acceleration structure object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetAcceleration was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupSetAcceleration,"]
+ #[doc = " @ref rtAccelerationCreate"]
+ #[doc = ""]
+ pub fn rtGroupGetAcceleration(group: RTgroup, acceleration: *mut RTacceleration) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the number of child nodes to be attached to the group"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupSetChildCount specifies the number of child slots in this group. Potentially existing links to children"]
+ #[doc = " at indices greater than \\a count-1 are removed. If the call increases the number of slots, the newly"]
+ #[doc = " created slots are empty and need to be filled using @ref rtGroupSetChild before validation."]
+ #[doc = ""]
+ #[doc = " @param[in] group The parent group handle"]
+ #[doc = " @param[in] count Number of child slots to allocate for the group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupSetChildCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupGetChild,"]
+ #[doc = " @ref rtGroupGetChildCount,"]
+ #[doc = " @ref rtGroupGetChildType,"]
+ #[doc = " @ref rtGroupSetChild"]
+ #[doc = ""]
+ pub fn rtGroupSetChildCount(group: RTgroup, count: ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of child slots for a group"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetChildCount returns the number of child slots allocated using @ref"]
+ #[doc = " rtGroupSetChildCount. This includes empty slots which may not yet have actual children assigned"]
+ #[doc = " by @ref rtGroupSetChild. Returns @ref RT_ERROR_INVALID_VALUE if given a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] group The parent group handle"]
+ #[doc = " @param[out] count Returned number of child slots"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetChildCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupSetChild,"]
+ #[doc = " @ref rtGroupGetChild,"]
+ #[doc = " @ref rtGroupSetChildCount,"]
+ #[doc = " @ref rtGroupGetChildType"]
+ #[doc = ""]
+ pub fn rtGroupGetChildCount(group: RTgroup, count: *mut ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Attaches a child node to a group"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Attaches a new child node \\a child to the parent node"]
+ #[doc = " \\a group. \\a index specifies the number of the slot where the child"]
+ #[doc = " node gets attached. A sufficient number of slots must be allocated"]
+ #[doc = " using @ref rtGroupSetChildCount."]
+ #[doc = " Legal child node types are @ref RTgroup, @ref RTselector, @ref RTgeometrygroup, and"]
+ #[doc = " @ref RTtransform."]
+ #[doc = ""]
+ #[doc = " @param[in] group The parent group handle"]
+ #[doc = " @param[in] index The index in the parent's child slot array"]
+ #[doc = " @param[in] child The child node to be attached. Can be of type {@ref RTgroup, @ref RTselector,"]
+ #[doc = " @ref RTgeometrygroup, @ref RTtransform}"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupSetChild was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupSetChildCount,"]
+ #[doc = " @ref rtGroupGetChildCount,"]
+ #[doc = " @ref rtGroupGetChild,"]
+ #[doc = " @ref rtGroupGetChildType"]
+ #[doc = ""]
+ pub fn rtGroupSetChild(
+ group: RTgroup,
+ index: ::std::os::raw::c_uint,
+ child: RTobject,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a child node of a group"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetChild returns the child object at slot \\a index of the parent \\a group."]
+ #[doc = " If no child has been assigned to the given slot, \\a *child is set to \\a NULL."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if given an invalid child index or \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] group The parent group handle"]
+ #[doc = " @param[in] index The index of the child slot to query"]
+ #[doc = " @param[out] child The returned child object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetChild was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupSetChild,"]
+ #[doc = " @ref rtGroupSetChildCount,"]
+ #[doc = " @ref rtGroupGetChildCount,"]
+ #[doc = " @ref rtGroupGetChildType"]
+ #[doc = ""]
+ pub fn rtGroupGetChild(
+ group: RTgroup,
+ index: ::std::os::raw::c_uint,
+ child: *mut RTobject,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Get the type of a group child"]
+ #[doc = ""]
+ #[doc = " @ingroup GroupNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetChildType returns the type of the group child at slot \\a index."]
+ #[doc = " If no child is associated with the given index, \\a *type is set to"]
+ #[doc = " @ref RT_OBJECTTYPE_UNKNOWN and @ref RT_ERROR_INVALID_VALUE is returned."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if given a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] group The parent group handle"]
+ #[doc = " @param[in] index The index of the child slot to query"]
+ #[doc = " @param[out] type The returned child type"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGroupGetChildType was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupSetChild,"]
+ #[doc = " @ref rtGroupGetChild,"]
+ #[doc = " @ref rtGroupSetChildCount,"]
+ #[doc = " @ref rtGroupGetChildCount"]
+ #[doc = ""]
+ pub fn rtGroupGetChildType(
+ group: RTgroup,
+ index: ::std::os::raw::c_uint,
+ type_: *mut RTobjecttype,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Creates a new Selector node within \\a context. After calling"]
+ #[doc = " @ref rtSelectorCreate the new node is in an invalid state. For the node"]
+ #[doc = " to be valid, a visit program must be assigned using"]
+ #[doc = " @ref rtSelectorSetVisitProgram. Furthermore, a number of (zero or"]
+ #[doc = " more) children can be attached by using @ref rtSelectorSetChildCount and"]
+ #[doc = " @ref rtSelectorSetChild. Sets \\a *selector to the handle of a newly"]
+ #[doc = " created selector within \\a context. Returns @ref RT_ERROR_INVALID_VALUE if \\a selector is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies the rendering context of the Selector node"]
+ #[doc = " @param[out] selector New Selector node handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorDestroy,"]
+ #[doc = " @ref rtSelectorValidate,"]
+ #[doc = " @ref rtSelectorGetContext,"]
+ #[doc = " @ref rtSelectorSetVisitProgram,"]
+ #[doc = " @ref rtSelectorSetChildCount,"]
+ #[doc = " @ref rtSelectorSetChild"]
+ #[doc = ""]
+ pub fn rtSelectorCreate(context: RTcontext, selector: *mut RTselector) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorDestroy removes \\a selector from its context and deletes it. \\a selector should"]
+ #[doc = " be a value returned by @ref rtSelectorCreate. Associated variables declared via @ref"]
+ #[doc = " rtSelectorDeclareVariable are destroyed, but no child graph nodes are destroyed. After the"]
+ #[doc = " call, \\a selector is no longer a valid handle."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Handle of the selector node to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorCreate,"]
+ #[doc = " @ref rtSelectorValidate,"]
+ #[doc = " @ref rtSelectorGetContext"]
+ #[doc = ""]
+ pub fn rtSelectorDestroy(selector: RTselector) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Checks a Selector node for internal consistency"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorValidate recursively checks consistency of the Selector"]
+ #[doc = " node \\a selector and its children, i.e., it tries to validate the"]
+ #[doc = " whole model sub-tree with \\a selector as root. For a Selector node to"]
+ #[doc = " be valid, it must be assigned a visit program, and the number of its"]
+ #[doc = " children must match the number specified by"]
+ #[doc = " @ref rtSelectorSetChildCount."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector root node of a model sub-tree to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorCreate,"]
+ #[doc = " @ref rtSelectorDestroy,"]
+ #[doc = " @ref rtSelectorGetContext,"]
+ #[doc = " @ref rtSelectorSetVisitProgram,"]
+ #[doc = " @ref rtSelectorSetChildCount,"]
+ #[doc = " @ref rtSelectorSetChild"]
+ #[doc = ""]
+ pub fn rtSelectorValidate(selector: RTselector) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context of a Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetContext returns in \\a context the rendering context"]
+ #[doc = " in which the Selector node \\a selector has been created."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[out] context The context, \\a selector belongs to"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorCreate,"]
+ #[doc = " @ref rtSelectorDestroy,"]
+ #[doc = " @ref rtSelectorValidate"]
+ #[doc = ""]
+ pub fn rtSelectorGetContext(selector: RTselector, context: *mut RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Assigns a visit program to a Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorSetVisitProgram specifies a visit program that is"]
+ #[doc = " executed when the Selector node \\a selector gets visited by a ray"]
+ #[doc = " during traversal of the model graph. A visit program steers how"]
+ #[doc = " traversal of the Selectors's children is performed. It usually"]
+ #[doc = " chooses only a single child to continue traversal, but is also allowed"]
+ #[doc = " to process zero or multiple children. Programs can be created from PTX"]
+ #[doc = " files using @ref rtProgramCreateFromPTXFile."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[in] program Program handle associated with a visit program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorSetVisitProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorGetVisitProgram,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile"]
+ #[doc = ""]
+ pub fn rtSelectorSetVisitProgram(selector: RTselector, program: RTprogram) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the currently assigned visit program"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetVisitProgram returns in \\a program a handle of the"]
+ #[doc = " visit program curently bound to \\a selector."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[out] program Current visit progam assigned to \\a selector"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetVisitProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorSetVisitProgram"]
+ #[doc = ""]
+ pub fn rtSelectorGetVisitProgram(selector: RTselector, program: *mut RTprogram) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Specifies the number of child nodes to be"]
+ #[doc = " attached to a Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorSetChildCount allocates a number of children slots,"]
+ #[doc = " i.e., it pre-defines the exact number of child nodes the parent"]
+ #[doc = " Selector node \\a selector will have. Child nodes have to be attached"]
+ #[doc = " to the Selector node using @ref rtSelectorSetChild. Empty slots will"]
+ #[doc = " cause a validation error."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[in] count Number of child nodes to be attached to \\a selector"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorSetChildCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorValidate,"]
+ #[doc = " @ref rtSelectorGetChildCount,"]
+ #[doc = " @ref rtSelectorSetChild,"]
+ #[doc = " @ref rtSelectorGetChild,"]
+ #[doc = " @ref rtSelectorGetChildType"]
+ #[doc = ""]
+ pub fn rtSelectorSetChildCount(selector: RTselector, count: ::std::os::raw::c_uint)
+ -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of child node slots of"]
+ #[doc = " a Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetChildCount returns in \\a count the number of child"]
+ #[doc = " node slots that have been previously reserved for the Selector node"]
+ #[doc = " \\a selector by @ref rtSelectorSetChildCount. The value of \\a count"]
+ #[doc = " does not reflect the actual number of child nodes that have so far"]
+ #[doc = " been attached to the Selector node using @ref rtSelectorSetChild."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[out] count Number of child node slots reserved for \\a selector"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetChildCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorSetChildCount,"]
+ #[doc = " @ref rtSelectorSetChild,"]
+ #[doc = " @ref rtSelectorGetChild,"]
+ #[doc = " @ref rtSelectorGetChildType"]
+ #[doc = ""]
+ pub fn rtSelectorGetChildCount(
+ selector: RTselector,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Attaches a child node to a Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Attaches a new child node \\a child to the parent node"]
+ #[doc = " \\a selector. \\a index specifies the number of the slot where the child"]
+ #[doc = " node gets attached. The index value must be lower than the number"]
+ #[doc = " previously set by @ref rtSelectorSetChildCount, thus it must be in"]
+ #[doc = " the range from \\a 0 to @ref rtSelectorGetChildCount \\a -1. Legal child"]
+ #[doc = " node types are @ref RTgroup, @ref RTselector, @ref RTgeometrygroup, and"]
+ #[doc = " @ref RTtransform."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[in] index Index of the parent slot the node \\a child gets attached to"]
+ #[doc = " @param[in] child Child node to be attached. Can be {@ref RTgroup, @ref RTselector,"]
+ #[doc = " @ref RTgeometrygroup, @ref RTtransform}"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorSetChild was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorSetChildCount,"]
+ #[doc = " @ref rtSelectorGetChildCount,"]
+ #[doc = " @ref rtSelectorGetChild,"]
+ #[doc = " @ref rtSelectorGetChildType"]
+ #[doc = ""]
+ pub fn rtSelectorSetChild(
+ selector: RTselector,
+ index: ::std::os::raw::c_uint,
+ child: RTobject,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a child node that is attached to a"]
+ #[doc = " Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetChild returns in \\a child a handle of the child node"]
+ #[doc = " currently attached to \\a selector at slot \\a index. The index value"]
+ #[doc = " must be lower than the number previously set by"]
+ #[doc = " @ref rtSelectorSetChildCount, thus it must be in the range from \\a 0"]
+ #[doc = " to @ref rtSelectorGetChildCount \\a - 1. The returned pointer is of generic"]
+ #[doc = " type @ref RTobject and needs to be cast to the actual child type, which"]
+ #[doc = " can be @ref RTgroup, @ref RTselector, @ref RTgeometrygroup, or"]
+ #[doc = " @ref RTtransform. The actual type of \\a child can be queried using"]
+ #[doc = " @ref rtSelectorGetChildType;"]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[in] index Child node index"]
+ #[doc = " @param[out] child Child node handle. Can be {@ref RTgroup, @ref RTselector,"]
+ #[doc = " @ref RTgeometrygroup, @ref RTtransform}"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetChild was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorSetChildCount,"]
+ #[doc = " @ref rtSelectorGetChildCount,"]
+ #[doc = " @ref rtSelectorSetChild,"]
+ #[doc = " @ref rtSelectorGetChildType"]
+ #[doc = ""]
+ pub fn rtSelectorGetChild(
+ selector: RTselector,
+ index: ::std::os::raw::c_uint,
+ child: *mut RTobject,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns type information about a Selector"]
+ #[doc = " child node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetChildType queries the type of the child node"]
+ #[doc = " attached to \\a selector at slot \\a index."]
+ #[doc = " If no child is associated with the given index, \\a *type is set to"]
+ #[doc = " @ref RT_OBJECTTYPE_UNKNOWN and @ref RT_ERROR_INVALID_VALUE is returned."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if given a \\a NULL pointer."]
+ #[doc = " The returned type is one of:"]
+ #[doc = ""]
+ #[doc = " @ref RT_OBJECTTYPE_GROUP"]
+ #[doc = " @ref RT_OBJECTTYPE_GEOMETRY_GROUP"]
+ #[doc = " @ref RT_OBJECTTYPE_TRANSFORM"]
+ #[doc = " @ref RT_OBJECTTYPE_SELECTOR"]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[in] index Child node index"]
+ #[doc = " @param[out] type Type of the child node"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetChildType was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorSetChildCount,"]
+ #[doc = " @ref rtSelectorGetChildCount,"]
+ #[doc = " @ref rtSelectorSetChild,"]
+ #[doc = " @ref rtSelectorGetChild"]
+ #[doc = ""]
+ pub fn rtSelectorGetChildType(
+ selector: RTselector,
+ index: ::std::os::raw::c_uint,
+ type_: *mut RTobjecttype,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a variable associated with a"]
+ #[doc = " Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Declares a new variable identified by \\a name, and associates it with"]
+ #[doc = " the Selector node \\a selector. The new variable handle is returned in"]
+ #[doc = " \\a v. After declaration, a variable does not have a type until its"]
+ #[doc = " value is set by an \\a rtVariableSet{...} function. Once a variable"]
+ #[doc = " type has been set, it cannot be changed, i.e., only"]
+ #[doc = " \\a rtVariableSet{...} functions of the same type can be used to"]
+ #[doc = " change the value of the variable."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[in] name Variable identifier"]
+ #[doc = " @param[out] v New variable handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_REDECLARED"]
+ #[doc = " - @ref RT_ERROR_ILLEGAL_SYMBOL"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorDeclareVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorQueryVariable,"]
+ #[doc = " @ref rtSelectorRemoveVariable,"]
+ #[doc = " @ref rtSelectorGetVariableCount,"]
+ #[doc = " @ref rtSelectorGetVariable,"]
+ #[doc = " @ref rtVariableSet{...}"]
+ #[doc = ""]
+ pub fn rtSelectorDeclareVariable(
+ selector: RTselector,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a variable associated with a"]
+ #[doc = " Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Returns in \\a v a handle to the variable identified by \\a name, which"]
+ #[doc = " is associated with the Selector node \\a selector. The current value of"]
+ #[doc = " a variable can be retrieved from its handle by using an appropriate"]
+ #[doc = " \\a rtVariableGet{...} function matching the variable's type."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[in] name Variable identifier"]
+ #[doc = " @param[out] v Variable handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorQueryVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorDeclareVariable,"]
+ #[doc = " @ref rtSelectorRemoveVariable,"]
+ #[doc = " @ref rtSelectorGetVariableCount,"]
+ #[doc = " @ref rtSelectorGetVariable,"]
+ #[doc = " \\a rtVariableGet{...}"]
+ #[doc = ""]
+ pub fn rtSelectorQueryVariable(
+ selector: RTselector,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Removes a variable from a Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorRemoveVariable removes the variable \\a v from the"]
+ #[doc = " Selector node \\a selector and deletes it. The handle \\a v must be"]
+ #[doc = " considered invalid afterwards."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[in] v Variable handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorRemoveVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorDeclareVariable,"]
+ #[doc = " @ref rtSelectorQueryVariable,"]
+ #[doc = " @ref rtSelectorGetVariableCount,"]
+ #[doc = " @ref rtSelectorGetVariable"]
+ #[doc = ""]
+ pub fn rtSelectorRemoveVariable(selector: RTselector, v: RTvariable) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of variables"]
+ #[doc = " attached to a Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetVariableCount returns in \\a count the number of"]
+ #[doc = " variables that are currently attached to the Selector node"]
+ #[doc = " \\a selector."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[out] count Number of variables associated with \\a selector"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetVariableCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorDeclareVariable,"]
+ #[doc = " @ref rtSelectorQueryVariable,"]
+ #[doc = " @ref rtSelectorRemoveVariable,"]
+ #[doc = " @ref rtSelectorGetVariable"]
+ #[doc = ""]
+ pub fn rtSelectorGetVariableCount(
+ selector: RTselector,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a variable associated with a"]
+ #[doc = " Selector node"]
+ #[doc = ""]
+ #[doc = " @ingroup SelectorNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Returns in \\a v a handle to the variable located at position \\a index"]
+ #[doc = " in the Selectors's variable array. \\a index is a sequential number"]
+ #[doc = " depending on the order of variable declarations. The index must be"]
+ #[doc = " in the range from \\a 0 to @ref rtSelectorGetVariableCount \\a - 1. The"]
+ #[doc = " current value of a variable can be retrieved from its handle by using"]
+ #[doc = " an appropriate \\a rtVariableGet{...} function matching the"]
+ #[doc = " variable's type."]
+ #[doc = ""]
+ #[doc = " @param[in] selector Selector node handle"]
+ #[doc = " @param[in] index Variable index"]
+ #[doc = " @param[out] v Variable handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtSelectorGetVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtSelectorDeclareVariable,"]
+ #[doc = " @ref rtSelectorQueryVariable,"]
+ #[doc = " @ref rtSelectorRemoveVariable,"]
+ #[doc = " @ref rtSelectorGetVariableCount,"]
+ #[doc = " \\a rtVariableGet{...}"]
+ #[doc = ""]
+ pub fn rtSelectorGetVariable(
+ selector: RTselector,
+ index: ::std::os::raw::c_uint,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Creates a new Transform node within the given context. For the node to be functional, a child"]
+ #[doc = " node must be attached using @ref rtTransformSetChild. A transformation matrix can be associated"]
+ #[doc = " with the transform node with @ref rtTransformSetMatrix. Sets \\a *transform to the handle of a"]
+ #[doc = " newly created transform within \\a context. Returns @ref RT_ERROR_INVALID_VALUE if \\a transform"]
+ #[doc = " is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies the rendering context of the Transform node"]
+ #[doc = " @param[out] transform New Transform node handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformDestroy,"]
+ #[doc = " @ref rtTransformValidate,"]
+ #[doc = " @ref rtTransformGetContext,"]
+ #[doc = " @ref rtTransformSetMatrix,"]
+ #[doc = " @ref rtTransformGetMatrix,"]
+ #[doc = " @ref rtTransformSetChild,"]
+ #[doc = " @ref rtTransformGetChild,"]
+ #[doc = " @ref rtTransformGetChildType"]
+ #[doc = ""]
+ pub fn rtTransformCreate(context: RTcontext, transform: *mut RTtransform) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformDestroy removes \\a transform from its context and deletes it."]
+ #[doc = " \\a transform should be a value returned by @ref rtTransformCreate."]
+ #[doc = " No child graph nodes are destroyed."]
+ #[doc = " After the call, \\a transform is no longer a valid handle."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Handle of the transform node to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformCreate,"]
+ #[doc = " @ref rtTransformValidate,"]
+ #[doc = " @ref rtTransformGetContext"]
+ #[doc = ""]
+ pub fn rtTransformDestroy(transform: RTtransform) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Checks a Transform node for internal"]
+ #[doc = " consistency"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformValidate recursively checks consistency of the"]
+ #[doc = " Transform node \\a transform and its child, i.e., it tries to validate"]
+ #[doc = " the whole model sub-tree with \\a transform as root. For a Transform"]
+ #[doc = " node to be valid, it must have a child node attached. It is, however,"]
+ #[doc = " not required to explicitly set a transformation matrix. Without a specified"]
+ #[doc = " transformation matrix, the identity matrix is applied."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform root node of a model sub-tree to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformCreate,"]
+ #[doc = " @ref rtTransformDestroy,"]
+ #[doc = " @ref rtTransformGetContext,"]
+ #[doc = " @ref rtTransformSetMatrix,"]
+ #[doc = " @ref rtTransformSetChild"]
+ #[doc = ""]
+ pub fn rtTransformValidate(transform: RTtransform) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context of a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetContext queries a transform node for its associated context. \\a transform"]
+ #[doc = " specifies the transform node to query, and should be a value returned by @ref"]
+ #[doc = " rtTransformCreate. Sets \\a *context to the context associated with \\a transform."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[out] context The context associated with \\a transform"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformCreate,"]
+ #[doc = " @ref rtTransformDestroy,"]
+ #[doc = " @ref rtTransformValidate"]
+ #[doc = ""]
+ pub fn rtTransformGetContext(transform: RTtransform, context: *mut RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Associates an affine transformation matrix"]
+ #[doc = " with a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformSetMatrix associates a 4x4 matrix with the Transform"]
+ #[doc = " node \\a transform. The provided transformation matrix results in a"]
+ #[doc = " corresponding affine transformation of all geometry contained in the"]
+ #[doc = " sub-tree with \\a transform as root. At least one of the pointers"]
+ #[doc = " \\a matrix and \\a inverseMatrix must be non-\\a NULL. If exactly one"]
+ #[doc = " pointer is valid, the other matrix will be computed. If both are"]
+ #[doc = " valid, the matrices will be used as-is. If \\a transpose is \\a 0,"]
+ #[doc = " source matrices are expected to be in row-major format, i.e., matrix"]
+ #[doc = " rows are contiguously laid out in memory:"]
+ #[doc = ""]
+ #[doc = " float matrix[4*4] = { a11, a12, a13, a14,"]
+ #[doc = " a21, a22, a23, a24,"]
+ #[doc = " a31, a32, a33, a34,"]
+ #[doc = " a41, a42, a43, a44 };"]
+ #[doc = ""]
+ #[doc = " Here, the translational elements \\a a14, \\a a24, and \\a a34 are at the"]
+ #[doc = " 4th, 8th, and 12th position the matrix array. If the supplied"]
+ #[doc = " matrices are in column-major format, a non-0 \\a transpose flag"]
+ #[doc = " can be used to trigger an automatic transpose of the input matrices."]
+ #[doc = ""]
+ #[doc = " Calling this function clears any motion keys previously set for the Transform."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[in] transpose Flag indicating whether \\a matrix and \\a inverseMatrix should be"]
+ #[doc = " transposed"]
+ #[doc = " @param[in] matrix Affine matrix (4x4 float array)"]
+ #[doc = " @param[in] inverseMatrix Inverted form of \\a matrix"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformSetMatrix was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformGetMatrix"]
+ #[doc = ""]
+ pub fn rtTransformSetMatrix(
+ transform: RTtransform,
+ transpose: ::std::os::raw::c_int,
+ matrix: *const f32,
+ inverseMatrix: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the affine matrix and its inverse associated with a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetMatrix returns in \\a matrix the affine matrix that"]
+ #[doc = " is currently used to perform a transformation of the geometry"]
+ #[doc = " contained in the sub-tree with \\a transform as root. The corresponding"]
+ #[doc = " inverse matrix will be returned in \\a inverseMatrix. One or both"]
+ #[doc = " pointers are allowed to be \\a NULL. If \\a transpose is \\a 0, matrices"]
+ #[doc = " are returned in row-major format, i.e., matrix rows are contiguously"]
+ #[doc = " laid out in memory. If \\a transpose is non-zero, matrices are returned"]
+ #[doc = " in column-major format. If non-\\a NULL, matrix pointers must point to a"]
+ #[doc = " float array of at least 16 elements."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[in] transpose Flag indicating whether \\a matrix and \\a inverseMatrix should be"]
+ #[doc = " transposed"]
+ #[doc = " @param[out] matrix Affine matrix (4x4 float array)"]
+ #[doc = " @param[out] inverseMatrix Inverted form of \\a matrix"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetMatrix was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformSetMatrix"]
+ #[doc = ""]
+ pub fn rtTransformGetMatrix(
+ transform: RTtransform,
+ transpose: ::std::os::raw::c_int,
+ matrix: *mut f32,
+ inverseMatrix: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the motion time range for a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " Sets the inclusive motion time range [timeBegin, timeEnd] for \\a transform, where timeBegin <= timeEnd."]
+ #[doc = " The default time range is [0.0, 1.0]. Has no effect unless @ref rtTransformSetMotionKeys"]
+ #[doc = " is also called, in which case the left endpoint of the time range, \\a timeBegin, is associated with"]
+ #[doc = " the first motion key, and the right endpoint, \\a timeEnd, with the last motion key. The keys uniformly"]
+ #[doc = " divide the time range."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[in] timeBegin Beginning time value of range"]
+ #[doc = " @param[in] timeEnd Ending time value of range"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformSetMotionRange was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformGetMotionRange,"]
+ #[doc = " @ref rtTransformSetMotionBorderMode,"]
+ #[doc = " @ref rtTransformSetMotionKeys,"]
+ #[doc = ""]
+ pub fn rtTransformSetMotionRange(
+ transform: RTtransform,
+ timeBegin: f32,
+ timeEnd: f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the motion time range associated with a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtTransformGetMotionRange returns the motion time range set for the Transform."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[out] timeBegin Beginning time value of range"]
+ #[doc = " @param[out] timeEnd Ending time value of range"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetMotionRange was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformSetMotionRange,"]
+ #[doc = " @ref rtTransformGetMotionBorderMode,"]
+ #[doc = " @ref rtTransformGetMotionKeyCount,"]
+ #[doc = " @ref rtTransformGetMotionKeyType,"]
+ #[doc = " @ref rtTransformGetMotionKeys,"]
+ #[doc = ""]
+ pub fn rtTransformGetMotionRange(
+ transform: RTtransform,
+ timeBegin: *mut f32,
+ timeEnd: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the motion border modes of a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtTransformSetMotionBorderMode sets the behavior of \\a transform"]
+ #[doc = " outside its motion time range. The \\a beginMode and \\a endMode arguments"]
+ #[doc = " correspond to timeBegin and timeEnd set with @ref rtTransformSetMotionRange."]
+ #[doc = " The arguments are independent, and each has one of the following values:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_MOTIONBORDERMODE_CLAMP :"]
+ #[doc = " The transform and the scene under it still exist at times less than timeBegin"]
+ #[doc = " or greater than timeEnd, with the transform clamped to its values at timeBegin"]
+ #[doc = " or timeEnd, respectively."]
+ #[doc = ""]
+ #[doc = " - @ref RT_MOTIONBORDERMODE_VANISH :"]
+ #[doc = " The transform and the scene under it vanish for times less than timeBegin"]
+ #[doc = " or greater than timeEnd."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[in] beginMode Motion border mode at motion range begin"]
+ #[doc = " @param[in] endMode Motion border mode at motion range end"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformSetMotionBorderMode was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformGetMotionBorderMode,"]
+ #[doc = " @ref rtTransformSetMotionRange,"]
+ #[doc = " @ref rtTransformSetMotionKeys,"]
+ #[doc = ""]
+ pub fn rtTransformSetMotionBorderMode(
+ transform: RTtransform,
+ beginMode: RTmotionbordermode,
+ endMode: RTmotionbordermode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the motion border modes of a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtTransformGetMotionBorderMode returns the motion border modes"]
+ #[doc = " for the time range associated with \\a transform."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[out] beginMode Motion border mode at motion time range begin"]
+ #[doc = " @param[out] endMode Motion border mode at motion time range end"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetMotionBorderMode was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformSetMotionBorderMode,"]
+ #[doc = " @ref rtTransformGetMotionRange,"]
+ #[doc = " @ref rtTransformGetMotionKeyCount,"]
+ #[doc = " @ref rtTransformGetMotionKeyType,"]
+ #[doc = " @ref rtTransformGetMotionKeys,"]
+ #[doc = ""]
+ pub fn rtTransformGetMotionBorderMode(
+ transform: RTtransform,
+ beginMode: *mut RTmotionbordermode,
+ endMode: *mut RTmotionbordermode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the motion keys associated with a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtTransformSetMotionKeys sets a series of key values defining how"]
+ #[doc = " \\a transform varies with time. The float values in \\a keys are one of the"]
+ #[doc = " following types:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_MOTIONKEYTYPE_MATRIX_FLOAT12"]
+ #[doc = " Each key is a 12-float 3x4 matrix in row major order (3 rows, 4 columns)."]
+ #[doc = " The length of \\a keys is 12*n."]
+ #[doc = ""]
+ #[doc = " - @ref RT_MOTIONKEYTYPE_SRT_FLOAT16"]
+ #[doc = " Each key is a packed 16-float array in this order:"]
+ #[doc = " [sx, a, b, pvx, sy, c, pvy, sz, pvz, qx, qy, qz, qw, tx, ty, tz]"]
+ #[doc = " The length of \\a keys is 16*n."]
+ #[doc = ""]
+ #[doc = " These are packed components of a scale/shear S, a quaternion R, and a translation T."]
+ #[doc = ""]
+ #[doc = " S = [ sx a b pvx ]"]
+ #[doc = " [ * sy c pvy ]"]
+ #[doc = " [ * * sz pvz ]"]
+ #[doc = ""]
+ #[doc = " R = [ qx, qy, qz, qw ]"]
+ #[doc = " where qw = cos(theta/2) and [qx, qy, qz] = sin(theta/2)*normalized_axis."]
+ #[doc = ""]
+ #[doc = " T = [ tx, ty, tz ]"]
+ #[doc = ""]
+ #[doc = " Removing motion keys:"]
+ #[doc = ""]
+ #[doc = " Passing a single key with \\a n == 1, or calling @ref rtTransformSetMatrix, removes any"]
+ #[doc = " motion data from \\a transform, and sets its matrix to values derived from the single key."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[in] n Number of motion keys >= 1"]
+ #[doc = " @param[in] type Type of motion keys"]
+ #[doc = " @param[in] keys \\a n Motion keys associated with this Transform"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformSetMotionKeys was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformGetMotionKeyCount,"]
+ #[doc = " @ref rtTransformGetMotionKeyType,"]
+ #[doc = " @ref rtTransformGetMotionKeys,"]
+ #[doc = " @ref rtTransformSetMotionBorderMode,"]
+ #[doc = " @ref rtTransformSetMotionRange,"]
+ #[doc = ""]
+ pub fn rtTransformSetMotionKeys(
+ transform: RTtransform,
+ n: ::std::os::raw::c_uint,
+ type_: RTmotionkeytype,
+ keys: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the motion key type associated with a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtTransformGetMotionKeyType returns the key type from the most recent"]
+ #[doc = " call to @ref rtTransformSetMotionKeys, or @ref RT_MOTIONKEYTYPE_NONE if no"]
+ #[doc = " keys have been set."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[out] type Motion key type associated with this Transform"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetMotionKeyType was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformSetMotionKeys,"]
+ #[doc = " @ref rtTransformGetMotionBorderMode,"]
+ #[doc = " @ref rtTransformGetMotionRange,"]
+ #[doc = " @ref rtTransformGetMotionKeyCount,"]
+ #[doc = " @ref rtTransformGetMotionKeys"]
+ #[doc = ""]
+ pub fn rtTransformGetMotionKeyType(
+ transform: RTtransform,
+ type_: *mut RTmotionkeytype,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of motion keys associated with a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtTransformGetMotionKeyCount returns in \\a n the number of motion keys associated"]
+ #[doc = " with \\a transform using @ref rtTransformSetMotionKeys. Note that the default value"]
+ #[doc = " is 1, not 0, for a transform without motion."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[out] n Number of motion steps n >= 1"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetMotionKeyCount was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformSetMotionKeys,"]
+ #[doc = " @ref rtTransformGetMotionBorderMode,"]
+ #[doc = " @ref rtTransformGetMotionRange,"]
+ #[doc = " @ref rtTransformGetMotionKeyType"]
+ #[doc = " @ref rtTransformGetMotionKeys"]
+ #[doc = ""]
+ pub fn rtTransformGetMotionKeyCount(
+ transform: RTtransform,
+ n: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the motion keys associated with a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtTransformGetMotionKeys returns in \\a keys packed float values for"]
+ #[doc = " all motion keys. The \\a keys array must be large enough to hold all the keys,"]
+ #[doc = " based on the key type returned by @ref rtTransformGetMotionKeyType and the"]
+ #[doc = " number of keys returned by @ref rtTransformGetMotionKeyCount. A single key"]
+ #[doc = " consists of either 12 floats (type RT_MOTIONKEYTYPE_MATRIX_FLOAT12) or"]
+ #[doc = " 16 floats (type RT_MOTIONKEYTYPE_SRT_FLOAT16)."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[out] keys Motion keys associated with this Transform"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetMotionKeys was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformSetMotionKeys,"]
+ #[doc = " @ref rtTransformGetMotionBorderMode,"]
+ #[doc = " @ref rtTransformGetMotionRange,"]
+ #[doc = " @ref rtTransformGetMotionKeyCount,"]
+ #[doc = " @ref rtTransformGetMotionKeyType"]
+ #[doc = ""]
+ pub fn rtTransformGetMotionKeys(transform: RTtransform, keys: *mut f32) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Attaches a child node to a Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Attaches a child node \\a child to the parent node \\a transform. Legal"]
+ #[doc = " child node types are @ref RTgroup, @ref RTselector, @ref RTgeometrygroup,"]
+ #[doc = " and @ref RTtransform. A transform node must have exactly one child. If"]
+ #[doc = " a transformation matrix has been attached to \\a transform with"]
+ #[doc = " @ref rtTransformSetMatrix, it is effective on the model sub-tree with"]
+ #[doc = " \\a child as root node."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[in] child Child node to be attached. Can be {@ref RTgroup, @ref RTselector,"]
+ #[doc = " @ref RTgeometrygroup, @ref RTtransform}"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformSetChild was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformSetMatrix,"]
+ #[doc = " @ref rtTransformGetChild,"]
+ #[doc = " @ref rtTransformGetChildType"]
+ #[doc = ""]
+ pub fn rtTransformSetChild(transform: RTtransform, child: RTobject) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the child node that is attached to a"]
+ #[doc = " Transform node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetChild returns in \\a child a handle of the child"]
+ #[doc = " node currently attached to \\a transform. The returned pointer is of"]
+ #[doc = " generic type @ref RTobject and needs to be cast to the actual child"]
+ #[doc = " type, which can be @ref RTgroup, @ref RTselector, @ref RTgeometrygroup, or"]
+ #[doc = " @ref RTtransform. The actual type of \\a child can be queried using"]
+ #[doc = " @ref rtTransformGetChildType."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if given a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[out] child Child node handle. Can be {@ref RTgroup, @ref RTselector,"]
+ #[doc = " @ref RTgeometrygroup, @ref RTtransform}"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetChild was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformSetChild,"]
+ #[doc = " @ref rtTransformGetChildType"]
+ #[doc = ""]
+ pub fn rtTransformGetChild(transform: RTtransform, child: *mut RTobject) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns type information about a"]
+ #[doc = " Transform child node"]
+ #[doc = ""]
+ #[doc = " @ingroup TransformNode"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetChildType queries the type of the child node"]
+ #[doc = " attached to \\a transform. If no child is attached, \\a *type is set to"]
+ #[doc = " @ref RT_OBJECTTYPE_UNKNOWN and @ref RT_ERROR_INVALID_VALUE is returned."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if given a \\a NULL pointer."]
+ #[doc = " The returned type is one of:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_OBJECTTYPE_GROUP"]
+ #[doc = " - @ref RT_OBJECTTYPE_GEOMETRY_GROUP"]
+ #[doc = " - @ref RT_OBJECTTYPE_TRANSFORM"]
+ #[doc = " - @ref RT_OBJECTTYPE_SELECTOR"]
+ #[doc = ""]
+ #[doc = " @param[in] transform Transform node handle"]
+ #[doc = " @param[out] type Type of the child node"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTransformGetChildType was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTransformSetChild,"]
+ #[doc = " @ref rtTransformGetChild"]
+ #[doc = ""]
+ pub fn rtTransformGetChildType(transform: RTtransform, type_: *mut RTobjecttype) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new geometry group"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupCreate creates a new geometry group within a context. \\a context"]
+ #[doc = " specifies the target context, and should be a value returned by @ref rtContextCreate."]
+ #[doc = " Sets \\a *geometrygroup to the handle of a newly created geometry group within \\a context."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if \\a geometrygroup is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies a context within which to create a new geometry group"]
+ #[doc = " @param[out] geometrygroup Returns a newly created geometry group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupDestroy,"]
+ #[doc = " @ref rtContextCreate"]
+ #[doc = ""]
+ pub fn rtGeometryGroupCreate(
+ context: RTcontext,
+ geometrygroup: *mut RTgeometrygroup,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a geometry group node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupDestroy removes \\a geometrygroup from its context and deletes it."]
+ #[doc = " \\a geometrygroup should be a value returned by @ref rtGeometryGroupCreate."]
+ #[doc = " No child graph nodes are destroyed."]
+ #[doc = " After the call, \\a geometrygroup is no longer a valid handle."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrygroup Handle of the geometry group node to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupCreate"]
+ #[doc = ""]
+ pub fn rtGeometryGroupDestroy(geometrygroup: RTgeometrygroup) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Validates the state of the geometry group"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupValidate checks \\a geometrygroup for completeness. If \\a geometrygroup or"]
+ #[doc = " any of the objects attached to \\a geometrygroup are not valid, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrygroup Specifies the geometry group to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupCreate"]
+ #[doc = ""]
+ pub fn rtGeometryGroupValidate(geometrygroup: RTgeometrygroup) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context associated with a geometry group"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupGetContext queries a geometry group for its associated context."]
+ #[doc = " \\a geometrygroup specifies the geometry group to query, and must be a value returned by"]
+ #[doc = " @ref rtGeometryGroupCreate. Sets \\a *context to the context"]
+ #[doc = " associated with \\a geometrygroup."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrygroup Specifies the geometry group to query"]
+ #[doc = " @param[out] context Returns the context associated with the geometry group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextCreate,"]
+ #[doc = " @ref rtGeometryGroupCreate"]
+ #[doc = ""]
+ pub fn rtGeometryGroupGetContext(
+ geometrygroup: RTgeometrygroup,
+ context: *mut RTcontext,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Set the acceleration structure for a group"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupSetAcceleration attaches an acceleration structure to a geometry group. The"]
+ #[doc = " acceleration structure must have been previously created using @ref rtAccelerationCreate. Every"]
+ #[doc = " geometry group is required to have an acceleration structure assigned in order to pass"]
+ #[doc = " validation. The acceleration structure will be built over the primitives contained in all"]
+ #[doc = " children of the geometry group. This enables a single acceleration structure to be built over"]
+ #[doc = " primitives of multiple geometry instances. Note that it is legal to attach a single"]
+ #[doc = " RTacceleration object to multiple geometry groups, as long as the underlying geometry of all"]
+ #[doc = " children is the same. This corresponds to attaching an acceleration structure to multiple groups"]
+ #[doc = " at higher graph levels using @ref rtGroupSetAcceleration."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrygroup The geometry group handle"]
+ #[doc = " @param[in] acceleration The acceleration structure to attach to the geometry group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupSetAcceleration was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupGetAcceleration,"]
+ #[doc = " @ref rtAccelerationCreate,"]
+ #[doc = " @ref rtGroupSetAcceleration"]
+ #[doc = ""]
+ pub fn rtGeometryGroupSetAcceleration(
+ geometrygroup: RTgeometrygroup,
+ acceleration: RTacceleration,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the acceleration structure attached to a geometry group"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupGetAcceleration returns the acceleration structure attached to a geometry"]
+ #[doc = " group using @ref rtGeometryGroupSetAcceleration. If no acceleration structure has previously"]
+ #[doc = " been set, \\a *acceleration is set to \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrygroup The geometry group handle"]
+ #[doc = " @param[out] acceleration The returned acceleration structure object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupGetAcceleration was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupSetAcceleration,"]
+ #[doc = " @ref rtAccelerationCreate"]
+ #[doc = ""]
+ pub fn rtGeometryGroupGetAcceleration(
+ geometrygroup: RTgeometrygroup,
+ acceleration: *mut RTacceleration,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets instance flags for a geometry group."]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " This function controls the @ref RTinstanceflags of the given geometry group."]
+ #[doc = " Note that flags are only considered when tracing against an RTgroup with this GeometryGroup"]
+ #[doc = " as a child (potentially with Transforms)."]
+ #[doc = " Tracing directly against the GeometryGroup will ignore the flags."]
+ #[doc = " The flags override the @ref RTgeometryflags of the underlying geometry where appropriate."]
+ #[doc = ""]
+ #[doc = " @param[in] group The group handle"]
+ #[doc = " @param[in] flags Instance flags for the given geometry group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupSetFlags was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetFlagsPerMaterial,"]
+ #[doc = " @ref rtGeometrySetFlags,"]
+ #[doc = " @ref rtGeometryGroupGetFlags,"]
+ #[doc = " @ref rtTrace"]
+ pub fn rtGeometryGroupSetFlags(group: RTgeometrygroup, flags: RTinstanceflags) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets instance flags of a geometry group."]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " See @ref rtGeometryGroupSetFlags for details."]
+ #[doc = ""]
+ #[doc = " @param[in] group The group handle"]
+ #[doc = " @param[out] flags Instance flags for the given geometry group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupGetFlags was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupSetFlags,"]
+ #[doc = " @ref rtTrace"]
+ pub fn rtGeometryGroupGetFlags(group: RTgeometrygroup, flags: *mut RTinstanceflags)
+ -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the visibility mask of a geometry group."]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " Geometry is intersected by rays if the ray's @ref RTvisibilitymask shares at"]
+ #[doc = " least one bit with the group's mask. This mechanism allows for a number of"]
+ #[doc = " user-defined visibility groups that can be excluded from certain types of rays"]
+ #[doc = " as needed."]
+ #[doc = " Note that the visibility mask is not checked for the root node of a trace call."]
+ #[doc = " (It is assumed to be visible otherwise trace should not be called)."]
+ #[doc = " Note that the @pre mask is currently limited to 8 bits."]
+ #[doc = ""]
+ #[doc = " @param[in] group The group handle"]
+ #[doc = " @param[in] mask A set of bits for which rays will intersect the group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupSetVisibilityMask was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupSetVisibilityMask"]
+ #[doc = " @ref rtGeometryGroupGetVisibilityMask,"]
+ #[doc = " @ref rtTrace"]
+ pub fn rtGeometryGroupSetVisibilityMask(
+ group: RTgeometrygroup,
+ mask: RTvisibilitymask,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the visibility mask of a geometry group."]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " See @ref rtGeometryGroupSetVisibilityMask for details/"]
+ #[doc = ""]
+ #[doc = " @param[in] group The group handle"]
+ #[doc = " @param[out] mask A set of bits for which rays will intersect the group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupGetVisibilityMask was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGroupGetVisibilityMask"]
+ #[doc = " @ref rtGeometryGroupSetVisibilityMask,"]
+ #[doc = " @ref rtTrace"]
+ pub fn rtGeometryGroupGetVisibilityMask(
+ group: RTgeometrygroup,
+ mask: *mut RTvisibilitymask,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the number of child nodes to be attached to the group"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupSetChildCount specifies the number of child slots in this geometry"]
+ #[doc = " group. Potentially existing links to children at indices greater than \\a count-1 are removed. If"]
+ #[doc = " the call increases the number of slots, the newly created slots are empty and need to be filled"]
+ #[doc = " using @ref rtGeometryGroupSetChild before validation."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrygroup The parent geometry group handle"]
+ #[doc = " @param[in] count Number of child slots to allocate for the geometry group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupSetChildCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupGetChild,"]
+ #[doc = " @ref rtGeometryGroupGetChildCount"]
+ #[doc = " @ref rtGeometryGroupSetChild"]
+ #[doc = ""]
+ pub fn rtGeometryGroupSetChildCount(
+ geometrygroup: RTgeometrygroup,
+ count: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of child slots for a group"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupGetChildCount returns the number of child slots allocated using @ref"]
+ #[doc = " rtGeometryGroupSetChildCount. This includes empty slots which may not yet have actual children"]
+ #[doc = " assigned by @ref rtGeometryGroupSetChild."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrygroup The parent geometry group handle"]
+ #[doc = " @param[out] count Returned number of child slots"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupGetChildCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupSetChild,"]
+ #[doc = " @ref rtGeometryGroupGetChild,"]
+ #[doc = " @ref rtGeometryGroupSetChildCount"]
+ #[doc = ""]
+ pub fn rtGeometryGroupGetChildCount(
+ geometrygroup: RTgeometrygroup,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Attaches a child node to a geometry group"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupSetChild attaches a new child node \\a geometryinstance to the parent node"]
+ #[doc = " \\a geometrygroup. \\a index specifies the number of the slot where the child"]
+ #[doc = " node gets attached. The index value must be lower than the number"]
+ #[doc = " previously set by @ref rtGeometryGroupSetChildCount."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrygroup The parent geometry group handle"]
+ #[doc = " @param[in] index The index in the parent's child slot array"]
+ #[doc = " @param[in] geometryinstance The child node to be attached"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupSetChild was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupSetChildCount,"]
+ #[doc = " @ref rtGeometryGroupGetChildCount,"]
+ #[doc = " @ref rtGeometryGroupGetChild"]
+ #[doc = ""]
+ pub fn rtGeometryGroupSetChild(
+ geometrygroup: RTgeometrygroup,
+ index: ::std::os::raw::c_uint,
+ geometryinstance: RTgeometryinstance,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a child node of a geometry group"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryGroup"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupGetChild returns the child geometry instance at slot \\a index of the parent"]
+ #[doc = " \\a geometrygroup. If no child has been assigned to the given slot, \\a *geometryinstance is set"]
+ #[doc = " to \\a NULL. Returns @ref RT_ERROR_INVALID_VALUE if given an invalid child index or \\a NULL"]
+ #[doc = " pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrygroup The parent geometry group handle"]
+ #[doc = " @param[in] index The index of the child slot to query"]
+ #[doc = " @param[out] geometryinstance The returned child geometry instance"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGroupGetChild was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGroupSetChild,"]
+ #[doc = " @ref rtGeometryGroupSetChildCount,"]
+ #[doc = " @ref rtGeometryGroupGetChildCount,"]
+ #[doc = ""]
+ pub fn rtGeometryGroupGetChild(
+ geometrygroup: RTgeometrygroup,
+ index: ::std::os::raw::c_uint,
+ geometryinstance: *mut RTgeometryinstance,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new acceleration structure"]
+ #[doc = ""]
+ #[doc = " @ingroup AccelerationStructure"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationCreate creates a new ray tracing acceleration structure within a context. An"]
+ #[doc = " acceleration structure is used by attaching it to a group or geometry group by calling @ref"]
+ #[doc = " rtGroupSetAcceleration or @ref rtGeometryGroupSetAcceleration. Note that an acceleration"]
+ #[doc = " structure can be shared by attaching it to multiple groups or geometry groups if the underlying"]
+ #[doc = " geometric structures are the same, see @ref rtGroupSetAcceleration and @ref"]
+ #[doc = " rtGeometryGroupSetAcceleration for more details. A newly created acceleration structure is"]
+ #[doc = " initially in dirty state. Sets \\a *acceleration to the handle of a newly created acceleration"]
+ #[doc = " structure within \\a context. Returns @ref RT_ERROR_INVALID_VALUE if \\a acceleration is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies a context within which to create a new acceleration structure"]
+ #[doc = " @param[out] acceleration Returns the newly created acceleration structure"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtAccelerationDestroy,"]
+ #[doc = " @ref rtContextCreate,"]
+ #[doc = " @ref rtAccelerationMarkDirty,"]
+ #[doc = " @ref rtAccelerationIsDirty,"]
+ #[doc = " @ref rtGroupSetAcceleration,"]
+ #[doc = " @ref rtGeometryGroupSetAcceleration"]
+ #[doc = ""]
+ pub fn rtAccelerationCreate(context: RTcontext, acceleration: *mut RTacceleration) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys an acceleration structure object"]
+ #[doc = ""]
+ #[doc = " @ingroup AccelerationStructure"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationDestroy removes \\a acceleration from its context and deletes it."]
+ #[doc = " \\a acceleration should be a value returned by @ref rtAccelerationCreate."]
+ #[doc = " After the call, \\a acceleration is no longer a valid handle."]
+ #[doc = ""]
+ #[doc = " @param[in] acceleration Handle of the acceleration structure to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtAccelerationCreate"]
+ #[doc = ""]
+ pub fn rtAccelerationDestroy(acceleration: RTacceleration) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Validates the state of an acceleration structure"]
+ #[doc = ""]
+ #[doc = " @ingroup AccelerationStructure"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationValidate checks \\a acceleration for completeness. If \\a acceleration is"]
+ #[doc = " not valid, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] acceleration The acceleration structure handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtAccelerationCreate"]
+ #[doc = ""]
+ pub fn rtAccelerationValidate(acceleration: RTacceleration) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context associated with an acceleration structure"]
+ #[doc = ""]
+ #[doc = " @ingroup AccelerationStructure"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationGetContext queries an acceleration structure for its associated context."]
+ #[doc = " The context handle is returned in \\a *context."]
+ #[doc = ""]
+ #[doc = " @param[in] acceleration The acceleration structure handle"]
+ #[doc = " @param[out] context Returns the context associated with the acceleration structure"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtAccelerationCreate"]
+ #[doc = ""]
+ pub fn rtAccelerationGetContext(
+ acceleration: RTacceleration,
+ context: *mut RTcontext,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Specifies the builder to be used for an acceleration structure"]
+ #[doc = ""]
+ #[doc = " @ingroup AccelerationStructure"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationSetBuilder specifies the method used to construct the ray tracing"]
+ #[doc = " acceleration structure represented by \\a acceleration. A builder must be set for the"]
+ #[doc = " acceleration structure to pass validation. The current builder can be changed at any time,"]
+ #[doc = " including after a call to @ref rtContextLaunch \"rtContextLaunch\". In this case, data previously"]
+ #[doc = " computed for the acceleration structure is invalidated and the acceleration will be marked"]
+ #[doc = " dirty."]
+ #[doc = ""]
+ #[doc = " \\a builder can take one of the following values:"]
+ #[doc = ""]
+ #[doc = " - \"NoAccel\": Specifies that no acceleration structure is explicitly built. Traversal linearly loops through the"]
+ #[doc = " list of primitives to intersect. This can be useful e.g. for higher level groups with only few children, where managing a more complex structure introduces unnecessary overhead."]
+ #[doc = ""]
+ #[doc = " - \"Bvh\": A standard bounding volume hierarchy, useful for most types of graph levels and geometry. Medium build speed, good ray tracing performance."]
+ #[doc = ""]
+ #[doc = " - \"Sbvh\": A high quality BVH variant for maximum ray tracing performance. Slower build speed and slightly higher memory footprint than \"Bvh\"."]
+ #[doc = ""]
+ #[doc = " - \"Trbvh\": High quality similar to Sbvh but with fast build performance. The Trbvh builder uses about 2.5 times the size of the final BVH for scratch space. A CPU-based Trbvh builder that does not have the memory constraints is available. OptiX includes an optional automatic fallback to the CPU version when out of GPU memory. Please refer to the Programming Guide for more details. Supports motion blur."]
+ #[doc = ""]
+ #[doc = " - \"MedianBvh\": Deprecated in OptiX 4.0. This builder is now internally remapped to Trbvh."]
+ #[doc = ""]
+ #[doc = " - \"Lbvh\": Deprecated in OptiX 4.0. This builder is now internally remapped to Trbvh."]
+ #[doc = ""]
+ #[doc = " - \"TriangleKdTree\": Deprecated in OptiX 4.0. This builder is now internally remapped to Trbvh."]
+ #[doc = ""]
+ #[doc = " @param[in] acceleration The acceleration structure handle"]
+ #[doc = " @param[in] builder String value specifying the builder type"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationSetBuilder was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtAccelerationGetBuilder,"]
+ #[doc = " @ref rtAccelerationSetProperty"]
+ #[doc = ""]
+ pub fn rtAccelerationSetBuilder(
+ acceleration: RTacceleration,
+ builder: *const ::std::os::raw::c_char,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query the current builder from an acceleration structure"]
+ #[doc = ""]
+ #[doc = " @ingroup AccelerationStructure"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationGetBuilder returns the name of the builder currently"]
+ #[doc = " used in the acceleration structure \\a acceleration. If no builder has"]
+ #[doc = " been set for \\a acceleration, an empty string is returned."]
+ #[doc = " \\a stringReturn will be set to point to the returned string. The"]
+ #[doc = " memory \\a stringReturn points to will be valid until the next API"]
+ #[doc = " call that returns a string."]
+ #[doc = ""]
+ #[doc = " @param[in] acceleration The acceleration structure handle"]
+ #[doc = " @param[out] stringReturn Return string buffer"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationGetBuilder was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtAccelerationSetBuilder"]
+ #[doc = ""]
+ pub fn rtAccelerationGetBuilder(
+ acceleration: RTacceleration,
+ stringReturn: *mut *const ::std::os::raw::c_char,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 4.0. Setting a traverser is no longer necessary and will be ignored."]
+ #[doc = ""]
+ pub fn rtAccelerationSetTraverser(
+ acceleration: RTacceleration,
+ traverser: *const ::std::os::raw::c_char,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 4.0."]
+ #[doc = ""]
+ pub fn rtAccelerationGetTraverser(
+ acceleration: RTacceleration,
+ stringReturn: *mut *const ::std::os::raw::c_char,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets an acceleration structure property"]
+ #[doc = ""]
+ #[doc = " @ingroup AccelerationStructure"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationSetProperty sets a named property value for an"]
+ #[doc = " acceleration structure. Properties can be used to fine tune the way an"]
+ #[doc = " acceleration structure is built, in order to achieve faster build"]
+ #[doc = " times or better ray tracing performance. Properties are evaluated and"]
+ #[doc = " applied by the acceleration structure during build time, and"]
+ #[doc = " different builders recognize different properties. Setting a property"]
+ #[doc = " will never fail as long as \\a acceleration is a valid"]
+ #[doc = " handle. Properties that are not recognized by an acceleration"]
+ #[doc = " structure will be ignored."]
+ #[doc = ""]
+ #[doc = " The following is a list of the properties used by the individual builders:"]
+ #[doc = ""]
+ #[doc = " - \"refit\":"]
+ #[doc = " Available in: Trbvh, Bvh"]
+ #[doc = " If set to \"1\", the builder will only readjust the node bounds of the bounding"]
+ #[doc = " volume hierarchy instead of constructing it from scratch. Refit is only"]
+ #[doc = " effective if there is an initial BVH already in place, and the underlying"]
+ #[doc = " geometry has undergone relatively modest deformation. In this case, the"]
+ #[doc = " builder delivers a very fast BVH update without sacrificing too much ray"]
+ #[doc = " tracing performance. The default is \"0\"."]
+ #[doc = ""]
+ #[doc = " - \"vertex_buffer_name\":"]
+ #[doc = " Available in: Trbvh, Sbvh"]
+ #[doc = " The name of the buffer variable holding triangle vertex data. Each vertex"]
+ #[doc = " consists of 3 floats. The default is \"vertex_buffer\"."]
+ #[doc = ""]
+ #[doc = " - \"vertex_buffer_stride\":"]
+ #[doc = " Available in: Trbvh, Sbvh"]
+ #[doc = " The offset between two vertices in the vertex buffer, given in bytes. The"]
+ #[doc = " default value is \"0\", which assumes the vertices are tightly packed."]
+ #[doc = ""]
+ #[doc = " - \"index_buffer_name\":"]
+ #[doc = " Available in: Trbvh, Sbvh"]
+ #[doc = " The name of the buffer variable holding vertex index data. The entries in"]
+ #[doc = " this buffer are indices of type int, where each index refers to one entry in"]
+ #[doc = " the vertex buffer. A sequence of three indices represents one triangle. If no"]
+ #[doc = " index buffer is given, the vertices in the vertex buffer are assumed to be a"]
+ #[doc = " list of triangles, i.e. every 3 vertices in a row form a triangle. The"]
+ #[doc = " default is \"index_buffer\"."]
+ #[doc = ""]
+ #[doc = " - \"index_buffer_stride\":"]
+ #[doc = " Available in: Trbvh, Sbvh"]
+ #[doc = " The offset between two indices in the index buffer, given in bytes. The"]
+ #[doc = " default value is \"0\", which assumes the indices are tightly packed."]
+ #[doc = ""]
+ #[doc = " - \"chunk_size\":"]
+ #[doc = " Available in: Trbvh"]
+ #[doc = " Number of bytes to be used for a partitioned acceleration structure build. If"]
+ #[doc = " no chunk size is set, or set to \"0\", the chunk size is chosen automatically."]
+ #[doc = " If set to \"-1\", the chunk size is unlimited. The minimum chunk size is 64MB."]
+ #[doc = " Please note that specifying a small chunk size reduces the peak-memory"]
+ #[doc = " footprint of the Trbvh but can result in slower rendering performance."]
+ #[doc = ""]
+ #[doc = " - \" motion_steps\""]
+ #[doc = " Available in: Trbvh"]
+ #[doc = " Number of motion steps to build into an acceleration structure that contains"]
+ #[doc = " motion geometry or motion transforms. Ignored for acceleration structures"]
+ #[doc = " built over static nodes. Gives a tradeoff between device memory"]
+ #[doc = " and time: if the input geometry or transforms have many motion steps,"]
+ #[doc = " then increasing the motion steps in the acceleration structure may result in"]
+ #[doc = " faster traversal, at the cost of linear increase in memory usage."]
+ #[doc = " Default 2, and clamped >=1."]
+ #[doc = ""]
+ #[doc = " @param[in] acceleration The acceleration structure handle"]
+ #[doc = " @param[in] name String value specifying the name of the property"]
+ #[doc = " @param[in] value String value specifying the value of the property"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationSetProperty was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtAccelerationGetProperty,"]
+ #[doc = " @ref rtAccelerationSetBuilder,"]
+ #[doc = ""]
+ pub fn rtAccelerationSetProperty(
+ acceleration: RTacceleration,
+ name: *const ::std::os::raw::c_char,
+ value: *const ::std::os::raw::c_char,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Queries an acceleration structure property"]
+ #[doc = ""]
+ #[doc = " @ingroup AccelerationStructure"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationGetProperty returns the value of the acceleration"]
+ #[doc = " structure property \\a name. See @ref rtAccelerationSetProperty for a"]
+ #[doc = " list of supported properties. If the property name is not found, an"]
+ #[doc = " empty string is returned. \\a stringReturn will be set to point to"]
+ #[doc = " the returned string. The memory \\a stringReturn points to will be"]
+ #[doc = " valid until the next API call that returns a string."]
+ #[doc = ""]
+ #[doc = " @param[in] acceleration The acceleration structure handle"]
+ #[doc = " @param[in] name The name of the property to be queried"]
+ #[doc = " @param[out] stringReturn Return string buffer"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationGetProperty was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtAccelerationSetProperty,"]
+ #[doc = " @ref rtAccelerationSetBuilder,"]
+ #[doc = ""]
+ pub fn rtAccelerationGetProperty(
+ acceleration: RTacceleration,
+ name: *const ::std::os::raw::c_char,
+ stringReturn: *mut *const ::std::os::raw::c_char,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 4.0. Should not be called."]
+ #[doc = ""]
+ pub fn rtAccelerationGetDataSize(acceleration: RTacceleration, size: *mut RTsize) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 4.0. Should not be called."]
+ #[doc = ""]
+ pub fn rtAccelerationGetData(
+ acceleration: RTacceleration,
+ data: *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 4.0. Should not be called."]
+ #[doc = ""]
+ pub fn rtAccelerationSetData(
+ acceleration: RTacceleration,
+ data: *const ::std::os::raw::c_void,
+ size: RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Marks an acceleration structure as dirty"]
+ #[doc = ""]
+ #[doc = " @ingroup AccelerationStructure"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationMarkDirty sets the dirty flag for \\a acceleration."]
+ #[doc = ""]
+ #[doc = " Any acceleration structure which is marked dirty will be rebuilt on a call to one of the @ref"]
+ #[doc = " rtContextLaunch \"rtContextLaunch\" functions, and its dirty flag will be reset."]
+ #[doc = ""]
+ #[doc = " An acceleration structure which is not marked dirty will never be rebuilt, even if associated"]
+ #[doc = " groups, geometry, properties, or any other values have changed."]
+ #[doc = ""]
+ #[doc = " Initially after creation, acceleration structures are marked dirty."]
+ #[doc = ""]
+ #[doc = " @param[in] acceleration The acceleration structure handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationMarkDirty was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtAccelerationIsDirty,"]
+ #[doc = " @ref rtContextLaunch"]
+ #[doc = ""]
+ pub fn rtAccelerationMarkDirty(acceleration: RTacceleration) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the dirty flag of an acceleration structure"]
+ #[doc = ""]
+ #[doc = " @ingroup AccelerationStructure"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationIsDirty returns whether the acceleration structure is currently marked dirty."]
+ #[doc = " If the flag is set, a nonzero value will be returned in \\a *dirty. Otherwise, zero is returned."]
+ #[doc = ""]
+ #[doc = " Any acceleration structure which is marked dirty will be rebuilt on a call to one of the @ref"]
+ #[doc = " rtContextLaunch \"rtContextLaunch\" functions, and its dirty flag will be reset."]
+ #[doc = ""]
+ #[doc = " An acceleration structure which is not marked dirty will never be rebuilt, even if associated"]
+ #[doc = " groups, geometry, properties, or any other values have changed."]
+ #[doc = ""]
+ #[doc = " Initially after creation, acceleration structures are marked dirty."]
+ #[doc = ""]
+ #[doc = " @param[in] acceleration The acceleration structure handle"]
+ #[doc = " @param[out] dirty Returned dirty flag"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtAccelerationIsDirty was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtAccelerationMarkDirty,"]
+ #[doc = " @ref rtContextLaunch"]
+ #[doc = ""]
+ pub fn rtAccelerationIsDirty(
+ acceleration: RTacceleration,
+ dirty: *mut ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new geometry instance node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceCreate creates a new geometry instance node within a context. \\a context"]
+ #[doc = " specifies the target context, and should be a value returned by @ref rtContextCreate."]
+ #[doc = " Sets \\a *geometryinstance to the handle of a newly created geometry instance within \\a context."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if \\a geometryinstance is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies the rendering context of the GeometryInstance node"]
+ #[doc = " @param[out] geometryinstance New GeometryInstance node handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceDestroy,"]
+ #[doc = " @ref rtGeometryInstanceDestroy,"]
+ #[doc = " @ref rtGeometryInstanceGetContext"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceCreate(
+ context: RTcontext,
+ geometryinstance: *mut RTgeometryinstance,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a geometry instance node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceDestroy removes \\a geometryinstance from its context and deletes it. \\a"]
+ #[doc = " geometryinstance should be a value returned by @ref rtGeometryInstanceCreate. Associated"]
+ #[doc = " variables declared via @ref rtGeometryInstanceDeclareVariable are destroyed, but no child graph"]
+ #[doc = " nodes are destroyed. After the call, \\a geometryinstance is no longer a valid handle."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance Handle of the geometry instance node to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceCreate"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceDestroy(geometryinstance: RTgeometryinstance) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Checks a GeometryInstance node for internal consistency"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceValidate checks \\a geometryinstance for completeness. If \\a geomertryinstance or"]
+ #[doc = " any of the objects attached to \\a geometry are not valid, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance GeometryInstance node of a model sub-tree to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceCreate"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceValidate(geometryinstance: RTgeometryinstance) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context associated with a geometry instance node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetContext queries a geometry instance node for its associated context."]
+ #[doc = " \\a geometryinstance specifies the geometry node to query, and should be a value returned by"]
+ #[doc = " @ref rtGeometryInstanceCreate. Sets \\a *context to the context"]
+ #[doc = " associated with \\a geometryinstance."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance Specifies the geometry instance"]
+ #[doc = " @param[out] context Handle for queried context"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceGetContext"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceGetContext(
+ geometryinstance: RTgeometryinstance,
+ context: *mut RTcontext,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Attaches a Geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceSetGeometry attaches a Geometry node to a GeometryInstance."]
+ #[doc = " Only one GeometryTriangles or Geometry node can be attached to a GeometryInstance at a time."]
+ #[doc = " However, it is possible at any time to attach a different GeometryTriangles or Geometry via"]
+ #[doc = " rtGeometryInstanceSetGeometryTriangles or rtGeometryInstanceSetGeometry respectively."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance GeometryInstance node handle to attach \\a geometry to"]
+ #[doc = " @param[in] geometry Geometry handle to attach to \\a geometryinstance"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceSetGeometry was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceGetGeometry"]
+ #[doc = " @ref rtGeometryInstanceGetGeometryTriangles"]
+ #[doc = " @ref rtGeometryInstanceSetGeometryTriangles"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceSetGeometry(
+ geometryinstance: RTgeometryinstance,
+ geometry: RTgeometry,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the attached Geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetGeometry sets \\a geometry to the handle of the attached Geometry node."]
+ #[doc = " Only one GeometryTriangles or Geometry node can be attached to a GeometryInstance at a time."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance GeometryInstance node handle to query geometry"]
+ #[doc = " @param[out] geometry Handle to attached Geometry node"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetGeometry was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceCreate,"]
+ #[doc = " @ref rtGeometryInstanceDestroy,"]
+ #[doc = " @ref rtGeometryInstanceValidate,"]
+ #[doc = " @ref rtGeometryInstanceSetGeometry"]
+ #[doc = " @ref rtGeometryInstanceSetGeometryTriangles"]
+ #[doc = " @ref rtGeometryInstanceGetGeometryTriangles"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceGetGeometry(
+ geometryinstance: RTgeometryinstance,
+ geometry: *mut RTgeometry,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Attaches a Geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceSetGeometryTriangles attaches a GeometryTriangles node to a GeometryInstance."]
+ #[doc = " Only one GeometryTriangles or Geometry node can be attached to a GeometryInstance at a time."]
+ #[doc = " However, it is possible at any time to attach a different GeometryTriangles or Geometry via"]
+ #[doc = " rtGeometryInstanceSetGeometryTriangles or rtGeometryInstanceSetGeometry respectively."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance GeometryInstance node handle to attach \\a geometrytriangles to"]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles handle to attach to \\a geometryinstance"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceSetGeometryTriangles was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceGetGeometryTriangles"]
+ #[doc = " @ref rtGeometryInstanceSetGeometry"]
+ #[doc = " @ref rtGeometryInstanceGetGeometry"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceSetGeometryTriangles(
+ geometryinstance: RTgeometryinstance,
+ geometrytriangles: RTgeometrytriangles,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the attached Geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetGeometryTriangles sets \\a geometrytriangles to the handle of the attached GeometryTriangles node."]
+ #[doc = " If no GeometryTriangles node is attached or a Geometry node is attached, @ref RT_ERROR_INVALID_VALUE is returned, else @ref RT_SUCCESS."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance GeometryInstance node handle to query geometrytriangles"]
+ #[doc = " @param[out] geometrytriangles Handle to attached GeometryTriangles node"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetGeometryTriangles was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceCreate,"]
+ #[doc = " @ref rtGeometryInstanceDestroy,"]
+ #[doc = " @ref rtGeometryInstanceValidate,"]
+ #[doc = " @ref rtGeometryInstanceSetGeometryTriangles"]
+ #[doc = " @ref rtGeometryInstanceSetGeometry"]
+ #[doc = " @ref rtGeometryInstanceGetGeometry"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceGetGeometryTriangles(
+ geometryinstance: RTgeometryinstance,
+ geometrytriangles: *mut RTgeometrytriangles,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the number of materials"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceSetMaterialCount sets the number of materials \\a count that will be"]
+ #[doc = " attached to \\a geometryinstance. The number of attached materials can be changed at any"]
+ #[doc = " time. Increasing the number of materials will not modify already assigned materials."]
+ #[doc = " Decreasing the number of materials will not modify the remaining already assigned"]
+ #[doc = " materials."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance GeometryInstance node to set number of materials"]
+ #[doc = " @param[in] count Number of materials to be set"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceSetMaterialCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceGetMaterialCount"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceSetMaterialCount(
+ geometryinstance: RTgeometryinstance,
+ count: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of attached materials"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetMaterialCount returns for \\a geometryinstance the number of attached"]
+ #[doc = " Material nodes \\a count. The number of materials can be set with @ref"]
+ #[doc = " rtGeometryInstanceSetMaterialCount."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance GeometryInstance node to query from the number of materials"]
+ #[doc = " @param[out] count Number of attached materials"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetMaterialCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceSetMaterialCount"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceGetMaterialCount(
+ geometryinstance: RTgeometryinstance,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets a material"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceSetMaterial attaches \\a material to \\a geometryinstance at position \\a index"]
+ #[doc = " in its internal Material node list. \\a index must be in the range \\a 0 to @ref"]
+ #[doc = " rtGeometryInstanceGetMaterialCount \\a - 1."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance GeometryInstance node for which to set a material"]
+ #[doc = " @param[in] index Index into the material list"]
+ #[doc = " @param[in] material Material handle to attach to \\a geometryinstance"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceSetMaterial was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceGetMaterialCount,"]
+ #[doc = " @ref rtGeometryInstanceSetMaterialCount"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceSetMaterial(
+ geometryinstance: RTgeometryinstance,
+ index: ::std::os::raw::c_uint,
+ material: RTmaterial,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a material handle"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetMaterial returns handle \\a material for the Material node at position"]
+ #[doc = " \\a index in the material list of \\a geometryinstance. Returns @ref RT_ERROR_INVALID_VALUE if \\a"]
+ #[doc = " index is invalid."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance GeometryInstance node handle to query material"]
+ #[doc = " @param[in] index Index of material"]
+ #[doc = " @param[out] material Handle to material"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetMaterial was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceGetMaterialCount,"]
+ #[doc = " @ref rtGeometryInstanceSetMaterial"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceGetMaterial(
+ geometryinstance: RTgeometryinstance,
+ index: ::std::os::raw::c_uint,
+ material: *mut RTmaterial,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a new named variable associated with a geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceDeclareVariable declares a new variable associated with a geometry"]
+ #[doc = " instance node. \\a geometryinstance specifies the target geometry node, and should be a value"]
+ #[doc = " returned by @ref rtGeometryInstanceCreate. \\a name specifies the name of the variable, and"]
+ #[doc = " should be a \\a NULL-terminated string. If there is currently no variable associated with \\a"]
+ #[doc = " geometryinstance named \\a name, a new variable named \\a name will be created and associated with"]
+ #[doc = " \\a geometryinstance. After the call, \\a *v will be set to the handle of the newly-created"]
+ #[doc = " variable. Otherwise, \\a *v will be set to \\a NULL. After declaration, the variable can be"]
+ #[doc = " queried with @ref rtGeometryInstanceQueryVariable or @ref rtGeometryInstanceGetVariable. A"]
+ #[doc = " declared variable does not have a type until its value is set with one of the @ref rtVariableSet"]
+ #[doc = " functions. Once a variable is set, its type cannot be changed anymore."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance Specifies the associated GeometryInstance node"]
+ #[doc = " @param[in] name The name that identifies the variable"]
+ #[doc = " @param[out] v Returns a handle to a newly declared variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceDeclareVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref Variables,"]
+ #[doc = " @ref rtGeometryInstanceQueryVariable,"]
+ #[doc = " @ref rtGeometryInstanceGetVariable,"]
+ #[doc = " @ref rtGeometryInstanceRemoveVariable"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceDeclareVariable(
+ geometryinstance: RTgeometryinstance,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a handle to a named variable of a geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceQueryVariable queries the handle of a geometry instance node's named"]
+ #[doc = " variable. \\a geometryinstance specifies the target geometry instance node, as returned by"]
+ #[doc = " @ref rtGeometryInstanceCreate. \\a name specifies the name of the variable, and should be a \\a"]
+ #[doc = " \\a NULL -terminated string. If \\a name is the name of a variable attached to \\a geometryinstance,"]
+ #[doc = " returns a handle to that variable in \\a *v, otherwise \\a NULL. Geometry instance variables have"]
+ #[doc = " to be declared with @ref rtGeometryInstanceDeclareVariable before they can be queried."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance The GeometryInstance node to query from a variable"]
+ #[doc = " @param[in] name The name that identifies the variable to be queried"]
+ #[doc = " @param[out] v Returns the named variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceQueryVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceDeclareVariable,"]
+ #[doc = " @ref rtGeometryInstanceRemoveVariable,"]
+ #[doc = " @ref rtGeometryInstanceGetVariableCount,"]
+ #[doc = " @ref rtGeometryInstanceGetVariable"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceQueryVariable(
+ geometryinstance: RTgeometryinstance,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Removes a named variable from a geometry instance node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceRemoveVariable removes a named variable from a geometry instance. The"]
+ #[doc = " target geometry instance is specified by \\a geometryinstance, which should be a value returned"]
+ #[doc = " by @ref rtGeometryInstanceCreate. The variable to be removed is specified by \\a v, which should"]
+ #[doc = " be a value returned by @ref rtGeometryInstanceDeclareVariable. Once a variable has been removed"]
+ #[doc = " from this geometry instance, another variable with the same name as the removed variable may be"]
+ #[doc = " declared."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance The GeometryInstance node from which to remove a variable"]
+ #[doc = " @param[in] v The variable to be removed"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceRemoveVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextRemoveVariable,"]
+ #[doc = " @ref rtGeometryInstanceDeclareVariable"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceRemoveVariable(
+ geometryinstance: RTgeometryinstance,
+ v: RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of attached variables"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetVariableCount queries the number of variables attached to a geometry instance."]
+ #[doc = " \\a geometryinstance specifies the geometry instance, and should be a value returned by @ref rtGeometryInstanceCreate."]
+ #[doc = " After the call, the number of variables attached to \\a geometryinstance is returned to \\a *count."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance The GeometryInstance node to query from the number of attached variables"]
+ #[doc = " @param[out] count Returns the number of attached variables"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetVariableCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryInstanceGetVariableCount,"]
+ #[doc = " @ref rtGeometryInstanceDeclareVariable,"]
+ #[doc = " @ref rtGeometryInstanceRemoveVariable"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceGetVariableCount(
+ geometryinstance: RTgeometryinstance,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a handle to an indexed variable of a geometry instance node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryInstance"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetVariable queries the handle of a geometry instance's indexed variable."]
+ #[doc = " \\a geometryinstance specifies the target geometry instance and should be a value returned by"]
+ #[doc = " @ref rtGeometryInstanceCreate. \\a index specifies the index of the variable, and should be a"]
+ #[doc = " value less than @ref rtGeometryInstanceGetVariableCount. If \\a index is the index of a variable"]
+ #[doc = " attached to \\a geometryinstance, returns a handle to that variable in \\a *v, and \\a NULL"]
+ #[doc = " otherwise. \\a *v must be declared first with @ref rtGeometryInstanceDeclareVariable before it"]
+ #[doc = " can be queried."]
+ #[doc = ""]
+ #[doc = " @param[in] geometryinstance The GeometryInstance node from which to query a variable"]
+ #[doc = " @param[in] index The index that identifies the variable to be queried"]
+ #[doc = " @param[out] v Returns handle to indexed variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryInstanceGetVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryDeclareVariable,"]
+ #[doc = " @ref rtGeometryGetVariableCount,"]
+ #[doc = " @ref rtGeometryRemoveVariable,"]
+ #[doc = " @ref rtGeometryQueryVariable"]
+ #[doc = ""]
+ pub fn rtGeometryInstanceGetVariable(
+ geometryinstance: RTgeometryinstance,
+ index: ::std::os::raw::c_uint,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryCreate creates a new geometry node within a context. \\a context"]
+ #[doc = " specifies the target context, and should be a value returned by @ref rtContextCreate."]
+ #[doc = " Sets \\a *geometry to the handle of a newly created geometry within \\a context."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if \\a geometry is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies the rendering context of the Geometry node"]
+ #[doc = " @param[out] geometry New Geometry node handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryDestroy,"]
+ #[doc = " @ref rtGeometrySetBoundingBoxProgram,"]
+ #[doc = " @ref rtGeometrySetIntersectionProgram"]
+ #[doc = ""]
+ pub fn rtGeometryCreate(context: RTcontext, geometry: *mut RTgeometry) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryDestroy removes \\a geometry from its context and deletes it. \\a geometry should"]
+ #[doc = " be a value returned by @ref rtGeometryCreate. Associated variables declared via"]
+ #[doc = " @ref rtGeometryDeclareVariable are destroyed, but no child graph nodes are destroyed. After the"]
+ #[doc = " call, \\a geometry is no longer a valid handle."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Handle of the geometry node to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryCreate,"]
+ #[doc = " @ref rtGeometrySetPrimitiveCount,"]
+ #[doc = " @ref rtGeometryGetPrimitiveCount"]
+ #[doc = ""]
+ pub fn rtGeometryDestroy(geometry: RTgeometry) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Validates the geometry nodes integrity"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryValidate checks \\a geometry for completeness. If \\a geometry or any of the"]
+ #[doc = " objects attached to \\a geometry are not valid, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The geometry node to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextValidate"]
+ #[doc = ""]
+ pub fn rtGeometryValidate(geometry: RTgeometry) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context associated with a geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetContext queries a geometry node for its associated context. \\a geometry"]
+ #[doc = " specifies the geometry node to query, and should be a value returned by @ref"]
+ #[doc = " rtGeometryCreate. Sets \\a *context to the context associated with \\a geometry."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Specifies the geometry to query"]
+ #[doc = " @param[out] context The context associated with \\a geometry"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryCreate"]
+ #[doc = ""]
+ pub fn rtGeometryGetContext(geometry: RTgeometry, context: *mut RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the number of primitives"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetPrimitiveCount sets the number of primitives \\a primitiveCount in \\a geometry."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The geometry node for which to set the number of primitives"]
+ #[doc = " @param[in] primitiveCount The number of primitives"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetPrimitiveCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetPrimitiveCount"]
+ #[doc = ""]
+ pub fn rtGeometrySetPrimitiveCount(
+ geometry: RTgeometry,
+ primitiveCount: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of primitives"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetPrimitiveCount returns for \\a geometry the number of set primitives. The"]
+ #[doc = " number of primitvies can be set with @ref rtGeometryGetPrimitiveCount."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Geometry node to query from the number of primitives"]
+ #[doc = " @param[out] primitiveCount Number of primitives"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetPrimitiveCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometrySetPrimitiveCount"]
+ #[doc = ""]
+ pub fn rtGeometryGetPrimitiveCount(
+ geometry: RTgeometry,
+ primitiveCount: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the primitive index offset"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetPrimitiveIndexOffset sets the primitive index offset"]
+ #[doc = " \\a indexOffset in \\a geometry. In the past, a @ref Geometry object's primitive"]
+ #[doc = " index range always started at zero (i.e., a Geometry with \\a N primitives would"]
+ #[doc = " have a primitive index range of [0,N-1]). The index offset is used to allow"]
+ #[doc = " @ref Geometry objects to have primitive index ranges starting at non-zero"]
+ #[doc = " positions (i.e., a Geometry with \\a N primitives and an index offset of \\a M"]
+ #[doc = " would have a primitive index range of [M,M+N-1]). This feature enables the"]
+ #[doc = " sharing of vertex index buffers between multiple @ref Geometry objects."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The geometry node for which to set the primitive index offset"]
+ #[doc = " @param[in] indexOffset The primitive index offset"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetPrimitiveIndexOffset was introduced in OptiX 3.5."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetPrimitiveIndexOffset"]
+ #[doc = ""]
+ pub fn rtGeometrySetPrimitiveIndexOffset(
+ geometry: RTgeometry,
+ indexOffset: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the current primitive index offset"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetPrimitiveIndexOffset returns for \\a geometry the primitive index offset. The"]
+ #[doc = " primitive index offset can be set with @ref rtGeometrySetPrimitiveIndexOffset."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Geometry node to query for the primitive index offset"]
+ #[doc = " @param[out] indexOffset Primitive index offset"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetPrimitiveIndexOffset was introduced in OptiX 3.5."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometrySetPrimitiveIndexOffset"]
+ #[doc = ""]
+ pub fn rtGeometryGetPrimitiveIndexOffset(
+ geometry: RTgeometry,
+ indexOffset: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the motion time range for a Geometry node."]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " Sets the inclusive motion time range [timeBegin, timeEnd] for \\a geometry,"]
+ #[doc = " where timeBegin <= timeEnd. The default time range is [0.0, 1.0]. The"]
+ #[doc = " time range has no effect unless @ref rtGeometrySetMotionSteps is"]
+ #[doc = " called, in which case the time steps uniformly divide the time range. See"]
+ #[doc = " @ref rtGeometrySetMotionSteps for additional requirements on the bounds"]
+ #[doc = " program."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Geometry node handle"]
+ #[doc = " @param[out] timeBegin Beginning time value of range"]
+ #[doc = " @param[out] timeEnd Ending time value of range"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetMotionRange was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetMotionRange"]
+ #[doc = " @ref rtGeometrySetMotionBorderMode"]
+ #[doc = " @ref rtGeometrySetMotionSteps"]
+ #[doc = ""]
+ pub fn rtGeometrySetMotionRange(geometry: RTgeometry, timeBegin: f32, timeEnd: f32)
+ -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the motion time range associated with a Geometry node."]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryGetMotionRange returns the motion time range associated with"]
+ #[doc = " \\a geometry from a previous call to @ref rtGeometrySetMotionRange, or the"]
+ #[doc = " default values of [0.0, 1.0]."]
+ #[doc = ""]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Geometry node handle"]
+ #[doc = " @param[out] timeBegin Beginning time value of range"]
+ #[doc = " @param[out] timeEnd Ending time value of range"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetMotionRange was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometrySetMotionRange"]
+ #[doc = " @ref rtGeometryGetMotionBorderMode"]
+ #[doc = " @ref rtGeometryGetMotionSteps"]
+ #[doc = ""]
+ pub fn rtGeometryGetMotionRange(
+ geometry: RTgeometry,
+ timeBegin: *mut f32,
+ timeEnd: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the motion border modes of a Geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometrySetMotionBorderMode sets the behavior of \\a geometry"]
+ #[doc = " outside its motion time range. Options are @ref RT_MOTIONBORDERMODE_CLAMP"]
+ #[doc = " or @ref RT_MOTIONBORDERMODE_VANISH. See @ref rtTransformSetMotionBorderMode"]
+ #[doc = " for details."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Geometry node handle"]
+ #[doc = " @param[in] beginMode Motion border mode at motion range begin"]
+ #[doc = " @param[in] endMode Motion border mode at motion range end"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetMotionBorderMode was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetMotionBorderMode"]
+ #[doc = " @ref rtGeometrySetMotionRange"]
+ #[doc = " @ref rtGeometrySetMotionSteps"]
+ #[doc = ""]
+ pub fn rtGeometrySetMotionBorderMode(
+ geometry: RTgeometry,
+ beginMode: RTmotionbordermode,
+ endMode: RTmotionbordermode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the motion border modes of a Geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryGetMotionBorderMode returns the motion border modes"]
+ #[doc = " for the time range associated with \\a geometry."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Geometry node handle"]
+ #[doc = " @param[out] beginMode Motion border mode at motion range begin"]
+ #[doc = " @param[out] endMode Motion border mode at motion range end"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetMotionBorderMode was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometrySetMotionBorderMode"]
+ #[doc = " @ref rtGeometryGetMotionRange"]
+ #[doc = " @ref rtGeometryGetMotionSteps"]
+ #[doc = ""]
+ pub fn rtGeometryGetMotionBorderMode(
+ geometry: RTgeometry,
+ beginMode: *mut RTmotionbordermode,
+ endMode: *mut RTmotionbordermode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Specifies the number of motion steps associated with a Geometry"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometrySetMotionSteps sets the number of motion steps associated"]
+ #[doc = " with \\a geometry. If the value of \\a n is greater than 1, then \\a geometry"]
+ #[doc = " must have an associated bounding box program that takes both a primitive index"]
+ #[doc = " and a motion index as arguments, and computes an aabb at the motion index."]
+ #[doc = " See @ref rtGeometrySetBoundingBoxProgram."]
+ #[doc = ""]
+ #[doc = " Note that all Geometry has at least one 1 motion step (the default), and"]
+ #[doc = " Geometry that linearly moves has 2 motion steps."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Geometry node handle"]
+ #[doc = " @param[in] n Number of motion steps >= 1"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetMotionSteps was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetMotionSteps"]
+ #[doc = " @ref rtGeometrySetMotionBorderMode"]
+ #[doc = " @ref rtGeometrySetMotionRange"]
+ #[doc = ""]
+ pub fn rtGeometrySetMotionSteps(geometry: RTgeometry, n: ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of motion steps associated with a Geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryGetMotionSteps returns in \\a n the number of motion steps"]
+ #[doc = " associated with \\a geometry. Note that the default value is 1, not 0,"]
+ #[doc = " for geometry without motion."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Geometry node handle"]
+ #[doc = " @param[out] n Number of motion steps n >= 1"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetMotionSteps was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetMotionSteps"]
+ #[doc = " @ref rtGeometrySetMotionBorderMode"]
+ #[doc = " @ref rtGeometrySetMotionRange"]
+ #[doc = ""]
+ pub fn rtGeometryGetMotionSteps(
+ geometry: RTgeometry,
+ n: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the bounding box program"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetBoundingBoxProgram sets for \\a geometry the \\a program that computes an axis aligned bounding box"]
+ #[doc = " for each attached primitive to \\a geometry. RTprogram's can be either generated with @ref rtProgramCreateFromPTXFile or"]
+ #[doc = " @ref rtProgramCreateFromPTXString. A bounding box program is mandatory for every geometry node."]
+ #[doc = ""]
+ #[doc = " If \\a geometry has more than one motion step, set using @ref rtGeometrySetMotionSteps, then the bounding"]
+ #[doc = " box program must compute a bounding box per primitive and per motion step."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The geometry node for which to set the bounding box program"]
+ #[doc = " @param[in] program Handle to the bounding box program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetBoundingBoxProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetBoundingBoxProgram,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramCreateFromPTXString"]
+ #[doc = ""]
+ pub fn rtGeometrySetBoundingBoxProgram(geometry: RTgeometry, program: RTprogram) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the attached bounding box program"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetBoundingBoxProgram returns the handle \\a program for"]
+ #[doc = " the attached bounding box program of \\a geometry."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Geometry node handle from which to query program"]
+ #[doc = " @param[out] program Handle to attached bounding box program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetBoundingBoxProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometrySetBoundingBoxProgram"]
+ #[doc = ""]
+ pub fn rtGeometryGetBoundingBoxProgram(
+ geometry: RTgeometry,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the intersection program"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetIntersectionProgram sets for \\a geometry the \\a program that performs ray primitive intersections."]
+ #[doc = " RTprogram's can be either generated with @ref rtProgramCreateFromPTXFile or @ref rtProgramCreateFromPTXString. An intersection"]
+ #[doc = " program is mandatory for every geometry node."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The geometry node for which to set the intersection program"]
+ #[doc = " @param[in] program A handle to the ray primitive intersection program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetIntersectionProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetIntersectionProgram,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramCreateFromPTXString"]
+ #[doc = ""]
+ pub fn rtGeometrySetIntersectionProgram(geometry: RTgeometry, program: RTprogram) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the attached intersection program"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetIntersectionProgram returns in \\a program a handle of the attached intersection program."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Geometry node handle to query program"]
+ #[doc = " @param[out] program Handle to attached intersection program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetIntersectionProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometrySetIntersectionProgram,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramCreateFromPTXString"]
+ #[doc = ""]
+ pub fn rtGeometryGetIntersectionProgram(
+ geometry: RTgeometry,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets geometry flags"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " See @ref rtGeometryTrianglesSetFlagsPerMaterial for a description of the behavior of the"]
+ #[doc = " various flags."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The group handle"]
+ #[doc = " @param[out] flags Flags for the given geometry group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometrySetFlags was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetFlagsPerMaterial,"]
+ #[doc = " @ref rtTrace"]
+ pub fn rtGeometrySetFlags(geometry: RTgeometry, flags: RTgeometryflags) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Retrieves geometry flags"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " See @ref rtGeometrySetFlags for details."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The group handle"]
+ #[doc = " @param[out] flags Flags for the given geometry group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetFlags was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetFlagsPerMaterial,"]
+ #[doc = " @ref rtTrace"]
+ pub fn rtGeometryGetFlags(geometry: RTgeometry, flags: *mut RTgeometryflags) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 4.0. Calling this function has no effect."]
+ #[doc = ""]
+ pub fn rtGeometryMarkDirty(geometry: RTgeometry) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 4.0. Calling this function has no effect."]
+ #[doc = ""]
+ pub fn rtGeometryIsDirty(geometry: RTgeometry, dirty: *mut ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a new named variable associated with a geometry instance"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryDeclareVariable declares a new variable associated with a geometry node. \\a"]
+ #[doc = " geometry specifies the target geometry node, and should be a value returned by @ref"]
+ #[doc = " rtGeometryCreate. \\a name specifies the name of the variable, and should be a \\a NULL-terminated"]
+ #[doc = " string. If there is currently no variable associated with \\a geometry named \\a name, a new"]
+ #[doc = " variable named \\a name will be created and associated with \\a geometry. Returns the handle of"]
+ #[doc = " the newly-created variable in \\a *v or \\a NULL otherwise. After declaration, the variable can"]
+ #[doc = " be queried with @ref rtGeometryQueryVariable or @ref rtGeometryGetVariable. A declared variable"]
+ #[doc = " does not have a type until its value is set with one of the @ref rtVariableSet functions. Once a"]
+ #[doc = " variable is set, its type cannot be changed anymore."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry Specifies the associated Geometry node"]
+ #[doc = " @param[in] name The name that identifies the variable"]
+ #[doc = " @param[out] v Returns a handle to a newly declared variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_REDECLARED"]
+ #[doc = " - @ref RT_ERROR_ILLEGAL_SYMBOL"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryDeclareVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref Variables,"]
+ #[doc = " @ref rtGeometryQueryVariable,"]
+ #[doc = " @ref rtGeometryGetVariable,"]
+ #[doc = " @ref rtGeometryRemoveVariable"]
+ #[doc = ""]
+ pub fn rtGeometryDeclareVariable(
+ geometry: RTgeometry,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a handle to a named variable of a geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryQueryVariable queries the handle of a geometry node's named variable."]
+ #[doc = " \\a geometry specifies the target geometry node and should be a value returned"]
+ #[doc = " by @ref rtGeometryCreate. \\a name specifies the name of the variable, and should"]
+ #[doc = " be a \\a NULL-terminated string. If \\a name is the name of a variable attached to"]
+ #[doc = " \\a geometry, returns a handle to that variable in \\a *v or \\a NULL otherwise. Geometry"]
+ #[doc = " variables must be declared with @ref rtGeometryDeclareVariable before they can be queried."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The geometry node to query from a variable"]
+ #[doc = " @param[in] name The name that identifies the variable to be queried"]
+ #[doc = " @param[out] v Returns the named variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryQueryVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryDeclareVariable,"]
+ #[doc = " @ref rtGeometryRemoveVariable,"]
+ #[doc = " @ref rtGeometryGetVariableCount,"]
+ #[doc = " @ref rtGeometryGetVariable"]
+ #[doc = ""]
+ pub fn rtGeometryQueryVariable(
+ geometry: RTgeometry,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Removes a named variable from a geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryRemoveVariable removes a named variable from a geometry node. The"]
+ #[doc = " target geometry is specified by \\a geometry, which should be a value"]
+ #[doc = " returned by @ref rtGeometryCreate. The variable to remove is specified by"]
+ #[doc = " \\a v, which should be a value returned by @ref rtGeometryDeclareVariable."]
+ #[doc = " Once a variable has been removed from this geometry node, another variable with the"]
+ #[doc = " same name as the removed variable may be declared."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The geometry node from which to remove a variable"]
+ #[doc = " @param[in] v The variable to be removed"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryRemoveVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextRemoveVariable"]
+ #[doc = ""]
+ pub fn rtGeometryRemoveVariable(geometry: RTgeometry, v: RTvariable) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of attached variables"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetVariableCount queries the number of variables attached to a geometry node."]
+ #[doc = " \\a geometry specifies the geometry node, and should be a value returned by @ref rtGeometryCreate."]
+ #[doc = " After the call, the number of variables attached to \\a geometry is returned to \\a *count."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The Geometry node to query from the number of attached variables"]
+ #[doc = " @param[out] count Returns the number of attached variables"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetVariableCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryGetVariableCount,"]
+ #[doc = " @ref rtGeometryDeclareVariable,"]
+ #[doc = " @ref rtGeometryRemoveVariable"]
+ #[doc = ""]
+ pub fn rtGeometryGetVariableCount(
+ geometry: RTgeometry,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a handle to an indexed variable of a geometry node"]
+ #[doc = ""]
+ #[doc = " @ingroup Geometry"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetVariable queries the handle of a geometry node's indexed variable."]
+ #[doc = " \\a geometry specifies the target geometry and should be a value returned"]
+ #[doc = " by @ref rtGeometryCreate. \\a index specifies the index of the variable, and"]
+ #[doc = " should be a value less than @ref rtGeometryGetVariableCount. If \\a index is the"]
+ #[doc = " index of a variable attached to \\a geometry, returns its handle in \\a *v or \\a NULL otherwise."]
+ #[doc = " \\a *v must be declared first with @ref rtGeometryDeclareVariable before it can be queried."]
+ #[doc = ""]
+ #[doc = " @param[in] geometry The geometry node from which to query a variable"]
+ #[doc = " @param[in] index The index that identifies the variable to be queried"]
+ #[doc = " @param[out] v Returns handle to indexed variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryGetVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryDeclareVariable,"]
+ #[doc = " @ref rtGeometryGetVariableCount,"]
+ #[doc = " @ref rtGeometryRemoveVariable,"]
+ #[doc = " @ref rtGeometryQueryVariable"]
+ #[doc = ""]
+ pub fn rtGeometryGetVariable(
+ geometry: RTgeometry,
+ index: ::std::os::raw::c_uint,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new GeometryTriangles node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesCreate creates a new GeometryTriangles node within a context. \\a context"]
+ #[doc = " specifies the target context, and should be a value returned by @ref rtContextCreate."]
+ #[doc = " Sets \\a *geometrytriangles to the handle of a newly created GeometryTriangles node within \\a context."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if \\a geometrytriangles is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies the rendering context of the GeometryTriangles node"]
+ #[doc = " @param[out] geometrytriangles New GeometryTriangles node handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesCreate was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesDestroy,"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesCreate(
+ context: RTcontext,
+ geometrytriangles: *mut RTgeometrytriangles,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a GeometryTriangles node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesDestroy removes \\a geometrytriangles from its context and deletes it. \\a geometrytriangles should"]
+ #[doc = " be a value returned by @ref rtGeometryTrianglesCreate. After the call, \\a geometrytriangles is no longer a valid handle."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles Handle of the GeometryTriangles node to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesDestroy was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesCreate,"]
+ #[doc = " @ref rtGeometryTrianglesSetPrimitiveCount,"]
+ #[doc = " @ref rtGeometryTrianglesGetPrimitiveCount"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesDestroy(geometrytriangles: RTgeometrytriangles) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Validates the GeometryTriangles nodes integrity"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesValidate checks \\a geometrytriangles for completeness. If \\a geometrytriangles or any of the"]
+ #[doc = " objects attached to \\a geometrytriangles are not valid, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles The GeometryTriangles node to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesValidate was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextValidate"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesValidate(geometrytriangles: RTgeometrytriangles) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context associated with a GeometryTriangles node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetContext queries a GeometryTriangles node for its associated context. \\a geometrytriangles"]
+ #[doc = " specifies the GeometryTriangles node to query, and should be a value returned by @ref"]
+ #[doc = " rtGeometryTrianglesCreate. Sets \\a *context to the context associated with \\a geometrytriangles."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles Specifies the GeometryTriangles to query"]
+ #[doc = " @param[out] context The context associated with \\a geometrytriangles"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetContext was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesCreate"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetContext(
+ geometrytriangles: RTgeometrytriangles,
+ context: *mut RTcontext,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the primitive index offset"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetPrimitiveIndexOffset sets the primitive index offset"]
+ #[doc = " \\a indexOffset in \\a geometrytriangles."]
+ #[doc = " With an offset of zero, a GeometryTriangles with \\a N triangles has a primitive index range of [0,N-1]."]
+ #[doc = " The index offset is used to allow GeometryTriangles objects to have primitive index ranges starting at non-zero"]
+ #[doc = " positions (i.e., a GeometryTriangles with \\a N triangles and an index offset of \\a M"]
+ #[doc = " has a primitive index range of [M,M+N-1])."]
+ #[doc = " Note that this offset only affects the primitive index that is reported in case of an intersection and does not"]
+ #[doc = " affect the input data that is specified via @ref rtGeometryTrianglesSetVertices or @ref"]
+ #[doc = " rtGeometryTrianglesSetTriangleIndices."]
+ #[doc = " This feature enables the packing of multiple Geometries or GeometryTriangles into a single buffer."]
+ #[doc = " While the same effect could be reached via a user variable, it is recommended to specify the offset via"]
+ #[doc = " @ref rtGeometryTrianglesSetPrimitiveIndexOffset."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles The GeometryTriangles node for which to set the primitive index offset"]
+ #[doc = " @param[in] indexOffset The primitive index offset"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetPrimitiveIndexOffset was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometrySetPrimitiveIndexOffset"]
+ #[doc = " @ref rtGeometryTrianglesGetPrimitiveIndexOffset"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetPrimitiveIndexOffset(
+ geometrytriangles: RTgeometrytriangles,
+ indexOffset: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the current primitive index offset"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetPrimitiveIndexOffset returns for \\a geometrytriangles the primitive index offset. The"]
+ #[doc = " primitive index offset can be set with @ref rtGeometryTrianglesSetPrimitiveIndexOffset."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node to query for the primitive index offset"]
+ #[doc = " @param[out] indexOffset Primitive index offset"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetPrimitiveIndexOffset was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetPrimitiveIndexOffset"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetPrimitiveIndexOffset(
+ geometrytriangles: RTgeometrytriangles,
+ indexOffset: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets a pre-transform matrix"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetPreTransformMatrix can be used to bake a transformation for a mesh."]
+ #[doc = " Vertices of triangles are multiplied by the user-specified 3x4 matrix before the acceleration build."]
+ #[doc = " Note that the input triangle data stays untouched (set via @ref rtGeometryTrianglesSetVertices)."]
+ #[doc = " Triangle intersection uses transformed triangles."]
+ #[doc = " The 3x4 matrix is expected to be in a row-major data layout, use the transpose option if \\a matrix is in a column-major data layout."]
+ #[doc = " Use rtGeometryTrianglesSetPreTransformMatrix(geometrytriangles, false, 0); to unset a previously set matrix."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles Geometry node to query from the number of primitives"]
+ #[doc = " @param[in] transpose If the input matrix is column-major and needs to be transposed before usage"]
+ #[doc = " @param[in] matrix The 3x4 matrix that is used to transform the vertices"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetPreTransformMatrix was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetPreTransformMatrix"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetPreTransformMatrix(
+ geometrytriangles: RTgeometrytriangles,
+ transpose: ::std::os::raw::c_int,
+ matrix: *const f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets a pre-transform matrix"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetPreTransformMatrix returns a previously set 3x4 matrix or the 'identity' matrix (with ones in the main diagonal of the 3x3 submatrix) if no matrix is set."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles Geometry node to query from the number of primitives"]
+ #[doc = " @param[in] transpose Set to true if the output matrix is expected to be column-major rather than row-major"]
+ #[doc = " @param[out] matrix The 3x4 matrix that is used to transform the vertices"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetPreTransformMatrix was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetPreTransformMatrix"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetPreTransformMatrix(
+ geometrytriangles: RTgeometrytriangles,
+ transpose: ::std::os::raw::c_int,
+ matrix: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the number of triangles"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetPrimitiveCount sets the number of triangles \\a triangleCount in \\a geometrytriangles."]
+ #[doc = " A triangle geometry is either a triangle soup for which every three vertices stored in the vertex buffer form a triangle,"]
+ #[doc = " or indexed triangles are used for which three indices reference different vertices."]
+ #[doc = " In the latter case, an index buffer must be set (@ref rtGeometryTrianglesSetTriangleIndices)."]
+ #[doc = " The vertices of the triangles are specified via one of the SetVertices functions."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node for which to set the number of triangles"]
+ #[doc = " @param[in] triangleCount Number of triangles"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetPrimitiveCount was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetPrimitiveCount"]
+ #[doc = " @ref rtGeometrySetPrimitiveCount"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetPrimitiveCount(
+ geometrytriangles: RTgeometrytriangles,
+ triangleCount: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of triangles"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetPrimitiveCount returns the number of set triangles for \\a geometrytriangles. The"]
+ #[doc = " number of primitives can be set with @ref rtGeometryTrianglesSetPrimitiveCount."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node to query from the number of primitives"]
+ #[doc = " @param[out] triangleCount Number of triangles"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetPrimitiveCount was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetPrimitiveCount"]
+ #[doc = " @ref rtGeometryGetPrimitiveCount"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetPrimitiveCount(
+ geometrytriangles: RTgeometrytriangles,
+ triangleCount: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the index buffer of indexed triangles"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetTriangleIndices is used to set the index buffer for indexed triangles."]
+ #[doc = " Triplets of indices from buffer \\a indexBuffer index vertices to form triangles."]
+ #[doc = " If the buffer is set, it is assumed that the geometry is given as indexed triangles."]
+ #[doc = " If the index buffer is not set, it is assumed that the geometry is given as a triangle soup."]
+ #[doc = " A previously set index buffer can be unset by passing NULL as \\a indexBuffer parameter, e.g., rtGeometryTrianglesSetTriangleIndices( geometrytriangles, NULL, 0, 0, RT_FORMAT_UNSIGNED_INT3);"]
+ #[doc = " Buffer \\a indexBuffer is expected to hold 3 times \\a triangleCount indices (see @ref rtGeometryTrianglesSetPrimitiveCount)."]
+ #[doc = " Parameter \\a indexBufferByteOffset can be used to specify a byte offset to the first index in buffer \\a indexBuffer."]
+ #[doc = " Parameter \\a triIndicesByteStride sets the stride in bytes between triplets of indices. There mustn't be any spacing between indices within a triplet, spacing is only supported between triplets."]
+ #[doc = " Parameter \\a triIndicesFormat must be one of the following: RT_FORMAT_UNSIGNED_INT3, RT_FORMAT_UNSIGNED_SHORT3."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node to query for the primitive index offset"]
+ #[doc = " @param[in] indexBuffer Buffer that holds the indices into the vertex buffer of the triangles"]
+ #[doc = " @param[in] indexBufferByteOffset Offset in bytes to the first index in buffer indexBuffer"]
+ #[doc = " @param[in] triIndicesByteStride Stride in bytes between triplets of indices"]
+ #[doc = " @param[in] triIndicesFormat Format of the triplet of indices to index the vertices of a triangle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetTriangleIndices was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetVertices"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetTriangleIndices(
+ geometrytriangles: RTgeometrytriangles,
+ indexBuffer: RTbuffer,
+ indexBufferByteOffset: RTsize,
+ triIndicesByteStride: RTsize,
+ triIndicesFormat: RTformat,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the vertex buffer of a triangle soup"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetVertices interprets the buffer \\a vertexBuffer as the vertices of triangles of the GeometryTriangles \\a geometrytriangles."]
+ #[doc = " The number of vertices is set as \\a vertexCount."]
+ #[doc = " If an index buffer is set, it is assumed that the geometry is given as indexed triangles."]
+ #[doc = " If the index buffer is not set, it is assumed that the geometry is given as a triangle soup and \\a vertexCount must be 3 times triangleCount (see @ref rtGeometryTrianglesSetPrimitiveCount)."]
+ #[doc = " Buffer \\a vertexBuffer is expected to hold \\a vertexCount vertices."]
+ #[doc = " Parameter \\a vertexBufferByteOffset can be used to specify a byte offset to the position of the first vertex in buffer \\a vertexBuffer."]
+ #[doc = " Parameter \\a vertexByteStride sets the stride in bytes between vertices."]
+ #[doc = " Parameter \\a positionFormat must be one of the following: RT_FORMAT_FLOAT3, RT_FORMAT_HALF3, RT_FORMAT_FLOAT2, RT_FORMAT_HALF2."]
+ #[doc = " In case of formats RT_FORMAT_FLOAT2 or RT_FORMAT_HALF2 the third component is assumed to be zero, which can be useful for planar geometry."]
+ #[doc = " Calling this function overrides any previous call to any of the set(Motion)Vertices functions."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node to query for the primitive index offset"]
+ #[doc = " @param[in] vertexCount Number of vertices of the geometry"]
+ #[doc = " @param[in] vertexBuffer Buffer that holds the vertices of the triangles"]
+ #[doc = " @param[in] vertexBufferByteOffset Offset in bytes to the first vertex in buffer vertexBuffer"]
+ #[doc = " @param[in] vertexByteStride Stride in bytes between vertices"]
+ #[doc = " @param[in] positionFormat Format of the position attribute of a vertex"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetVertices was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetTriangleIndices"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionVertices"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetVertices(
+ geometrytriangles: RTgeometrytriangles,
+ vertexCount: ::std::os::raw::c_uint,
+ vertexBuffer: RTbuffer,
+ vertexBufferByteOffset: RTsize,
+ vertexByteStride: RTsize,
+ positionFormat: RTformat,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the vertex buffer of motion triangles"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetMotionVertices interprets the buffer \\a vertexBuffer as the vertices of triangles of the GeometryTriangles \\a geometrytriangles."]
+ #[doc = " The number of triangles for one motion step is set as \\a vertexCount."]
+ #[doc = " Similar to it's non-motion counterpart, \\a vertexCount must be 3 times \\a triangleCount if no index buffer is set."]
+ #[doc = " The total number of vertices stored in \\a vertexBuffer is \\a vertexCount times \\a motionStepCount (see @ref rtGeometryTrianglesSetMotionSteps)."]
+ #[doc = " Triangles are linearly interpolated between motion steps."]
+ #[doc = " Parameter \\a vertexBufferByteOffset can be used to specify a byte offset to the position of the first vertex of the first motion step in buffer \\a vertexBuffer."]
+ #[doc = " Parameter \\a vertexByteStride sets the stride in bytes between vertices within a motion step."]
+ #[doc = " Parameter \\a vertexMotionStepByteStride sets the stride in bytes between motion steps for a single vertex."]
+ #[doc = " The stride parameters allow for two types of layouts of the motion data:"]
+ #[doc = " a) serialized: vertexByteStride = sizeof(Vertex), vertexMotionStepByteStride = vertexCount * vertexByteStride"]
+ #[doc = " b) interleaved: vertexMotionStepByteStride = sizeof(Vertex), vertexByteStride = sizeof(Vertex) * motion_steps"]
+ #[doc = " Vertex N at time step i is at: vertexBuffer[N * vertexByteStride + i * vertexMotionStepByteStride + vertexBufferByteOffset]"]
+ #[doc = " Parameter \\a positionFormat must be one of the following: RT_FORMAT_FLOAT3, RT_FORMAT_HALF3, RT_FORMAT_FLOAT2, RT_FORMAT_HALF2."]
+ #[doc = " In case of formats RT_FORMAT_FLOAT2 or RT_FORMAT_HALF2 the third component is assumed to be zero, which can be useful for planar geometry."]
+ #[doc = " Calling this function overrides any previous call to any of the set(Motion)Vertices functions."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node to query for the primitive index offset"]
+ #[doc = " @param[in] vertexCount Number of vertices for one motion step"]
+ #[doc = " @param[in] vertexBuffer Buffer that holds the vertices of the triangles for all motion steps"]
+ #[doc = " @param[in] vertexBufferByteOffset Offset in bytes to the first vertex of the first motion step in buffer vertexBuffer"]
+ #[doc = " @param[in] vertexByteStride Stride in bytes between vertices, belonging to the same motion step"]
+ #[doc = " @param[in] vertexMotionStepByteStride Stride in bytes between vertices of the same triangle, but neighboring motion step"]
+ #[doc = " @param[in] positionFormat Format of the position attribute of a vertex"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetMotionVertices was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetVertices"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionVerticesMultiBuffer"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetMotionVertices(
+ geometrytriangles: RTgeometrytriangles,
+ vertexCount: ::std::os::raw::c_uint,
+ vertexBuffer: RTbuffer,
+ vertexBufferByteOffset: RTsize,
+ vertexByteStride: RTsize,
+ vertexMotionStepByteStride: RTsize,
+ positionFormat: RTformat,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the vertex buffer of motion triangles"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetMotionVerticesMultiBuffer can be used instead of @ref rtGeometryTrianglesSetMotionVertices if the vertices for the different motion steps are stored in separate buffers."]
+ #[doc = " Parameter \\a vertexBuffers must point to an array of buffers of minimal size \\a motionStepCount (see @ref rtGeometryTrianglesSetMotionSteps)."]
+ #[doc = " All buffers must, however, share the same byte offset as well as vertex stride and position format."]
+ #[doc = " Calling this function overrides any previous call to any of the set(Motion)Vertices functions."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node to query for the primitive index offset"]
+ #[doc = " @param[in] vertexCount Number of vertices for one motion step"]
+ #[doc = " @param[in] vertexBuffers Buffers that hold the vertices of the triangles per motion step"]
+ #[doc = " @param[in] vertexBufferCount Number of buffers passed, must match the number of motion steps before a launch call"]
+ #[doc = " @param[in] vertexBufferByteOffset Offset in bytes to the first vertex in every buffer vertexBuffers"]
+ #[doc = " @param[in] vertexByteStride Stride in bytes between vertices, belonging to the same motion step"]
+ #[doc = " @param[in] positionFormat Format of the position attribute of a vertex"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetMotionVertices was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetVertices"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionVertices"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetMotionVerticesMultiBuffer(
+ geometrytriangles: RTgeometrytriangles,
+ vertexCount: ::std::os::raw::c_uint,
+ vertexBuffers: *mut RTbuffer,
+ vertexBufferCount: ::std::os::raw::c_uint,
+ vertexBufferByteOffset: RTsize,
+ vertexByteStride: RTsize,
+ positionFormat: RTformat,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the number of motion steps associated with a GeometryTriangles node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionSteps sets the number of motion steps as specified in \\a motionStepCount"]
+ #[doc = " associated with \\a geometrytriangles. Note that the default value is 1, not 0,"]
+ #[doc = " for geometry without motion."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node handle"]
+ #[doc = " @param[in] motionStepCount Number of motion steps, motionStepCount >= 1"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetMotionSteps was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionVertices"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionVerticesMultiBuffer"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionSteps"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionBorderMode"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionRange"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetMotionSteps(
+ geometrytriangles: RTgeometrytriangles,
+ motionStepCount: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of motion steps associated with a GeometryTriangles node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionSteps returns in \\a motionStepCount the number of motion steps"]
+ #[doc = " associated with \\a geometrytriangles. Note that the default value is 1, not 0,"]
+ #[doc = " for geometry without motion."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node handle"]
+ #[doc = " @param[out] motionStepCount Number of motion steps motionStepCount >= 1"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetMotionSteps was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionSteps"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionBorderMode"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionRange"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetMotionSteps(
+ geometrytriangles: RTgeometrytriangles,
+ motionStepCount: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the motion time range for a GeometryTriangles node."]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " Sets the inclusive motion time range [timeBegin, timeEnd] for \\a geometrytriangles,"]
+ #[doc = " where timeBegin <= timeEnd. The default time range is [0.0, 1.0]. The"]
+ #[doc = " time range has no effect unless @ref rtGeometryTrianglesSetMotionVertices or"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionVerticesMultiBuffer with motionStepCount > 1 is"]
+ #[doc = " called, in which case the time steps uniformly divide the time range."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node handle"]
+ #[doc = " @param[out] timeBegin Beginning time value of range"]
+ #[doc = " @param[out] timeEnd Ending time value of range"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetMotionRange was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionRange"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionBorderMode"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionSteps"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetMotionRange(
+ geometrytriangles: RTgeometrytriangles,
+ timeBegin: f32,
+ timeEnd: f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the motion time range associated with a GeometryTriangles node."]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionRange returns the motion time range associated with"]
+ #[doc = " \\a geometrytriangles from a previous call to @ref rtGeometryTrianglesSetMotionRange, or the"]
+ #[doc = " default values of [0.0, 1.0]."]
+ #[doc = ""]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node handle"]
+ #[doc = " @param[out] timeBegin Beginning time value of range"]
+ #[doc = " @param[out] timeEnd Ending time value of range"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetMotionRange was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionRange"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionBorderMode"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionSteps"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetMotionRange(
+ geometrytriangles: RTgeometrytriangles,
+ timeBegin: *mut f32,
+ timeEnd: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the motion border modes of a GeometryTriangles node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionBorderMode sets the behavior of \\a geometrytriangles"]
+ #[doc = " outside its motion time range. Options are @ref RT_MOTIONBORDERMODE_CLAMP"]
+ #[doc = " or @ref RT_MOTIONBORDERMODE_VANISH. See @ref rtTransformSetMotionBorderMode"]
+ #[doc = " for details."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node handle"]
+ #[doc = " @param[in] beginMode Motion border mode at motion range begin"]
+ #[doc = " @param[in] endMode Motion border mode at motion range end"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetMotionBorderMode was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionBorderMode"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionRange"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionSteps"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetMotionBorderMode(
+ geometrytriangles: RTgeometrytriangles,
+ beginMode: RTmotionbordermode,
+ endMode: RTmotionbordermode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the motion border modes of a GeometryTriangles node"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionBorderMode returns the motion border modes"]
+ #[doc = " for the time range associated with \\a geometrytriangles."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node handle"]
+ #[doc = " @param[out] beginMode Motion border mode at motion range begin"]
+ #[doc = " @param[out] endMode Motion border mode at motion range end"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetMotionBorderMode was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetMotionBorderMode"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionRange"]
+ #[doc = " @ref rtGeometryTrianglesGetMotionSteps"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetMotionBorderMode(
+ geometrytriangles: RTgeometrytriangles,
+ beginMode: *mut RTmotionbordermode,
+ endMode: *mut RTmotionbordermode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets flags that influence the behavior of traversal"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetBuildFlags can be used to set object-specific flags that affect the acceleration-structure-build behavior."]
+ #[doc = " If parameter \\a buildFlags contains the RT_GEOMETRY_BUILD_FLAG_RELEASE_BUFFERS flag, all buffers (including the vertex, index, and materialIndex buffer) holding"]
+ #[doc = " information that is evaluated at acceleration-structure-build time will be released after the build."]
+ #[doc = " OptiX does not take ownership over the buffers, but simply frees the corresponding device memory."]
+ #[doc = " Sharing buffers with other GeometryTriangles nodes is possible if all of them are built within one OptiX launch."]
+ #[doc = " Note that it is the users responsibility that the buffers hold data for the next acceleration structure build if the acceleration structure is marked dirty."]
+ #[doc = " E.g., if the flag is set, an OptiX launch will cause the acceleration structure build and release the memory afterwards."]
+ #[doc = " If the acceleration structure is marked dirty before the next launch (e.g., due to refitting), the user needs to map the buffers before the launch to fill them with data."]
+ #[doc = " Further, there are certain configurations with motion when the buffers cannot be released in which case the flag is ignored and the data is not freed."]
+ #[doc = " The buffers can only be released if all GeometryTriangles belonging to a GeometryGroup have the same number of motion steps and equal motion begin / end times."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node handle"]
+ #[doc = " @param[in] buildFlags The flags to set"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetBuildFlags was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetBuildFlags"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetBuildFlags(
+ geometrytriangles: RTgeometrytriangles,
+ buildFlags: RTgeometrybuildflags,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the number of materials used for the GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetMaterialCount returns the number of materials that are used with \\a geometrytriangles."]
+ #[doc = " By default there is one material slot."]
+ #[doc = ""]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node handle"]
+ #[doc = " @param[out] numMaterials Number of materials used with this GeometryTriangles node"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetMaterialCount was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetMaterialCount"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetMaterialCount(
+ geometrytriangles: RTgeometrytriangles,
+ numMaterials: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the number of materials used for the GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetMaterialCount sets the number of materials that are used with \\a geometrytriangles."]
+ #[doc = " By default there is one material slot."]
+ #[doc = " This number must be equal to the number of materials that is set at the GeometryInstance where \\a geometrytriangles is attached to."]
+ #[doc = " Multi-material support for GeometryTriangles is limited to a fixed partition of the geometry into sets of triangles."]
+ #[doc = " Each triangle set maps to one material slot (within range [0, numMaterials-1])."]
+ #[doc = " The mapping is set via @ref rtGeometryTrianglesSetMaterialIndices."]
+ #[doc = " The actual materials are set at the GeometryInstance."]
+ #[doc = " The geometry can be instanced when attached to multiple GeometryInstances."]
+ #[doc = " In that case, the materials attached to each GeometryInstance can differ (effectively causing different materials per instance of the geometry)."]
+ #[doc = " \\a numMaterials must be >=1 and <=2^16."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node handle"]
+ #[doc = " @param[in] numMaterials Number of materials used with this geometry"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetMaterialCount was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetMaterialCount"]
+ #[doc = " @ref rtGeometryTrianglesSetMaterialIndices"]
+ #[doc = " @ref rtGeometryTrianglesSetFlagsPerMaterial"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetMaterialCount(
+ geometrytriangles: RTgeometrytriangles,
+ numMaterials: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the index buffer of indexed triangles"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetMaterialIndices set the material slot per triangle of \\a geometrytriangles."]
+ #[doc = " Hence, buffer \\a materialIndexBuffer must hold triangleCount entries."]
+ #[doc = " Every material index must be in range [0, numMaterials-1] (see @ref rtGeometryTrianglesSetMaterialCount)."]
+ #[doc = " Parameter \\a materialIndexBufferByteOffset can be used to specify a byte offset to the first index in buffer \\a materialIndexBuffer."]
+ #[doc = " Parameter \\a materialIndexByteStride sets the stride in bytes between indices."]
+ #[doc = " Parameter \\a materialIndexFormat must be one of the following: RT_FORMAT_UNSIGNED_INT, RT_FORMAT_UNSIGNED_SHORT, RT_FORMAT_UNSIGNED_BYTE."]
+ #[doc = " The buffer is only used if the number of materials as set via @ref rtGeometryTrianglesSetMaterialCount is larger than one."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node to query for the primitive index offset"]
+ #[doc = " @param[in] materialIndexBuffer Buffer that holds the indices into the vertex buffer of the triangles"]
+ #[doc = " @param[in] materialIndexBufferByteOffset Offset to first index in buffer indexBuffer"]
+ #[doc = " @param[in] materialIndexByteStride Stride in bytes between triplets of indices"]
+ #[doc = " @param[in] materialIndexFormat Format of the triplet of indices to index the vertices of a triangle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetMaterialIndices was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetMaterialCount"]
+ #[doc = " @ref rtGeometryTrianglesSetFlagsPerMaterial"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetMaterialIndices(
+ geometrytriangles: RTgeometrytriangles,
+ materialIndexBuffer: RTbuffer,
+ materialIndexBufferByteOffset: RTsize,
+ materialIndexByteStride: RTsize,
+ materialIndexFormat: RTformat,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets geometry-specific flags that influence the behavior of traversal"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetFlagsPerMaterial can be used to set geometry-specific flags that may"]
+ #[doc = " change the behavior of traversal when intersecting the geometry."]
+ #[doc = " Note that the flags are evaluated at acceleration structure build time."]
+ #[doc = " An acceleration must be marked dirty for changes to the flags to take effect."]
+ #[doc = " Setting the flags RT_GEOMETRY_FLAG_NO_SPLITTING and/or RT_GEOMETRY_FLAG_DISABLE_ANYHIT should be dependent on the"]
+ #[doc = " material that is used for the intersection."]
+ #[doc = " Therefore, the flags are set per material slot (with the actual material binding being set on the GeomteryInstance)."]
+ #[doc = " If the geometry is instanced and different instances apply different materials to the geometry, the per-material geometry-specific flags"]
+ #[doc = " need to apply to the materials of all instances."]
+ #[doc = " Example with two instances with each having two materials, node graph:"]
+ #[doc = " G"]
+ #[doc = " / \\"]
+ #[doc = " / \\"]
+ #[doc = " T0 T1"]
+ #[doc = " | |"]
+ #[doc = " GG0-A-GG1"]
+ #[doc = " | |"]
+ #[doc = " M0-GI0 GI1-M2"]
+ #[doc = " / \\ / \\"]
+ #[doc = " M1 GT M3"]
+ #[doc = " with: G-Group, GG-GeometryGroup, T-Transform, A-Acceleration, GI-GeometryInstance, M-Material, GT-GeometryTriangles"]
+ #[doc = " RT_GEOMETRY_FLAG_NO_SPLITTING needs to be set for material index 0, if M0 or M2 require it."]
+ #[doc = " RT_GEOMETRY_FLAG_DISABLE_ANYHIT should be set for material index 0, if M0 and M2 allow it."]
+ #[doc = " RT_GEOMETRY_FLAG_NO_SPLITTING needs to be set for material index 1, if M1 or M3 require it."]
+ #[doc = " RT_GEOMETRY_FLAG_DISABLE_ANYHIT should be set for material index 1, if M1 and M3 allow it."]
+ #[doc = ""]
+ #[doc = " Setting RT_GEOMETRY_FLAG_NO_SPLITTING prevents splitting the primitive during the acceleration structure build."]
+ #[doc = " Splitting is done to increase performance, but as a side-effect may result in multiple executions of"]
+ #[doc = " the any-hit program for a single intersection."]
+ #[doc = " To avoid further side effects (e.g., multiple accumulations of a value) that may result of a multiple execution,"]
+ #[doc = " RT_GEOMETRY_FLAG_NO_SPLITTING needs to be set."]
+ #[doc = " RT_GEOMETRY_FLAG_DISABLE_ANYHIT is an optimization due to which the execution of the any-hit program is skipped."]
+ #[doc = " If possible, the flag should be set."]
+ #[doc = " Note that if no any-hit program is set on a material by the user, a no-op any-hit program will be used."]
+ #[doc = " Therefore, this flag still needs to be set to skip the execution of any any-hit program."]
+ #[doc = " An automatic determination of whether to set the DISABLE_ANYHIT flag is not possible since the information"]
+ #[doc = " whether or not to skip the any-hit program depends on the materials that are used, and this information"]
+ #[doc = " may not be available at acceleration build time."]
+ #[doc = " For example, materials can change afterwards (e.g., between frames) without a rebuild of an acceleration."]
+ #[doc = " Note that the final decision whether or not to execute the any-hit program at run time also depends on the flags set on"]
+ #[doc = " the ray as well as the geometry group that this geometry is part of."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles GeometryTriangles node handle"]
+ #[doc = " @param[in] materialIndex The material index for which to set the flags"]
+ #[doc = " @param[in] flags The flags to set."]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetFlagsPerMaterial was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetMaterialCount"]
+ #[doc = " @ref rtGeometryTrianglesSetMaterialIndices"]
+ #[doc = " @ref rtGeometryTrianglesSetBuildFlags"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetFlagsPerMaterial(
+ geometrytriangles: RTgeometrytriangles,
+ materialIndex: ::std::os::raw::c_uint,
+ flags: RTgeometryflags,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets geometry flags for triangles."]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " See @ref rtGeometryTrianglesSetFlagsPerMaterial for details."]
+ #[doc = ""]
+ #[doc = " @param[in] triangles The triangles handle"]
+ #[doc = " @param[in] materialIndex The index of the material for which to retrieve the flags"]
+ #[doc = " @param[out] flags Flags for the given geometry group"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetFlagsPerMaterial was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesSetFlagsPerMaterial,"]
+ #[doc = " @ref rtGeometryTrianglesSetMaterialIndices"]
+ #[doc = " @ref rtTrace"]
+ pub fn rtGeometryTrianglesGetFlagsPerMaterial(
+ triangles: RTgeometrytriangles,
+ materialIndex: ::std::os::raw::c_uint,
+ flags: *mut RTgeometryflags,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new material"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialCreate creates a new material within a context. \\a context specifies the target"]
+ #[doc = " context, as returned by @ref rtContextCreate. Sets \\a *material to the handle of a newly"]
+ #[doc = " created material within \\a context. Returns @ref RT_ERROR_INVALID_VALUE if \\a material is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies a context within which to create a new material"]
+ #[doc = " @param[out] material Returns a newly created material"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialDestroy,"]
+ #[doc = " @ref rtContextCreate"]
+ #[doc = ""]
+ pub fn rtMaterialCreate(context: RTcontext, material: *mut RTmaterial) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a material object"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialDestroy removes \\a material from its context and deletes it. \\a material should"]
+ #[doc = " be a value returned by @ref rtMaterialCreate. Associated variables declared via @ref"]
+ #[doc = " rtMaterialDeclareVariable are destroyed, but no child graph nodes are destroyed. After the"]
+ #[doc = " call, \\a material is no longer a valid handle."]
+ #[doc = ""]
+ #[doc = " @param[in] material Handle of the material node to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialCreate"]
+ #[doc = ""]
+ pub fn rtMaterialDestroy(material: RTmaterial) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Verifies the state of a material"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialValidate checks \\a material for completeness. If \\a material or"]
+ #[doc = " any of the objects attached to \\a material are not valid, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialCreate"]
+ #[doc = ""]
+ pub fn rtMaterialValidate(material: RTmaterial) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context associated with a material"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialGetContext queries a material for its associated context."]
+ #[doc = " \\a material specifies the material to query, and should be a value returned by"]
+ #[doc = " @ref rtMaterialCreate. If both parameters are valid, \\a *context"]
+ #[doc = " sets to the context associated with \\a material. Otherwise, the call"]
+ #[doc = " has no effect and returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material to query"]
+ #[doc = " @param[out] context Returns the context associated with the material"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialCreate"]
+ #[doc = ""]
+ pub fn rtMaterialGetContext(material: RTmaterial, context: *mut RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the closest-hit program associated with a (material, ray type) tuple"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialSetClosestHitProgram specifies a closest-hit program to associate"]
+ #[doc = " with a (material, ray type) tuple. \\a material specifies the material of"]
+ #[doc = " interest and should be a value returned by @ref rtMaterialCreate."]
+ #[doc = " \\a rayTypeIndex specifies the type of ray to which the program applies and"]
+ #[doc = " should be a value less than the value returned by @ref rtContextGetRayTypeCount."]
+ #[doc = " \\a program specifies the target closest-hit program which applies to"]
+ #[doc = " the tuple (\\a material, \\a rayTypeIndex) and should be a value returned by"]
+ #[doc = " either @ref rtProgramCreateFromPTXString or @ref rtProgramCreateFromPTXFile."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material of the (material, ray type) tuple to modify"]
+ #[doc = " @param[in] rayTypeIndex Specifies the ray type of the (material, ray type) tuple to modify"]
+ #[doc = " @param[in] program Specifies the closest-hit program to associate with the (material, ray type) tuple"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialSetClosestHitProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialGetClosestHitProgram,"]
+ #[doc = " @ref rtMaterialCreate,"]
+ #[doc = " @ref rtContextGetRayTypeCount,"]
+ #[doc = " @ref rtProgramCreateFromPTXString,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile"]
+ #[doc = ""]
+ pub fn rtMaterialSetClosestHitProgram(
+ material: RTmaterial,
+ rayTypeIndex: ::std::os::raw::c_uint,
+ program: RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the closest-hit program associated with a (material, ray type) tuple"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialGetClosestHitProgram queries the closest-hit program associated"]
+ #[doc = " with a (material, ray type) tuple. \\a material specifies the material of"]
+ #[doc = " interest and should be a value returned by @ref rtMaterialCreate."]
+ #[doc = " \\a rayTypeIndex specifies the target ray type and should be a value"]
+ #[doc = " less than the value returned by @ref rtContextGetRayTypeCount."]
+ #[doc = " If all parameters are valid, \\a *program sets to the handle of the"]
+ #[doc = " any-hit program associated with the tuple (\\a material, \\a rayTypeIndex)."]
+ #[doc = " Otherwise, the call has no effect and returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material of the (material, ray type) tuple to query"]
+ #[doc = " @param[in] rayTypeIndex Specifies the type of ray of the (material, ray type) tuple to query"]
+ #[doc = " @param[out] program Returns the closest-hit program associated with the (material, ray type) tuple"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialGetClosestHitProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialSetClosestHitProgram,"]
+ #[doc = " @ref rtMaterialCreate,"]
+ #[doc = " @ref rtContextGetRayTypeCount"]
+ #[doc = ""]
+ pub fn rtMaterialGetClosestHitProgram(
+ material: RTmaterial,
+ rayTypeIndex: ::std::os::raw::c_uint,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the any-hit program associated with a (material, ray type) tuple"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialSetAnyHitProgram specifies an any-hit program to associate with a"]
+ #[doc = " (material, ray type) tuple. \\a material specifies the target material and"]
+ #[doc = " should be a value returned by @ref rtMaterialCreate. \\a rayTypeIndex specifies"]
+ #[doc = " the type of ray to which the program applies and should be a value less than"]
+ #[doc = " the value returned by @ref rtContextGetRayTypeCount. \\a program specifies the"]
+ #[doc = " target any-hit program which applies to the tuple (\\a material,"]
+ #[doc = " \\a rayTypeIndex) and should be a value returned by either"]
+ #[doc = " @ref rtProgramCreateFromPTXString or @ref rtProgramCreateFromPTXFile."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material of the (material, ray type) tuple to modify"]
+ #[doc = " @param[in] rayTypeIndex Specifies the type of ray of the (material, ray type) tuple to modify"]
+ #[doc = " @param[in] program Specifies the any-hit program to associate with the (material, ray type) tuple"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialSetAnyHitProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialGetAnyHitProgram,"]
+ #[doc = " @ref rtMaterialCreate,"]
+ #[doc = " @ref rtContextGetRayTypeCount,"]
+ #[doc = " @ref rtProgramCreateFromPTXString,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile"]
+ #[doc = ""]
+ pub fn rtMaterialSetAnyHitProgram(
+ material: RTmaterial,
+ rayTypeIndex: ::std::os::raw::c_uint,
+ program: RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the any-hit program associated with a (material, ray type) tuple"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialGetAnyHitProgram queries the any-hit program associated"]
+ #[doc = " with a (material, ray type) tuple. \\a material specifies the material of"]
+ #[doc = " interest and should be a value returned by @ref rtMaterialCreate."]
+ #[doc = " \\a rayTypeIndex specifies the target ray type and should be a value"]
+ #[doc = " less than the value returned by @ref rtContextGetRayTypeCount."]
+ #[doc = " if all parameters are valid, \\a *program sets to the handle of the"]
+ #[doc = " any-hit program associated with the tuple (\\a material, \\a rayTypeIndex)."]
+ #[doc = " Otherwise, the call has no effect and returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material of the (material, ray type) tuple to query"]
+ #[doc = " @param[in] rayTypeIndex Specifies the type of ray of the (material, ray type) tuple to query"]
+ #[doc = " @param[out] program Returns the any-hit program associated with the (material, ray type) tuple"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialGetAnyHitProgram was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialSetAnyHitProgram,"]
+ #[doc = " @ref rtMaterialCreate,"]
+ #[doc = " @ref rtContextGetRayTypeCount"]
+ #[doc = ""]
+ pub fn rtMaterialGetAnyHitProgram(
+ material: RTmaterial,
+ rayTypeIndex: ::std::os::raw::c_uint,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a new named variable to be associated with a material"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialDeclareVariable declares a new variable to be associated with a material."]
+ #[doc = " \\a material specifies the target material, and should be a value returned by @ref"]
+ #[doc = " rtMaterialCreate. \\a name specifies the name of the variable, and should be a \\a NULL-terminated"]
+ #[doc = " string. If there is currently no variable associated with \\a material named \\a name, and \\a v is"]
+ #[doc = " not \\a NULL, a new variable named \\a name will be created and associated with \\a material and \\a"]
+ #[doc = " *v will be set to the handle of the newly-created variable. Otherwise, this call has no effect"]
+ #[doc = " and returns either @ref RT_ERROR_INVALID_VALUE if either \\a name or \\a v is \\a NULL or @ref"]
+ #[doc = " RT_ERROR_VARIABLE_REDECLARED if \\a name is the name of an existing variable associated with the"]
+ #[doc = " material."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material to modify"]
+ #[doc = " @param[in] name Specifies the name of the variable"]
+ #[doc = " @param[out] v Returns a handle to a newly declared variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_REDECLARED"]
+ #[doc = " - @ref RT_ERROR_ILLEGAL_SYMBOL"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialDeclareVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialGetVariable,"]
+ #[doc = " @ref rtMaterialQueryVariable,"]
+ #[doc = " @ref rtMaterialCreate"]
+ #[doc = ""]
+ pub fn rtMaterialDeclareVariable(
+ material: RTmaterial,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Queries for the existence of a named variable of a material"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialQueryVariable queries for the existence of a material's named variable. \\a"]
+ #[doc = " material specifies the target material and should be a value returned by @ref rtMaterialCreate."]
+ #[doc = " \\a name specifies the name of the variable, and should be a \\a NULL-terminated"]
+ #[doc = " string. If \\a material is a valid material and \\a name is the name of a variable attached to \\a"]
+ #[doc = " material, \\a *v is set to a handle to that variable after the call. Otherwise, \\a *v is set to"]
+ #[doc = " \\a NULL. If \\a material is not a valid material, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material to query"]
+ #[doc = " @param[in] name Specifies the name of the variable to query"]
+ #[doc = " @param[out] v Returns a the named variable, if it exists"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialQueryVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialGetVariable,"]
+ #[doc = " @ref rtMaterialCreate"]
+ #[doc = ""]
+ pub fn rtMaterialQueryVariable(
+ material: RTmaterial,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Removes a variable from a material"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialRemoveVariable removes a variable from a material. The material of"]
+ #[doc = " interest is specified by \\a material, which should be a value returned by"]
+ #[doc = " @ref rtMaterialCreate. The variable to remove is specified by \\a v, which"]
+ #[doc = " should be a value returned by @ref rtMaterialDeclareVariable. Once a variable"]
+ #[doc = " has been removed from this material, another variable with the same name as the"]
+ #[doc = " removed variable may be declared. If \\a material does not refer to a valid material,"]
+ #[doc = " this call has no effect and returns @ref RT_ERROR_INVALID_VALUE. If \\a v is not"]
+ #[doc = " a valid variable or does not belong to \\a material, this call has no effect and"]
+ #[doc = " returns @ref RT_ERROR_INVALID_VALUE or @ref RT_ERROR_VARIABLE_NOT_FOUND, respectively."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material to modify"]
+ #[doc = " @param[in] v Specifies the variable to remove"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialRemoveVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialDeclareVariable,"]
+ #[doc = " @ref rtMaterialCreate"]
+ #[doc = ""]
+ pub fn rtMaterialRemoveVariable(material: RTmaterial, v: RTvariable) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of variables attached to a material"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialGetVariableCount queries the number of variables attached to a"]
+ #[doc = " material. \\a material specifies the material, and should be a value returned by"]
+ #[doc = " @ref rtMaterialCreate. After the call, if both parameters are valid, the number"]
+ #[doc = " of variables attached to \\a material is returned to \\a *count. Otherwise, the"]
+ #[doc = " call has no effect and returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material to query"]
+ #[doc = " @param[out] count Returns the number of variables"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialGetVariableCount was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialCreate"]
+ #[doc = ""]
+ pub fn rtMaterialGetVariableCount(
+ material: RTmaterial,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a handle to an indexed variable of a material"]
+ #[doc = ""]
+ #[doc = " @ingroup Material"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialGetVariable queries the handle of a material's indexed variable. \\a material"]
+ #[doc = " specifies the target material and should be a value returned by @ref rtMaterialCreate. \\a index"]
+ #[doc = " specifies the index of the variable, and should be a value less than"]
+ #[doc = " @ref rtMaterialGetVariableCount. If \\a material is a valid material and \\a index is the index of a"]
+ #[doc = " variable attached to \\a material, \\a *v is set to a handle to that variable. Otherwise, \\a *v is"]
+ #[doc = " set to \\a NULL and either @ref RT_ERROR_INVALID_VALUE or @ref RT_ERROR_VARIABLE_NOT_FOUND is"]
+ #[doc = " returned depending on the validity of \\a material, or \\a index, respectively."]
+ #[doc = ""]
+ #[doc = " @param[in] material Specifies the material to query"]
+ #[doc = " @param[in] index Specifies the index of the variable to query"]
+ #[doc = " @param[out] v Returns the indexed variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_VARIABLE_NOT_FOUND"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtMaterialGetVariable was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtMaterialQueryVariable,"]
+ #[doc = " @ref rtMaterialGetVariableCount,"]
+ #[doc = " @ref rtMaterialCreate"]
+ #[doc = ""]
+ pub fn rtMaterialGetVariable(
+ material: RTmaterial,
+ index: ::std::os::raw::c_uint,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new texture sampler object"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerCreate allocates a texture sampler object."]
+ #[doc = " Sets \\a *texturesampler to the handle of a newly created texture sampler within \\a context."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if \\a texturesampler is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context the texture sampler object will be created in"]
+ #[doc = " @param[out] texturesampler The return handle to the new texture sampler object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerDestroy"]
+ #[doc = ""]
+ pub fn rtTextureSamplerCreate(
+ context: RTcontext,
+ texturesampler: *mut RTtexturesampler,
+ ) -> RTresult;
+}
+#[doc = " @brief Structure describing a block of demand loaded memory."]
+#[doc = ""]
+#[doc = " @ingroup Buffer"]
+#[doc = ""]
+#[doc = " <B>Description</B>"]
+#[doc = ""]
+#[doc = " @ref \\RTmemoryblock describes a one-, two- or three-dimensional block of bytes in memory"]
+#[doc = " for a \\a mipLevel that are interpreted as elements of \\a format."]
+#[doc = ""]
+#[doc = " The region is defined by the elements beginning at (x, y, z) and extending to"]
+#[doc = " (x + width - 1, y + height - 1, z + depth - 1). The element size must be taken into account"]
+#[doc = " when computing addresses into the memory block based on the size of elements. There is no"]
+#[doc = " padding between elements within a row, e.g. along the x direction."]
+#[doc = ""]
+#[doc = " The starting address of the block is given by \\a baseAddress and data is stored at addresses"]
+#[doc = " increasing from \\a baseAddress. One-dimensional blocks ignore the \\a rowPitch and"]
+#[doc = " \\a planePitch members and are described entirely by the \\a baseAddress of the block. Two"]
+#[doc = " dimensional blocks have contiguous bytes in every row, starting with \\a baseAddress, but"]
+#[doc = " may have gaps between subsequent rows along the height dimension. The \\a rowPitch describes"]
+#[doc = " the offset in bytes between subsequent rows within the two-dimensional block. Similarly,"]
+#[doc = " the \\a planePitch describes the offset in bytes between subsequent planes within the depth"]
+#[doc = " dimension."]
+#[doc = ""]
+#[doc = " <B>History</B>"]
+#[doc = ""]
+#[doc = " @ref RTmemoryblock was introduced in OptiX 6.1"]
+#[doc = ""]
+#[doc = " <B>See also</B>"]
+#[doc = " @ref RTbuffercallback"]
+#[doc = " @ref RTtexturesamplercallback"]
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct RTmemoryblock {
+ pub format: RTformat,
+ pub baseAddress: *mut ::std::os::raw::c_void,
+ pub mipLevel: ::std::os::raw::c_uint,
+ pub x: ::std::os::raw::c_uint,
+ pub y: ::std::os::raw::c_uint,
+ pub z: ::std::os::raw::c_uint,
+ pub width: ::std::os::raw::c_uint,
+ pub height: ::std::os::raw::c_uint,
+ pub depth: ::std::os::raw::c_uint,
+ pub rowPitch: ::std::os::raw::c_uint,
+ pub planePitch: ::std::os::raw::c_uint,
+}
+extern "C" {
+ #[doc = " @brief Destroys a texture sampler object"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerDestroy removes \\a texturesampler from its context and deletes it."]
+ #[doc = " \\a texturesampler should be a value returned by @ref rtTextureSamplerCreate."]
+ #[doc = " After the call, \\a texturesampler is no longer a valid handle."]
+ #[doc = " Any API object that referenced \\a texturesampler will have its reference invalidated."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler Handle of the texture sampler to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreate"]
+ #[doc = ""]
+ pub fn rtTextureSamplerDestroy(texturesampler: RTtexturesampler) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Validates the state of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerValidate checks \\a texturesampler for completeness. If \\a texturesampler does not have buffers"]
+ #[doc = " attached to all of its MIP levels and array slices or if the filtering modes are incompatible with the current"]
+ #[doc = " MIP level and array slice configuration then returns @ref RT_ERROR_INVALID_CONTEXT."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler to be validated"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextValidate"]
+ #[doc = ""]
+ pub fn rtTextureSamplerValidate(texturesampler: RTtexturesampler) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the context object that created this texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetContext returns a handle to the context object that was used to create"]
+ #[doc = " \\a texturesampler. If \\a context is \\a NULL, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be queried for its context"]
+ #[doc = " @param[out] context The return handle for the context object of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextCreate"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetContext(
+ texturesampler: RTtexturesampler,
+ context: *mut RTcontext,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 3.9. Use @ref rtBufferSetMipLevelCount instead."]
+ #[doc = ""]
+ pub fn rtTextureSamplerSetMipLevelCount(
+ texturesampler: RTtexturesampler,
+ mipLevelCount: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 3.9. Use @ref rtBufferGetMipLevelCount instead."]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetMipLevelCount(
+ texturesampler: RTtexturesampler,
+ mipLevelCount: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 3.9. Use texture samplers with layered buffers instead. See @ref rtBufferCreate."]
+ #[doc = ""]
+ pub fn rtTextureSamplerSetArraySize(
+ texturesampler: RTtexturesampler,
+ textureCount: ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " Deprecated in OptiX 3.9. Use texture samplers with layered buffers instead. See @ref rtBufferCreate."]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetArraySize(
+ texturesampler: RTtexturesampler,
+ textureCount: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the wrapping mode of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetWrapMode sets the wrapping mode of"]
+ #[doc = " \\a texturesampler to \\a wrapmode for the texture dimension specified"]
+ #[doc = " by \\a dimension. \\a wrapmode can take one of the following values:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_WRAP_REPEAT"]
+ #[doc = " - @ref RT_WRAP_CLAMP_TO_EDGE"]
+ #[doc = " - @ref RT_WRAP_MIRROR"]
+ #[doc = " - @ref RT_WRAP_CLAMP_TO_BORDER"]
+ #[doc = ""]
+ #[doc = " The wrapping mode controls the behavior of the texture sampler as"]
+ #[doc = " texture coordinates wrap around the range specified by the indexing"]
+ #[doc = " mode. These values mirror the CUDA behavior of textures."]
+ #[doc = " See CUDA programming guide for details."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be changed"]
+ #[doc = " @param[in] dimension Dimension of the texture"]
+ #[doc = " @param[in] wrapmode The new wrap mode of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetWrapMode was introduced in OptiX 1.0."]
+ #[doc = " @ref RT_WRAP_MIRROR and @ref RT_WRAP_CLAMP_TO_BORDER were introduced in OptiX 3.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerGetWrapMode"]
+ #[doc = ""]
+ pub fn rtTextureSamplerSetWrapMode(
+ texturesampler: RTtexturesampler,
+ dimension: ::std::os::raw::c_uint,
+ wrapmode: RTwrapmode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the wrap mode of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetWrapMode gets the texture wrapping mode of \\a texturesampler and stores it in \\a *wrapmode."]
+ #[doc = " See @ref rtTextureSamplerSetWrapMode for a list of values @ref RTwrapmode can take."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be queried"]
+ #[doc = " @param[in] dimension Dimension for the wrapping"]
+ #[doc = " @param[out] wrapmode The return handle for the wrap mode of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetWrapMode was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerSetWrapMode"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetWrapMode(
+ texturesampler: RTtexturesampler,
+ dimension: ::std::os::raw::c_uint,
+ wrapmode: *mut RTwrapmode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the filtering modes of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetFilteringModes sets the minification, magnification and MIP mapping filter modes for \\a texturesampler."]
+ #[doc = " RTfiltermode must be one of the following values:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_FILTER_NEAREST"]
+ #[doc = " - @ref RT_FILTER_LINEAR"]
+ #[doc = " - @ref RT_FILTER_NONE"]
+ #[doc = ""]
+ #[doc = " These filter modes specify how the texture sampler will interpolate"]
+ #[doc = " buffer data that has been attached to it. \\a minification and"]
+ #[doc = " \\a magnification must be one of @ref RT_FILTER_NEAREST or"]
+ #[doc = " @ref RT_FILTER_LINEAR. \\a mipmapping may be any of the three values but"]
+ #[doc = " must be @ref RT_FILTER_NONE if the texture sampler contains only a"]
+ #[doc = " single MIP level or one of @ref RT_FILTER_NEAREST or @ref RT_FILTER_LINEAR"]
+ #[doc = " if the texture sampler contains more than one MIP level."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be changed"]
+ #[doc = " @param[in] minification The new minification filter mode of the texture sampler"]
+ #[doc = " @param[in] magnification The new magnification filter mode of the texture sampler"]
+ #[doc = " @param[in] mipmapping The new MIP mapping filter mode of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetFilteringModes was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerGetFilteringModes"]
+ #[doc = ""]
+ pub fn rtTextureSamplerSetFilteringModes(
+ texturesampler: RTtexturesampler,
+ minification: RTfiltermode,
+ magnification: RTfiltermode,
+ mipmapping: RTfiltermode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the filtering modes of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetFilteringModes gets the minification, magnification and MIP mapping filtering modes from"]
+ #[doc = " \\a texturesampler and stores them in \\a *minification, \\a *magnification and \\a *mipmapping, respectively. See"]
+ #[doc = " @ref rtTextureSamplerSetFilteringModes for the values @ref RTfiltermode may take."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be queried"]
+ #[doc = " @param[out] minification The return handle for the minification filtering mode of the texture sampler"]
+ #[doc = " @param[out] magnification The return handle for the magnification filtering mode of the texture sampler"]
+ #[doc = " @param[out] mipmapping The return handle for the MIP mapping filtering mode of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetFilteringModes was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerSetFilteringModes"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetFilteringModes(
+ texturesampler: RTtexturesampler,
+ minification: *mut RTfiltermode,
+ magnification: *mut RTfiltermode,
+ mipmapping: *mut RTfiltermode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the maximum anisotropy of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetMaxAnisotropy sets the maximum anisotropy of \\a texturesampler to \\a value. A float"]
+ #[doc = " value specifies the maximum anisotropy ratio to be used when doing anisotropic filtering. This value will be clamped to the range [1,16]"]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be changed"]
+ #[doc = " @param[in] value The new maximum anisotropy level of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetMaxAnisotropy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerGetMaxAnisotropy"]
+ #[doc = ""]
+ pub fn rtTextureSamplerSetMaxAnisotropy(
+ texturesampler: RTtexturesampler,
+ value: f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the maximum anisotropy level for a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetMaxAnisotropy gets the maximum anisotropy level for \\a texturesampler and stores"]
+ #[doc = " it in \\a *value."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be queried"]
+ #[doc = " @param[out] value The return handle for the maximum anisotropy level of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetMaxAnisotropy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerSetMaxAnisotropy"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetMaxAnisotropy(
+ texturesampler: RTtexturesampler,
+ value: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the minimum and the maximum MIP level access range of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetMipLevelClamp sets lower end and the upper end of the MIP level range to clamp access to."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be changed"]
+ #[doc = " @param[in] minLevel The new minimum mipmap level of the texture sampler"]
+ #[doc = " @param[in] maxLevel The new maximum mipmap level of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetMipLevelClamp was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerGetMipLevelClamp"]
+ #[doc = ""]
+ pub fn rtTextureSamplerSetMipLevelClamp(
+ texturesampler: RTtexturesampler,
+ minLevel: f32,
+ maxLevel: f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the minimum and the maximum MIP level access range for a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetMipLevelClamp gets the minimum and the maximum MIP level access range for \\a texturesampler and stores"]
+ #[doc = " it in \\a *minLevel and \\a maxLevel."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be queried"]
+ #[doc = " @param[out] minLevel The return handle for the minimum mipmap level of the texture sampler"]
+ #[doc = " @param[out] maxLevel The return handle for the maximum mipmap level of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetMipLevelClamp was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerSetMipLevelClamp"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetMipLevelClamp(
+ texturesampler: RTtexturesampler,
+ minLevel: *mut f32,
+ maxLevel: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the mipmap offset of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetMipLevelBias sets the offset to be applied to the calculated mipmap level."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be changed"]
+ #[doc = " @param[in] value The new mipmap offset of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetMipLevelBias was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerGetMipLevelBias"]
+ #[doc = ""]
+ pub fn rtTextureSamplerSetMipLevelBias(
+ texturesampler: RTtexturesampler,
+ value: f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the mipmap offset for a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetMipLevelBias gets the mipmap offset for \\a texturesampler and stores"]
+ #[doc = " it in \\a *value."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be queried"]
+ #[doc = " @param[out] value The return handle for the mipmap offset of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetMipLevelBias was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerSetMipLevelBias"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetMipLevelBias(
+ texturesampler: RTtexturesampler,
+ value: *mut f32,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the read mode of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetReadMode sets the data read mode of \\a texturesampler to \\a readmode."]
+ #[doc = " \\a readmode can take one of the following values:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TEXTURE_READ_ELEMENT_TYPE"]
+ #[doc = " - @ref RT_TEXTURE_READ_NORMALIZED_FLOAT"]
+ #[doc = " - @ref RT_TEXTURE_READ_ELEMENT_TYPE_SRGB"]
+ #[doc = " - @ref RT_TEXTURE_READ_NORMALIZED_FLOAT_SRGB"]
+ #[doc = ""]
+ #[doc = " @ref RT_TEXTURE_READ_ELEMENT_TYPE_SRGB and @ref RT_TEXTURE_READ_NORMALIZED_FLOAT_SRGB were introduced in OptiX 3.9"]
+ #[doc = " and apply sRGB to linear conversion during texture read for 8-bit integer buffer formats."]
+ #[doc = " \\a readmode controls the returned value of the texture sampler when it is used to sample"]
+ #[doc = " textures. @ref RT_TEXTURE_READ_ELEMENT_TYPE will return data of the type of the underlying"]
+ #[doc = " buffer objects. @ref RT_TEXTURE_READ_NORMALIZED_FLOAT will return floating point values"]
+ #[doc = " normalized by the range of the underlying type. If the underlying type is floating point,"]
+ #[doc = " @ref RT_TEXTURE_READ_NORMALIZED_FLOAT and @ref RT_TEXTURE_READ_ELEMENT_TYPE are equivalent,"]
+ #[doc = " always returning the unmodified floating point value."]
+ #[doc = ""]
+ #[doc = " For example, a texture sampler that samples a buffer of type @ref RT_FORMAT_UNSIGNED_BYTE with"]
+ #[doc = " a read mode of @ref RT_TEXTURE_READ_NORMALIZED_FLOAT will convert integral values from the"]
+ #[doc = " range [0,255] to floating point values in the range [0,1] automatically as the buffer is"]
+ #[doc = " sampled from."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be changed"]
+ #[doc = " @param[in] readmode The new read mode of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetReadMode was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerGetReadMode"]
+ #[doc = ""]
+ pub fn rtTextureSamplerSetReadMode(
+ texturesampler: RTtexturesampler,
+ readmode: RTtexturereadmode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the read mode of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetReadMode gets the read mode of \\a texturesampler and stores it in \\a *readmode."]
+ #[doc = " See @ref rtTextureSamplerSetReadMode for a list of values @ref RTtexturereadmode can take."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be queried"]
+ #[doc = " @param[out] readmode The return handle for the read mode of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetReadMode was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerSetReadMode"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetReadMode(
+ texturesampler: RTtexturesampler,
+ readmode: *mut RTtexturereadmode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets whether texture coordinates for this texture sampler are normalized"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetIndexingMode sets the indexing mode of \\a texturesampler to \\a indexmode. \\a indexmode"]
+ #[doc = " can take on one of the following values:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TEXTURE_INDEX_NORMALIZED_COORDINATES,"]
+ #[doc = " - @ref RT_TEXTURE_INDEX_ARRAY_INDEX"]
+ #[doc = ""]
+ #[doc = " These values are used to control the interpretation of texture coordinates. If the index mode is set to"]
+ #[doc = " @ref RT_TEXTURE_INDEX_NORMALIZED_COORDINATES, the texture is parameterized over [0,1]. If the index"]
+ #[doc = " mode is set to @ref RT_TEXTURE_INDEX_ARRAY_INDEX then texture coordinates are interpreted as array indices"]
+ #[doc = " into the contents of the underlying buffer objects."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be changed"]
+ #[doc = " @param[in] indexmode The new indexing mode of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetIndexingMode was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerGetIndexingMode"]
+ #[doc = ""]
+ pub fn rtTextureSamplerSetIndexingMode(
+ texturesampler: RTtexturesampler,
+ indexmode: RTtextureindexmode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the indexing mode of a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetIndexingMode gets the indexing mode of \\a texturesampler and stores it in \\a *indexmode."]
+ #[doc = " See @ref rtTextureSamplerSetIndexingMode for the values @ref RTtextureindexmode may take."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be queried"]
+ #[doc = " @param[out] indexmode The return handle for the indexing mode of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetIndexingMode was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerSetIndexingMode"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetIndexingMode(
+ texturesampler: RTtexturesampler,
+ indexmode: *mut RTtextureindexmode,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Attaches a buffer object to a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetBuffer attaches \\a buffer to \\a texturesampler."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object that will contain the buffer"]
+ #[doc = " @param[in] deprecated0 Deprecated in OptiX 3.9, must be 0"]
+ #[doc = " @param[in] deprecated1 Deprecated in OptiX 3.9, must be 0"]
+ #[doc = " @param[in] buffer The buffer to be attached to the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerSetBuffer was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerGetBuffer"]
+ #[doc = ""]
+ pub fn rtTextureSamplerSetBuffer(
+ texturesampler: RTtexturesampler,
+ deprecated0: ::std::os::raw::c_uint,
+ deprecated1: ::std::os::raw::c_uint,
+ buffer: RTbuffer,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets a buffer object handle from a texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetBuffer gets a buffer object from"]
+ #[doc = " \\a texturesampler and"]
+ #[doc = " stores it in \\a *buffer."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be queried for the buffer"]
+ #[doc = " @param[in] deprecated0 Deprecated in OptiX 3.9, must be 0"]
+ #[doc = " @param[in] deprecated1 Deprecated in OptiX 3.9, must be 0"]
+ #[doc = " @param[out] buffer The return handle to the buffer attached to the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetBuffer was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerSetBuffer"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetBuffer(
+ texturesampler: RTtexturesampler,
+ deprecated0: ::std::os::raw::c_uint,
+ deprecated1: ::std::os::raw::c_uint,
+ buffer: *mut RTbuffer,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the texture ID of this texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetId returns a handle to the texture sampler"]
+ #[doc = " \\a texturesampler to be used in OptiX programs on the device to"]
+ #[doc = " reference the associated texture. The returned ID cannot be used on"]
+ #[doc = " the host side. If \\a textureId is \\a NULL, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] texturesampler The texture sampler object to be queried for its ID"]
+ #[doc = " @param[out] textureId The returned device-side texture ID of the texture sampler"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetId was introduced in OptiX 3.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreate"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetId(
+ texturesampler: RTtexturesampler,
+ textureId: *mut ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new buffer object"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreate allocates and returns a new handle to a new buffer object in \\a *buffer associated"]
+ #[doc = " with \\a context. The backing storage of the buffer is managed by OptiX. A buffer is specified by a bitwise"]
+ #[doc = " \\a or combination of a \\a type and \\a flags in \\a bufferdesc. The supported types are:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_BUFFER_INPUT"]
+ #[doc = " - @ref RT_BUFFER_OUTPUT"]
+ #[doc = " - @ref RT_BUFFER_INPUT_OUTPUT"]
+ #[doc = " - @ref RT_BUFFER_PROGRESSIVE_STREAM"]
+ #[doc = ""]
+ #[doc = " The type values are used to specify the direction of data flow from the host to the OptiX devices."]
+ #[doc = " @ref RT_BUFFER_INPUT specifies that the host may only write to the buffer and the device may only read from the buffer."]
+ #[doc = " @ref RT_BUFFER_OUTPUT specifies the opposite, read only access on the host and write only access on the device."]
+ #[doc = " Devices and the host may read and write from buffers of type @ref RT_BUFFER_INPUT_OUTPUT. Reading or writing to"]
+ #[doc = " a buffer of the incorrect type (e.g., the host writing to a buffer of type @ref RT_BUFFER_OUTPUT) is undefined."]
+ #[doc = " @ref RT_BUFFER_PROGRESSIVE_STREAM is used to receive stream updates generated by progressive launches (see @ref rtContextLaunchProgressive2D)."]
+ #[doc = ""]
+ #[doc = " The supported flags are:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_BUFFER_GPU_LOCAL"]
+ #[doc = " - @ref RT_BUFFER_COPY_ON_DIRTY"]
+ #[doc = " - @ref RT_BUFFER_LAYERED"]
+ #[doc = " - @ref RT_BUFFER_CUBEMAP"]
+ #[doc = " - @ref RT_BUFFER_DISCARD_HOST_MEMORY"]
+ #[doc = ""]
+ #[doc = " If RT_BUFFER_LAYERED flag is set, buffer depth specifies the number of layers, not the depth of a 3D buffer."]
+ #[doc = " If RT_BUFFER_CUBEMAP flag is set, buffer depth specifies the number of cube faces, not the depth of a 3D buffer."]
+ #[doc = " See details in @ref rtBufferSetSize3D"]
+ #[doc = ""]
+ #[doc = " Flags can be used to optimize data transfers between the host and its devices. The flag @ref RT_BUFFER_GPU_LOCAL can only be"]
+ #[doc = " used in combination with @ref RT_BUFFER_INPUT_OUTPUT. @ref RT_BUFFER_INPUT_OUTPUT and @ref RT_BUFFER_GPU_LOCAL used together specify a buffer"]
+ #[doc = " that allows the host to \\a only write, and the device to read \\a and write data. The written data will never be visible"]
+ #[doc = " on the host side and will generally not be visible on other devices."]
+ #[doc = ""]
+ #[doc = " If @ref rtBufferGetDevicePointer has been called for a single device for a given buffer,"]
+ #[doc = " the user can change the buffer's content on that device through the pointer. OptiX must then synchronize the new buffer contents to all devices."]
+ #[doc = " These synchronization copies occur at every @ref rtContextLaunch \"rtContextLaunch\", unless the buffer is created with @ref RT_BUFFER_COPY_ON_DIRTY."]
+ #[doc = " In this case, @ref rtBufferMarkDirty can be used to notify OptiX that the buffer has been dirtied and must be synchronized."]
+ #[doc = ""]
+ #[doc = " The flag @ref RT_BUFFER_DISCARD_HOST_MEMORY can only be used in combination with @ref RT_BUFFER_INPUT. The data will be"]
+ #[doc = " synchronized to the devices as soon as the buffer is unmapped from the host using @ref rtBufferUnmap or"]
+ #[doc = " @ref rtBufferUnmapEx and the memory allocated on the host will be deallocated."]
+ #[doc = " It is preferred to map buffers created with the @ref RT_BUFFER_DISCARD_HOST_MEMORY using @ref rtBufferMapEx with the"]
+ #[doc = " @ref RT_BUFFER_MAP_WRITE_DISCARD option enabled. If it is mapped using @ref rtBufferMap or the @ref RT_BUFFER_MAP_WRITE"]
+ #[doc = " option instead, the data needs to be synchronized to the host during mapping."]
+ #[doc = " Note that the data that is allocated on the devices will not be deallocated until the buffer is destroyed."]
+ #[doc = ""]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if \\a buffer is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the buffer in"]
+ #[doc = " @param[in] bufferdesc Bitwise \\a or combination of the \\a type and \\a flags of the new buffer"]
+ #[doc = " @param[out] buffer The return handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " @ref RT_BUFFER_GPU_LOCAL was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromGLBO,"]
+ #[doc = " @ref rtBufferDestroy,"]
+ #[doc = " @ref rtBufferMarkDirty"]
+ #[doc = " @ref rtBufferBindProgressiveStream"]
+ #[doc = ""]
+ pub fn rtBufferCreate(
+ context: RTcontext,
+ bufferdesc: ::std::os::raw::c_uint,
+ buffer: *mut RTbuffer,
+ ) -> RTresult;
+}
+#[doc = " @brief Callback function used to demand load data for a buffer."]
+#[doc = ""]
+#[doc = " @ingroup Buffer"]
+#[doc = ""]
+#[doc = " <B>Description</B>"]
+#[doc = ""]
+#[doc = " @ref RTbuffercallback is implemented by the application. It is invoked by OptiX for each"]
+#[doc = " \\a requestedPage of the demand loaded \\a buffer referenced by the previous launch that was not"]
+#[doc = " resident in device memory. The callback should either fill the provided \\a block buffer with"]
+#[doc = " the requested \\a pageDataSizeInBytes of data and return \\a true, or return \\a false. When the"]
+#[doc = " callback returns \\a false, no data is transferred to the \\a buffer."]
+#[doc = ""]
+#[doc = " <b>CAUTION</b>: OptiX will invoke callback functions from multiple threads in order to satisfy"]
+#[doc = " pending requests in parallel. A user provided callback function should not allow exceptions to"]
+#[doc = " escape from their callback function."]
+#[doc = ""]
+#[doc = " @param[in] callbackData An arbitrary data pointer from the application when the callback was registered."]
+#[doc = " @param[in] buffer Handle of the buffer requesting pages."]
+#[doc = " @param[in] block A pointer to the @ref RTmemoryblock describing the memory to be filled with data."]
+#[doc = ""]
+#[doc = " <B>Return values</B>"]
+#[doc = ""]
+#[doc = " \\a non-zero The \\a block buffer was filled with \\a pageDataSizeInBytes of data."]
+#[doc = " \\a zero No data was written. No data will be transferred to the \\a buffer."]
+#[doc = " The same \\a block may be passed to the callback again after the next launch."]
+#[doc = ""]
+#[doc = " <B>History</B>"]
+#[doc = ""]
+#[doc = " @ref RTbuffercallback was introduced in OptiX 6.1"]
+#[doc = ""]
+#[doc = " <B>See also</B>"]
+#[doc = " @ref RTmemoryblock"]
+#[doc = " @ref rtBufferCreateFromCallback"]
+pub type RTbuffercallback = ::std::option::Option<
+ unsafe extern "C" fn(
+ callbackData: *mut ::std::os::raw::c_void,
+ buffer: RTbuffer,
+ block: *mut RTmemoryblock,
+ ) -> ::std::os::raw::c_int,
+>;
+extern "C" {
+ #[doc = " @brief Creates a buffer whose contents are loaded on demand."]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateFromCallback allocates and returns a new handle to a new buffer object in \\a *buffer associated"]
+ #[doc = " with \\a context. The backing storage of the buffer is managed by OptiX, but is filled on demand by the application."]
+ #[doc = " The backing storage is allocated in multiples of pages. Each page is a uniform size as described by the"]
+ #[doc = " \\a RT_BUFFER_ATTRIBUTE_PAGE_SIZE attribute. The backing storage may be smaller than the total size of storage needed"]
+ #[doc = " for the buffer, with OptiX managing the storage in conjunction with the application supplied \\a callback. A buffer"]
+ #[doc = " is specified by a bitwise \\a or combination of a \\a type and \\a flags in \\a bufferdesc. The only supported type is"]
+ #[doc = " @ref RT_BUFFER_INPUT as only input buffers can be demand loaded."]
+ #[doc = ""]
+ #[doc = " The supported flags are:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_BUFFER_LAYERED"]
+ #[doc = " - @ref RT_BUFFER_CUBEMAP"]
+ #[doc = ""]
+ #[doc = " If RT_BUFFER_LAYERED flag is set, buffer depth specifies the number of layers, not the depth of a 3D buffer."]
+ #[doc = " If RT_BUFFER_CUBEMAP flag is set, buffer depth specifies the number of cube faces, not the depth of a 3D buffer."]
+ #[doc = " See details in @ref rtBufferSetSize3D"]
+ #[doc = ""]
+ #[doc = " It is an error to call @ref rtBufferGetDevicePointer, @ref rtBufferMap or @ref rtBufferUnmap for a demand loaded buffer."]
+ #[doc = ""]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if either \\a callback or \\a buffer is \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the buffer in."]
+ #[doc = " @param[in] bufferdesc Bitwise \\a or combination of the \\a type and \\a flags of the new buffer."]
+ #[doc = " @param[in] callback The demand load callback. Most not be NULL."]
+ #[doc = " @param[in] callbackData An arbitrary pointer from the application that is passed to the callback. This may be \\a NULL."]
+ #[doc = " @param[out] buffer The return handle for the buffer object."]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateFromCallback was introduced in OptiX 6.1"]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref RTbuffercallback"]
+ #[doc = " @ref rtBufferDestroy"]
+ #[doc = ""]
+ pub fn rtBufferCreateFromCallback(
+ context: RTcontext,
+ bufferdesc: ::std::os::raw::c_uint,
+ callback: RTbuffercallback,
+ callbackData: *mut ::std::os::raw::c_void,
+ buffer: *mut RTbuffer,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroys a buffer object"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferDestroy removes \\a buffer from its context and deletes it."]
+ #[doc = " \\a buffer should be a value returned by @ref rtBufferCreate."]
+ #[doc = " After the call, \\a buffer is no longer a valid handle."]
+ #[doc = " Any API object that referenced \\a buffer will have its reference invalidated."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer Handle of the buffer to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferDestroy was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreate,"]
+ #[doc = " @ref rtBufferCreateFromGLBO"]
+ #[doc = ""]
+ pub fn rtBufferDestroy(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Validates the state of a buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferValidate checks \\a buffer for completeness. If \\a buffer has not had its dimensionality, size or format"]
+ #[doc = " set, this call will return @ref RT_ERROR_INVALID_CONTEXT."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to validate"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferValidate was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreate,"]
+ #[doc = " @ref rtBufferCreateFromGLBO"]
+ #[doc = " @ref rtContextValidate"]
+ #[doc = ""]
+ pub fn rtBufferValidate(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context object that created this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetContext returns a handle to the context that created \\a buffer in \\a *context."]
+ #[doc = " If \\a *context is \\a NULL, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its context"]
+ #[doc = " @param[out] context The return handle for the buffer's context"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetContext was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextCreate"]
+ #[doc = ""]
+ pub fn rtBufferGetContext(buffer: RTbuffer, context: *mut RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the format of this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetFormat changes the \\a format of \\a buffer to the specified value."]
+ #[doc = " The data elements of the buffer will have the specified type and can either be"]
+ #[doc = " vector formats, or a user-defined type whose size is specified with"]
+ #[doc = " @ref rtBufferSetElementSize. Possible values for \\a format are:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_FORMAT_HALF"]
+ #[doc = " - @ref RT_FORMAT_HALF2"]
+ #[doc = " - @ref RT_FORMAT_HALF3"]
+ #[doc = " - @ref RT_FORMAT_HALF4"]
+ #[doc = " - @ref RT_FORMAT_FLOAT"]
+ #[doc = " - @ref RT_FORMAT_FLOAT2"]
+ #[doc = " - @ref RT_FORMAT_FLOAT3"]
+ #[doc = " - @ref RT_FORMAT_FLOAT4"]
+ #[doc = " - @ref RT_FORMAT_BYTE"]
+ #[doc = " - @ref RT_FORMAT_BYTE2"]
+ #[doc = " - @ref RT_FORMAT_BYTE3"]
+ #[doc = " - @ref RT_FORMAT_BYTE4"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BYTE"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BYTE2"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BYTE3"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BYTE4"]
+ #[doc = " - @ref RT_FORMAT_SHORT"]
+ #[doc = " - @ref RT_FORMAT_SHORT2"]
+ #[doc = " - @ref RT_FORMAT_SHORT3"]
+ #[doc = " - @ref RT_FORMAT_SHORT4"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_SHORT"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_SHORT2"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_SHORT3"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_SHORT4"]
+ #[doc = " - @ref RT_FORMAT_INT"]
+ #[doc = " - @ref RT_FORMAT_INT2"]
+ #[doc = " - @ref RT_FORMAT_INT3"]
+ #[doc = " - @ref RT_FORMAT_INT4"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_INT"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_INT2"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_INT3"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_INT4"]
+ #[doc = " - @ref RT_FORMAT_LONG_LONG"]
+ #[doc = " - @ref RT_FORMAT_LONG_LONG2"]
+ #[doc = " - @ref RT_FORMAT_LONG_LONG3"]
+ #[doc = " - @ref RT_FORMAT_LONG_LONG4"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_LONG_LONG"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_LONG_LONG2"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_LONG_LONG3"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_LONG_LONG4"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BC1"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BC2"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BC3"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BC4"]
+ #[doc = " - @ref RT_FORMAT_BC4"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BC5"]
+ #[doc = " - @ref RT_FORMAT_BC5"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BC6H"]
+ #[doc = " - @ref RT_FORMAT_BC6H"]
+ #[doc = " - @ref RT_FORMAT_UNSIGNED_BC7"]
+ #[doc = " - @ref RT_FORMAT_USER"]
+ #[doc = ""]
+ #[doc = " Buffers of block-compressed formats like @ref RT_FORMAT_BC6H must be sized"]
+ #[doc = " to a quarter of the uncompressed view resolution in each dimension, i.e."]
+ #[doc = " @code rtBufferSetSize2D( buffer, width/4, height/4 ); @endcode"]
+ #[doc = " The base type of the internal buffer will then correspond to @ref RT_FORMAT_UNSIGNED_INT2"]
+ #[doc = " for BC1 and BC4 formats and @ref RT_FORMAT_UNSIGNED_INT4 for all other BC formats."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to have its format set"]
+ #[doc = " @param[in] format The target format of the buffer"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetFormat was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetFormat,"]
+ #[doc = " @ref rtBufferGetFormat,"]
+ #[doc = " @ref rtBufferGetFormat,"]
+ #[doc = " @ref rtBufferGetElementSize,"]
+ #[doc = " @ref rtBufferSetElementSize"]
+ #[doc = ""]
+ pub fn rtBufferSetFormat(buffer: RTbuffer, format: RTformat) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the format of this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetFormat returns, in \\a *format, the format of \\a buffer. See @ref rtBufferSetFormat for a listing"]
+ #[doc = " of @ref RTbuffer values."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its format"]
+ #[doc = " @param[out] format The return handle for the buffer's format"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetFormat was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetFormat,"]
+ #[doc = " @ref rtBufferGetFormat"]
+ #[doc = ""]
+ pub fn rtBufferGetFormat(buffer: RTbuffer, format: *mut RTformat) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Modifies the size in bytes of a buffer's individual elements"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetElementSize modifies the size in bytes of a buffer's user-formatted"]
+ #[doc = " elements. The target buffer is specified by \\a buffer, which should be a"]
+ #[doc = " value returned by @ref rtBufferCreate and should have format @ref RT_FORMAT_USER."]
+ #[doc = " The new size of the buffer's individual elements is specified by"]
+ #[doc = " \\a elementSize and should not be 0. If the buffer has"]
+ #[doc = " format @ref RT_FORMAT_USER, and \\a elementSize is not 0, then the buffer's individual"]
+ #[doc = " element size is set to \\a elemenSize and all storage associated with the buffer is reset."]
+ #[doc = " Otherwise, this call has no effect and returns either @ref RT_ERROR_TYPE_MISMATCH if"]
+ #[doc = " the buffer does not have format @ref RT_FORMAT_USER or @ref RT_ERROR_INVALID_VALUE if the"]
+ #[doc = " buffer has format @ref RT_FORMAT_USER but \\a elemenSize is 0."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer Specifies the buffer to be modified"]
+ #[doc = " @param[in] elementSize Specifies the new size in bytes of the buffer's individual elements"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_TYPE_MISMATCH"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetElementSize was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferGetElementSize,"]
+ #[doc = " @ref rtBufferCreate"]
+ #[doc = ""]
+ pub fn rtBufferSetElementSize(buffer: RTbuffer, elementSize: RTsize) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the size of a buffer's individual elements"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetElementSize queries the size of a buffer's elements. The target buffer"]
+ #[doc = " is specified by \\a buffer, which should be a value returned by"]
+ #[doc = " @ref rtBufferCreate. The size, in bytes, of the buffer's"]
+ #[doc = " individual elements is returned in \\a *elementSize."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if given a \\a NULL pointer."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer Specifies the buffer to be queried"]
+ #[doc = " @param[out] elementSize Returns the size of the buffer's individual elements"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_UNKNOWN"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetElementSize was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetElementSize,"]
+ #[doc = " @ref rtBufferCreate"]
+ #[doc = ""]
+ pub fn rtBufferGetElementSize(buffer: RTbuffer, elementSize: *mut RTsize) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the width and dimensionality of this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetSize1D sets the dimensionality of \\a buffer to 1 and sets its width to"]
+ #[doc = " \\a width."]
+ #[doc = " Fails with @ref RT_ERROR_ALREADY_MAPPED if called on a buffer that is mapped."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be resized"]
+ #[doc = " @param[in] width The width of the resized buffer"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_ALREADY_MAPPED"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetSize1D was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferSetSize1D(buffer: RTbuffer, width: RTsize) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Get the width of this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetSize1D stores the width of \\a buffer in \\a *width."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its dimensions"]
+ #[doc = " @param[out] width The return handle for the buffer's width"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetSize1D was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferGetSize1D(buffer: RTbuffer, width: *mut RTsize) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the width, height and dimensionality of this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetSize2D sets the dimensionality of \\a buffer to 2 and sets its width"]
+ #[doc = " and height to \\a width and \\a height, respectively. If \\a width or \\a height is"]
+ #[doc = " zero, they both must be zero."]
+ #[doc = " Fails with @ref RT_ERROR_ALREADY_MAPPED if called on a buffer that is mapped."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be resized"]
+ #[doc = " @param[in] width The width of the resized buffer"]
+ #[doc = " @param[in] height The height of the resized buffer"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_ALREADY_MAPPED"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetSize2D was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferSetSize2D(buffer: RTbuffer, width: RTsize, height: RTsize) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the width and height of this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetSize2D stores the width and height of \\a buffer in \\a *width and"]
+ #[doc = " \\a *height, respectively."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its dimensions"]
+ #[doc = " @param[out] width The return handle for the buffer's width"]
+ #[doc = " @param[out] height The return handle for the buffer's height"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetSize2D was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferGetSize2D(buffer: RTbuffer, width: *mut RTsize, height: *mut RTsize)
+ -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the width, height, depth and dimensionality of a buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetSize3D sets the dimensionality of \\a buffer to 3 and sets its width,"]
+ #[doc = " height and depth to \\a width, \\a height and \\a depth, respectively. If \\a width,"]
+ #[doc = " \\a height or \\a depth is zero, they all must be zero."]
+ #[doc = ""]
+ #[doc = " A 1D layered mipmapped buffer is allocated if \\a height is 1 and the @ref RT_BUFFER_LAYERED flag was set at buffer creating. The number of layers is determined by the \\a depth."]
+ #[doc = " A 2D layered mipmapped buffer is allocated if the @ref RT_BUFFER_LAYERED flag was set at buffer creating. The number of layers is determined by the \\a depth."]
+ #[doc = " A cubemap mipmapped buffer is allocated if the @ref RT_BUFFER_CUBEMAP flag was set at buffer creating. \\a width must be equal to \\a height and the number of cube faces is determined by the \\a depth,"]
+ #[doc = " it must be six or a multiple of six, if the @ref RT_BUFFER_LAYERED flag was also set."]
+ #[doc = " Layered, mipmapped and cubemap buffers are supported only as texture buffers."]
+ #[doc = ""]
+ #[doc = " Fails with @ref RT_ERROR_ALREADY_MAPPED if called on a buffer that is mapped."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be resized"]
+ #[doc = " @param[in] width The width of the resized buffer"]
+ #[doc = " @param[in] height The height of the resized buffer"]
+ #[doc = " @param[in] depth The depth of the resized buffer"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_ALREADY_MAPPED"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetSize3D was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferSetSize3D(
+ buffer: RTbuffer,
+ width: RTsize,
+ height: RTsize,
+ depth: RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the MIP level count of a buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetMipLevelCount sets the number of MIP levels to \\a levels. The default number of MIP levels is 1."]
+ #[doc = " Fails with @ref RT_ERROR_ALREADY_MAPPED if called on a buffer that is mapped."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be resized"]
+ #[doc = " @param[in] levels Number of mip levels"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_ALREADY_MAPPED"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetMipLevelCount was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferSetMipLevelCount(buffer: RTbuffer, levels: ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the width, height and depth of this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetSize3D stores the width, height and depth of \\a buffer in \\a *width,"]
+ #[doc = " \\a *height and \\a *depth, respectively."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its dimensions"]
+ #[doc = " @param[out] width The return handle for the buffer's width"]
+ #[doc = " @param[out] height The return handle for the buffer's height"]
+ #[doc = " @param[out] depth The return handle for the buffer's depth"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetSize3D was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferGetSize3D(
+ buffer: RTbuffer,
+ width: *mut RTsize,
+ height: *mut RTsize,
+ depth: *mut RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the width of buffer specific MIP level"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetMipLevelSize1D stores the width of \\a buffer in \\a *width."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its dimensions"]
+ #[doc = " @param[in] level The buffer MIP level index to be queried for its dimensions"]
+ #[doc = " @param[out] width The return handle for the buffer's width"]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetMipLevelSize1D was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferGetMipLevelSize1D(
+ buffer: RTbuffer,
+ level: ::std::os::raw::c_uint,
+ width: *mut RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the width, height of buffer specific MIP level"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetMipLevelSize2D stores the width, height of \\a buffer in \\a *width and"]
+ #[doc = " \\a *height respectively."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its dimensions"]
+ #[doc = " @param[in] level The buffer MIP level index to be queried for its dimensions"]
+ #[doc = " @param[out] width The return handle for the buffer's width"]
+ #[doc = " @param[out] height The return handle for the buffer's height"]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetMipLevelSize2D was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferGetMipLevelSize2D(
+ buffer: RTbuffer,
+ level: ::std::os::raw::c_uint,
+ width: *mut RTsize,
+ height: *mut RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the width, height and depth of buffer specific MIP level"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetMipLevelSize3D stores the width, height and depth of \\a buffer in \\a *width,"]
+ #[doc = " \\a *height and \\a *depth, respectively."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its dimensions"]
+ #[doc = " @param[in] level The buffer MIP level index to be queried for its dimensions"]
+ #[doc = " @param[out] width The return handle for the buffer's width"]
+ #[doc = " @param[out] height The return handle for the buffer's height"]
+ #[doc = " @param[out] depth The return handle for the buffer's depth"]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetMipLevelSize3D was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferGetMipLevelSize3D(
+ buffer: RTbuffer,
+ level: ::std::os::raw::c_uint,
+ width: *mut RTsize,
+ height: *mut RTsize,
+ depth: *mut RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the dimensionality and dimensions of a buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetSizev sets the dimensionality of \\a buffer to \\a dimensionality and"]
+ #[doc = " sets the dimensions of the buffer to the values stored at *\\a dims, which must contain"]
+ #[doc = " a number of values equal to \\a dimensionality. If any of values of \\a dims is zero"]
+ #[doc = " they must all be zero."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be resized"]
+ #[doc = " @param[in] dimensionality The dimensionality the buffer will be resized to"]
+ #[doc = " @param[in] dims The array of sizes for the dimension of the resize"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_ALREADY_MAPPED"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetSizev was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferSetSizev(
+ buffer: RTbuffer,
+ dimensionality: ::std::os::raw::c_uint,
+ dims: *const RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the dimensions of this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetSizev stores the dimensions of \\a buffer in \\a *dims. The number of"]
+ #[doc = " dimensions returned is specified by \\a dimensionality. The storage at \\a dims must be"]
+ #[doc = " large enough to hold the number of requested buffer dimensions."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its dimensions"]
+ #[doc = " @param[in] dimensionality The number of requested dimensions"]
+ #[doc = " @param[out] dims The array of dimensions to store to"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetSizev was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetMipLevelCount,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D"]
+ #[doc = ""]
+ pub fn rtBufferGetSizev(
+ buffer: RTbuffer,
+ dimensionality: ::std::os::raw::c_uint,
+ dims: *mut RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the dimensionality of this buffer object"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetDimensionality returns the dimensionality of \\a buffer in \\a"]
+ #[doc = " *dimensionality. The value returned will be one of 1, 2 or 3, corresponding to 1D, 2D"]
+ #[doc = " and 3D buffers, respectively."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its dimensionality"]
+ #[doc = " @param[out] dimensionality The return handle for the buffer's dimensionality"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetDimensionality was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " \\a rtBufferSetSize{1-2-3}D"]
+ #[doc = ""]
+ pub fn rtBufferGetDimensionality(
+ buffer: RTbuffer,
+ dimensionality: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the number of mipmap levels of this buffer object"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetMipLevelCount returns the number of mipmap levels. Default number of MIP levels is 1."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its number of mipmap levels"]
+ #[doc = " @param[out] level The return number of mipmap levels"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetMipLevelCount was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetMipLevelCount,"]
+ #[doc = " @ref rtBufferSetSize1D,"]
+ #[doc = " @ref rtBufferSetSize2D,"]
+ #[doc = " @ref rtBufferSetSize3D,"]
+ #[doc = " @ref rtBufferSetSizev,"]
+ #[doc = " @ref rtBufferGetMipLevelSize1D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize2D,"]
+ #[doc = " @ref rtBufferGetMipLevelSize3D,"]
+ #[doc = " @ref rtBufferGetSize1D,"]
+ #[doc = " @ref rtBufferGetSize2D,"]
+ #[doc = " @ref rtBufferGetSize3D,"]
+ #[doc = " @ref rtBufferGetSizev"]
+ #[doc = ""]
+ pub fn rtBufferGetMipLevelCount(
+ buffer: RTbuffer,
+ level: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Maps a buffer object to the host"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferMap returns a pointer, accessible by the host, in \\a *userPointer that"]
+ #[doc = " contains a mapped copy of the contents of \\a buffer. The memory pointed to by \\a *userPointer"]
+ #[doc = " can be written to or read from, depending on the type of \\a buffer. For"]
+ #[doc = " example, this code snippet demonstrates creating and filling an input buffer with"]
+ #[doc = " floats."]
+ #[doc = ""]
+ #[doc = "@code"]
+ #[doc = " RTbuffer buffer;"]
+ #[doc = " float* data;"]
+ #[doc = " rtBufferCreate(context, RT_BUFFER_INPUT, &buffer);"]
+ #[doc = " rtBufferSetFormat(buffer, RT_FORMAT_FLOAT);"]
+ #[doc = " rtBufferSetSize1D(buffer, 10);"]
+ #[doc = " rtBufferMap(buffer, (void*)&data);"]
+ #[doc = " for(int i = 0; i < 10; ++i)"]
+ #[doc = " data[i] = 4.f * i;"]
+ #[doc = " rtBufferUnmap(buffer);"]
+ #[doc = "@endcode"]
+ #[doc = " If \\a buffer has already been mapped, returns @ref RT_ERROR_ALREADY_MAPPED."]
+ #[doc = " If \\a buffer has size zero, the returned pointer is undefined."]
+ #[doc = ""]
+ #[doc = " Note that this call does not stop a progressive render if called on a stream buffer."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be mapped"]
+ #[doc = " @param[out] userPointer Return handle to a user pointer where the buffer will be mapped to"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_ALREADY_MAPPED"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferMap was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferUnmap,"]
+ #[doc = " @ref rtBufferMapEx,"]
+ #[doc = " @ref rtBufferUnmapEx"]
+ #[doc = ""]
+ pub fn rtBufferMap(buffer: RTbuffer, userPointer: *mut *mut ::std::os::raw::c_void)
+ -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Unmaps a buffer's storage from the host"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferUnmap unmaps a buffer from the host after a call to @ref rtBufferMap. @ref rtContextLaunch \"rtContextLaunch\" cannot be called"]
+ #[doc = " while buffers are still mapped to the host. A call to @ref rtBufferUnmap that does not follow a matching @ref rtBufferMap"]
+ #[doc = " call will return @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " Note that this call does not stop a progressive render if called with a stream buffer."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to unmap"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferUnmap was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferMap,"]
+ #[doc = " @ref rtBufferMapEx,"]
+ #[doc = " @ref rtBufferUnmapEx"]
+ #[doc = ""]
+ pub fn rtBufferUnmap(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Maps mipmap level of buffer object to the host"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferMapEx makes the buffer contents available on the host, either by returning a pointer in \\a *optixOwned, or by copying the contents"]
+ #[doc = " to a memory location pointed to by \\a userOwned. Calling @ref rtBufferMapEx with proper map flags can result in better performance than using @ref rtBufferMap, because"]
+ #[doc = " fewer synchronization copies are required in certain situations."]
+ #[doc = " @ref rtBufferMapEx with \\a mapFlags = @ref RT_BUFFER_MAP_READ_WRITE and \\a level = 0 is equivalent to @ref rtBufferMap."]
+ #[doc = ""]
+ #[doc = " Note that this call does not stop a progressive render if called on a stream buffer."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be mapped"]
+ #[doc = " @param[in] mapFlags Map flags, see below"]
+ #[doc = " @param[in] level The mipmap level to be mapped"]
+ #[doc = " @param[in] userOwned Not yet supported. Must be NULL"]
+ #[doc = " @param[out] optixOwned Return handle to a user pointer where the buffer will be mapped to"]
+ #[doc = ""]
+ #[doc = " The following flags are supported for mapFlags. They are mutually exclusive:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_BUFFER_MAP_READ"]
+ #[doc = " - @ref RT_BUFFER_MAP_WRITE"]
+ #[doc = " - @ref RT_BUFFER_MAP_READ_WRITE"]
+ #[doc = " - @ref RT_BUFFER_MAP_WRITE_DISCARD"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_ALREADY_MAPPED"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferMapEx was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferMap,"]
+ #[doc = " @ref rtBufferUnmap,"]
+ #[doc = " @ref rtBufferUnmapEx"]
+ #[doc = ""]
+ pub fn rtBufferMapEx(
+ buffer: RTbuffer,
+ mapFlags: ::std::os::raw::c_uint,
+ level: ::std::os::raw::c_uint,
+ userOwned: *mut ::std::os::raw::c_void,
+ optixOwned: *mut *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Unmaps mipmap level storage from the host"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferUnmapEx unmaps buffer level from the host after a call to @ref rtBufferMapEx. @ref rtContextLaunch \"rtContextLaunch\" cannot be called"]
+ #[doc = " while buffers are still mapped to the host. A call to @ref rtBufferUnmapEx that does not follow a matching @ref rtBufferMapEx"]
+ #[doc = " call will return @ref RT_ERROR_INVALID_VALUE. @ref rtBufferUnmap is equivalent to @ref rtBufferUnmapEx with \\a level = 0."]
+ #[doc = ""]
+ #[doc = " Note that this call does not stop a progressive render if called with a stream buffer."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to unmap"]
+ #[doc = " @param[in] level The mipmap level to unmap"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferUnmapEx was introduced in OptiX 3.9."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferMap,"]
+ #[doc = " @ref rtBufferUnmap,"]
+ #[doc = " @ref rtBufferMapEx"]
+ #[doc = ""]
+ pub fn rtBufferUnmapEx(buffer: RTbuffer, level: ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets an id suitable for use with buffers of buffers"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetId returns an ID for the provided buffer. The returned ID is used on"]
+ #[doc = " the device to reference the buffer. It needs to be copied into a buffer of type @ref"]
+ #[doc = " RT_FORMAT_BUFFER_ID or used in a @ref rtBufferId object.. If \\a *bufferId is \\a NULL"]
+ #[doc = " or the \\a buffer is not a valid RTbuffer, returns @ref"]
+ #[doc = " RT_ERROR_INVALID_VALUE. @ref RT_BUFFER_ID_NULL can be used as a sentinel for a"]
+ #[doc = " non-existent buffer, since this value will never be returned as a valid buffer id."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its id"]
+ #[doc = " @param[out] bufferId The returned ID of the buffer"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetId was introduced in OptiX 3.5."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextGetBufferFromId"]
+ #[doc = ""]
+ pub fn rtBufferGetId(buffer: RTbuffer, bufferId: *mut ::std::os::raw::c_int) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets an RTbuffer corresponding to the buffer id"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetBufferFromId returns a handle to the buffer in \\a *buffer corresponding to"]
+ #[doc = " the \\a bufferId supplied. If \\a bufferId does not map to a valid buffer handle,"]
+ #[doc = " \\a *buffer is \\a NULL or if \\a context is invalid, returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context the buffer should be originated from"]
+ #[doc = " @param[in] bufferId The ID of the buffer to query"]
+ #[doc = " @param[out] buffer The return handle for the buffer object corresponding to the bufferId"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextGetBufferFromId was introduced in OptiX 3.5."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferGetId"]
+ #[doc = ""]
+ pub fn rtContextGetBufferFromId(
+ context: RTcontext,
+ bufferId: ::std::os::raw::c_int,
+ buffer: *mut RTbuffer,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Check whether stream buffer content has been updated by a Progressive Launch"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Returns whether or not the result of a progressive launch in \\a buffer has been updated"]
+ #[doc = " since the last time this function was called. A client application should use this call in its"]
+ #[doc = " main render/display loop to poll for frame refreshes after initiating a progressive launch. If \\a subframeCount and"]
+ #[doc = " \\a maxSubframes are non-null, they will be filled with the corresponding counters if and"]
+ #[doc = " only if \\a ready returns 1."]
+ #[doc = ""]
+ #[doc = " Note that this call does not stop a progressive render."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The stream buffer to be queried"]
+ #[doc = " @param[out] ready Ready flag. Will be set to 1 if an update is available, or 0 if no update is available."]
+ #[doc = " @param[out] subframeCount The number of subframes accumulated in the latest result"]
+ #[doc = " @param[out] maxSubframes The \\a maxSubframes parameter as specified in the call to @ref rtContextLaunchProgressive2D"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetProgressiveUpdateReady was introduced in OptiX 3.8."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextLaunchProgressive2D"]
+ #[doc = ""]
+ pub fn rtBufferGetProgressiveUpdateReady(
+ buffer: RTbuffer,
+ ready: *mut ::std::os::raw::c_int,
+ subframeCount: *mut ::std::os::raw::c_uint,
+ maxSubframes: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Bind a stream buffer to an output buffer source"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Binds an output buffer to a progressive stream. The output buffer thereby becomes the"]
+ #[doc = " data source for the stream. To form a valid output/stream pair, the stream buffer must be"]
+ #[doc = " of format @ref RT_FORMAT_UNSIGNED_BYTE4, and the output buffer must be of format @ref RT_FORMAT_FLOAT3 or @ref RT_FORMAT_FLOAT4."]
+ #[doc = " The use of @ref RT_FORMAT_FLOAT4 is recommended for performance reasons, even if the fourth component is unused."]
+ #[doc = " The output buffer must be of type @ref RT_BUFFER_OUTPUT; it may not be of type @ref RT_BUFFER_INPUT_OUTPUT."]
+ #[doc = ""]
+ #[doc = " @param[in] stream The stream buffer for which the source is to be specified"]
+ #[doc = " @param[in] source The output buffer to function as the stream's source"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferBindProgressiveStream was introduced in OptiX 3.8."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreate"]
+ #[doc = " @ref rtBufferSetAttribute"]
+ #[doc = " @ref rtBufferGetAttribute"]
+ #[doc = ""]
+ pub fn rtBufferBindProgressiveStream(stream: RTbuffer, source: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Set a buffer attribute"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Sets a buffer attribute. Currently, all available attributes refer to stream buffers only,"]
+ #[doc = " and attempting to set them on a non-stream buffer will generate an error."]
+ #[doc = ""]
+ #[doc = " Each attribute can have a different size. The sizes are given in the following list:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_BUFFER_ATTRIBUTE_STREAM_FORMAT strlen(input_string)"]
+ #[doc = " - @ref RT_BUFFER_ATTRIBUTE_STREAM_BITRATE sizeof(int)"]
+ #[doc = " - @ref RT_BUFFER_ATTRIBUTE_STREAM_FPS sizeof(int)"]
+ #[doc = " - @ref RT_BUFFER_ATTRIBUTE_STREAM_GAMMA sizeof(float)"]
+ #[doc = ""]
+ #[doc = " @ref RT_BUFFER_ATTRIBUTE_STREAM_FORMAT sets the encoding format used for streams sent over the network, specified as a string."]
+ #[doc = " The default is \"auto\". Various other common stream and image formats are available (e.g. \"h264\", \"png\"). This"]
+ #[doc = " attribute has no effect if the progressive API is used locally."]
+ #[doc = ""]
+ #[doc = " @ref RT_BUFFER_ATTRIBUTE_STREAM_BITRATE sets the target bitrate for streams sent over the network, if the stream format supports"]
+ #[doc = " it. The data is specified as a 32-bit integer. The default is 5000000. This attribute has no"]
+ #[doc = " effect if the progressive API is used locally or if the stream format does not support"]
+ #[doc = " variable bitrates."]
+ #[doc = ""]
+ #[doc = " @ref RT_BUFFER_ATTRIBUTE_STREAM_FPS sets the target update rate per second for streams sent over the network, if the stream"]
+ #[doc = " format supports it. The data is specified as a 32-bit integer. The default is 30. This"]
+ #[doc = " attribute has no effect if the progressive API is used locally or if the stream format does"]
+ #[doc = " not support variable framerates."]
+ #[doc = ""]
+ #[doc = " @ref RT_BUFFER_ATTRIBUTE_STREAM_GAMMA sets the gamma value for the built-in tonemapping operator. The data is specified as a"]
+ #[doc = " 32-bit float, the default is 1.0. Tonemapping is executed before encoding the"]
+ #[doc = " accumulated output into the stream, i.e. on the server side if remote rendering is used."]
+ #[doc = " See the section on Buffers below for more details."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer on which to set the attribute"]
+ #[doc = " @param[in] attrib The attribute to set"]
+ #[doc = " @param[in] size The size of the attribute value, in bytes"]
+ #[doc = " @param[in] p Pointer to the attribute value"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetAttribute was introduced in OptiX 3.8."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferGetAttribute"]
+ #[doc = ""]
+ pub fn rtBufferSetAttribute(
+ buffer: RTbuffer,
+ attrib: RTbufferattribute,
+ size: RTsize,
+ p: *const ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query a buffer attribute"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetAttribute is used to query buffer attributes. For a list of available attributes that can be set, please refer to @ref rtBufferSetAttribute."]
+ #[doc = " The attribute \\a RT_BUFFER_ATTRIBUTE_PAGE_SIZE can only be queried and returns the page size of a demand loaded buffer in bytes. The size of the data returned"]
+ #[doc = " for this attribute is \\a sizeof(int)."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to query the attribute from"]
+ #[doc = " @param[in] attrib The attribute to query"]
+ #[doc = " @param[in] size The size of the attribute value, in bytes. For string attributes, this is the maximum buffer size the returned string will use (including a terminating null character)."]
+ #[doc = " @param[out] p Pointer to the attribute value to be filled in. Must point to valid memory of at least \\a size bytes."]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetAttribute was introduced in OptiX 3.8."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferSetAttribute"]
+ #[doc = ""]
+ pub fn rtBufferGetAttribute(
+ buffer: RTbuffer,
+ attrib: RTbufferattribute,
+ size: RTsize,
+ p: *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new post-processing stage"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageCreateBuiltin creates a new post-processing stage selected from a list of"]
+ #[doc = " pre-defined post-processing stages. The \\a context specifies the target context, and should be"]
+ #[doc = " a value returned by @ref rtContextCreate."]
+ #[doc = " Sets \\a *stage to the handle of a newly created stage within \\a context."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies the rendering context to which the post-processing stage belongs"]
+ #[doc = " @param[in] builtinName The name of the built-in stage to instantiate"]
+ #[doc = " @param[out] stage New post-processing stage handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageCreateBuiltin was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPostProcessingStageDestroy,"]
+ #[doc = " @ref rtPostProcessingStageGetContext,"]
+ #[doc = " @ref rtPostProcessingStageQueryVariable,"]
+ #[doc = " @ref rtPostProcessingStageGetVariableCount"]
+ #[doc = " @ref rtPostProcessingStageGetVariable"]
+ #[doc = ""]
+ pub fn rtPostProcessingStageCreateBuiltin(
+ context: RTcontext,
+ builtinName: *const ::std::os::raw::c_char,
+ stage: *mut RTpostprocessingstage,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroy a post-processing stage"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageDestroy destroys a post-processing stage from its context and deletes"]
+ #[doc = " it. The variables built into the stage are destroyed. After the call, \\a stage is no longer a valid handle."]
+ #[doc = " After a post-processing stage was destroyed all command lists containing that stage are invalidated and"]
+ #[doc = " can no longer be used."]
+ #[doc = ""]
+ #[doc = " @param[in] stage Handle of the post-processing stage to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageDestroy was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPostProcessingStageCreateBuiltin,"]
+ #[doc = " @ref rtPostProcessingStageGetContext,"]
+ #[doc = " @ref rtPostProcessingStageQueryVariable,"]
+ #[doc = " @ref rtPostProcessingStageGetVariableCount"]
+ #[doc = " @ref rtPostProcessingStageGetVariable"]
+ #[doc = ""]
+ pub fn rtPostProcessingStageDestroy(stage: RTpostprocessingstage) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a new named variable associated with a PostprocessingStage"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageDeclareVariable declares a new variable associated with a"]
+ #[doc = " postprocessing stage. \\a stage specifies the post-processing stage, and should be a value"]
+ #[doc = " returned by @ref rtPostProcessingStageCreateBuiltin. \\a name specifies the name of the variable, and"]
+ #[doc = " should be a \\a NULL-terminated string. If there is currently no variable associated with \\a"]
+ #[doc = " stage named \\a name, a new variable named \\a name will be created and associated with"]
+ #[doc = " \\a stage. After the call, \\a *v will be set to the handle of the newly-created"]
+ #[doc = " variable. Otherwise, \\a *v will be set to \\a NULL. After declaration, the variable can be"]
+ #[doc = " queried with @ref rtPostProcessingStageQueryVariable or @ref rtPostProcessingStageGetVariable. A"]
+ #[doc = " declared variable does not have a type until its value is set with one of the @ref rtVariableSet"]
+ #[doc = " functions. Once a variable is set, its type cannot be changed anymore."]
+ #[doc = ""]
+ #[doc = " @param[in] stage Specifies the associated postprocessing stage"]
+ #[doc = " @param[in] name The name that identifies the variable"]
+ #[doc = " @param[out] v Returns a handle to a newly declared variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageDeclareVariable was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref Variables,"]
+ #[doc = " @ref rtPostProcessingStageQueryVariable,"]
+ #[doc = " @ref rtPostProcessingStageGetVariable"]
+ #[doc = ""]
+ pub fn rtPostProcessingStageDeclareVariable(
+ stage: RTpostprocessingstage,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context associated with a post-processing stage."]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageGetContext queries a stage for its associated context."]
+ #[doc = " \\a stage specifies the post-processing stage to query, and should be a value"]
+ #[doc = " returned by @ref rtPostProcessingStageCreateBuiltin. If both parameters are valid,"]
+ #[doc = " \\a *context is set to the context associated with \\a stage. Otherwise, the call"]
+ #[doc = " has no effect and returns @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = ""]
+ #[doc = " @param[in] stage Specifies the post-processing stage to query"]
+ #[doc = " @param[out] context Returns the context associated with the material"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageGetContext was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPostProcessingStageCreateBuiltin,"]
+ #[doc = " @ref rtPostProcessingStageDestroy,"]
+ #[doc = " @ref rtPostProcessingStageQueryVariable,"]
+ #[doc = " @ref rtPostProcessingStageGetVariableCount"]
+ #[doc = " @ref rtPostProcessingStageGetVariable"]
+ #[doc = ""]
+ pub fn rtPostProcessingStageGetContext(
+ stage: RTpostprocessingstage,
+ context: *mut RTcontext,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a handle to a named variable of a post-processing stage"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageQueryVariable queries the handle of a post-processing stage's named"]
+ #[doc = " variable. \\a stage specifies the source post-processing stage, as returned by"]
+ #[doc = " @ref rtPostProcessingStageCreateBuiltin. \\a name specifies the name of the variable, and should be a"]
+ #[doc = " \\a NULL -terminated string. If \\a name is the name of a variable attached to \\a stage, the call"]
+ #[doc = " returns a handle to that variable in \\a *variable, otherwise \\a NULL. Only pre-defined variables of that"]
+ #[doc = " built-in stage type can be queried. It is not possible to add or remove variables."]
+ #[doc = ""]
+ #[doc = " @param[in] stage The post-processing stage to query the variable from"]
+ #[doc = " @param[in] name The name that identifies the variable to be queried"]
+ #[doc = " @param[out] variable Returns the named variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageQueryVariable was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPostProcessingStageCreateBuiltin,"]
+ #[doc = " @ref rtPostProcessingStageDestroy,"]
+ #[doc = " @ref rtPostProcessingStageGetContext,"]
+ #[doc = " @ref rtPostProcessingStageGetVariableCount"]
+ #[doc = " @ref rtPostProcessingStageGetVariable"]
+ #[doc = ""]
+ pub fn rtPostProcessingStageQueryVariable(
+ stage: RTpostprocessingstage,
+ name: *const ::std::os::raw::c_char,
+ variable: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the number of variables pre-defined in a post-processing stage."]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageGetVariableCount returns the number of variables which are pre-defined"]
+ #[doc = " in a post-processing stage. This can be used to iterate over the variables. Sets \\a *count to the"]
+ #[doc = " number."]
+ #[doc = ""]
+ #[doc = " @param[in] stage The post-processing stage to query the number of variables from"]
+ #[doc = " @param[out] count Returns the number of pre-defined variables"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageGetVariableCount was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPostProcessingStageCreateBuiltin,"]
+ #[doc = " @ref rtPostProcessingStageDestroy,"]
+ #[doc = " @ref rtPostProcessingStageGetContext,"]
+ #[doc = " @ref rtPostProcessingStageQueryVariable,"]
+ #[doc = " @ref rtPostProcessingStageGetVariable"]
+ #[doc = ""]
+ pub fn rtPostProcessingStageGetVariableCount(
+ stage: RTpostprocessingstage,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns a handle to a variable of a post-processing stage. The variable is defined by index."]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageGetVariable queries the handle of a post-processing stage's variable which"]
+ #[doc = " is identified by its index . \\a stage specifies the source post-processing stage, as returned by"]
+ #[doc = " @ref rtPostProcessingStageCreateBuiltin. \\a index specifies the index of the variable, and should be a"]
+ #[doc = " less than the value return by @ref rtPostProcessingStageGetVariableCount. If \\a index is in the valid"]
+ #[doc = " range, the call returns a handle to that variable in \\a *variable, otherwise \\a NULL."]
+ #[doc = ""]
+ #[doc = " @param[in] stage The post-processing stage to query the variable from"]
+ #[doc = " @param[in] index The index identifying the variable to be returned"]
+ #[doc = " @param[out] variable Returns the variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtPostProcessingStageGetVariable was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtPostProcessingStageCreateBuiltin,"]
+ #[doc = " @ref rtPostProcessingStageDestroy,"]
+ #[doc = " @ref rtPostProcessingStageGetContext,"]
+ #[doc = " @ref rtPostProcessingStageQueryVariable,"]
+ #[doc = " @ref rtPostProcessingStageGetVariableCount"]
+ #[doc = ""]
+ pub fn rtPostProcessingStageGetVariable(
+ stage: RTpostprocessingstage,
+ index: ::std::os::raw::c_uint,
+ variable: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new command list"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListCreate creates a new command list. The \\a context specifies the target"]
+ #[doc = " context, and should be a value returned by @ref rtContextCreate. The call"]
+ #[doc = " sets \\a *list to the handle of a newly created list within \\a context."]
+ #[doc = " Returns @ref RT_ERROR_INVALID_VALUE if \\a list is \\a NULL."]
+ #[doc = ""]
+ #[doc = " A command list can be used to assemble a list of different types of commands and execute them"]
+ #[doc = " later. At this point, commands can be built-in post-processing stages or context launches. Those"]
+ #[doc = " are appended to the list using @ref rtCommandListAppendPostprocessingStage, and @ref"]
+ #[doc = " rtCommandListAppendLaunch2D, respectively. Commands will be executed in the order they have been"]
+ #[doc = " appended to the list. Thus later commands can use the results of earlier commands. Note that"]
+ #[doc = " all commands added to the created list must be associated with the same \\a context. It is"]
+ #[doc = " invalid to mix commands from different contexts."]
+ #[doc = ""]
+ #[doc = " @param[in] context Specifies the rendering context of the command list"]
+ #[doc = " @param[out] list New command list handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListCreate was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListDestroy,"]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage,"]
+ #[doc = " @ref rtCommandListAppendLaunch2D,"]
+ #[doc = " @ref rtCommandListFinalize,"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = ""]
+ pub fn rtCommandListCreate(context: RTcontext, list: *mut RTcommandlist) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Destroy a command list"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListDestroy destroys a command list from its context and deletes it. After the"]
+ #[doc = " call, \\a list is no longer a valid handle. Any stages associated with the command list are not destroyed."]
+ #[doc = ""]
+ #[doc = " @param[in] list Handle of the command list to destroy"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListDestroy was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListCreate,"]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage,"]
+ #[doc = " @ref rtCommandListAppendLaunch2D,"]
+ #[doc = " @ref rtCommandListFinalize,"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = ""]
+ pub fn rtCommandListDestroy(list: RTcommandlist) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Append a post-processing stage to the command list \\a list"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage appends a post-processing stage to the command list"]
+ #[doc = " \\a list. The command list must have been created from the same context as the the post-processing"]
+ #[doc = " stage."]
+ #[doc = " The launchWidth and launchHeight specify the launch dimensions and may be different than the"]
+ #[doc = " input or output buffers associated with each post-processing stage depending on the requirements"]
+ #[doc = " of the post-processing stage appended."]
+ #[doc = " It is invalid to call @ref rtCommandListAppendPostprocessingStage after calling @ref"]
+ #[doc = " rtCommandListFinalize."]
+ #[doc = ""]
+ #[doc = " NOTE: A post-processing stage can be added to multiple command lists or added to the same command"]
+ #[doc = " list multiple times. Also note that destroying a post-processing stage will invalidate all command"]
+ #[doc = " lists it was added to."]
+ #[doc = ""]
+ #[doc = " @param[in] list Handle of the command list to append to"]
+ #[doc = " @param[in] stage The post-processing stage to append to the command list"]
+ #[doc = " @param[in] launchWidth This is a hint for the width of the launch dimensions to use for this stage."]
+ #[doc = " The stage can ignore this and use a suitable launch width instead."]
+ #[doc = " @param[in] launchHeight This is a hint for the height of the launch dimensions to use for this stage."]
+ #[doc = " The stage can ignore this and use a suitable launch height instead."]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListCreate,"]
+ #[doc = " @ref rtCommandListDestroy,"]
+ #[doc = " @ref rtCommandListAppendLaunch2D,"]
+ #[doc = " @ref rtCommandListFinalize,"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = " @ref rtPostProcessingStageCreateBuiltin,"]
+ #[doc = ""]
+ pub fn rtCommandListAppendPostprocessingStage(
+ list: RTcommandlist,
+ stage: RTpostprocessingstage,
+ launchWidth: RTsize,
+ launchHeight: RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Append a 1D launch to the command list \\a list"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListAppendLaunch1D appends a 1D context launch to the command list \\a list. It is"]
+ #[doc = " invalid to call @ref rtCommandListAppendLaunch1D after calling @ref rtCommandListFinalize."]
+ #[doc = ""]
+ #[doc = " @param[in] list Handle of the command list to append to"]
+ #[doc = " @param[in] entryPointIndex The initial entry point into the kernel"]
+ #[doc = " @param[in] launchWidth Width of the computation grid"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListAppendLaunch2D was introduced in OptiX 6.1."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListCreate,"]
+ #[doc = " @ref rtCommandListDestroy,"]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage,"]
+ #[doc = " @ref rtCommandListAppendLaunch2D,"]
+ #[doc = " @ref rtCommandListAppendLaunch3D,"]
+ #[doc = " @ref rtCommandListFinalize,"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = ""]
+ pub fn rtCommandListAppendLaunch1D(
+ list: RTcommandlist,
+ entryPointIndex: ::std::os::raw::c_uint,
+ launchWidth: RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Append a 2D launch to the command list \\a list"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListAppendLaunch2D appends a 2D context launch to the command list \\a list. It is"]
+ #[doc = " invalid to call @ref rtCommandListAppendLaunch2D after calling @ref rtCommandListFinalize."]
+ #[doc = ""]
+ #[doc = " @param[in] list Handle of the command list to append to"]
+ #[doc = " @param[in] entryPointIndex The initial entry point into the kernel"]
+ #[doc = " @param[in] launchWidth Width of the computation grid"]
+ #[doc = " @param[in] launchHeight Height of the computation grid"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListAppendLaunch2D was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListCreate,"]
+ #[doc = " @ref rtCommandListDestroy,"]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage,"]
+ #[doc = " @ref rtCommandListAppendLaunch1D,"]
+ #[doc = " @ref rtCommandListAppendLaunch3D,"]
+ #[doc = " @ref rtCommandListFinalize,"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = ""]
+ pub fn rtCommandListAppendLaunch2D(
+ list: RTcommandlist,
+ entryPointIndex: ::std::os::raw::c_uint,
+ launchWidth: RTsize,
+ launchHeight: RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Append a 3D launch to the command list \\a list"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListAppendLaunch3D appends a 3D context launch to the command list \\a list. It is"]
+ #[doc = " invalid to call @ref rtCommandListAppendLaunch3D after calling @ref rtCommandListFinalize."]
+ #[doc = ""]
+ #[doc = " @param[in] list Handle of the command list to append to"]
+ #[doc = " @param[in] entryPointIndex The initial entry point into the kernel"]
+ #[doc = " @param[in] launchWidth Width of the computation grid"]
+ #[doc = " @param[in] launchHeight Height of the computation grid"]
+ #[doc = " @param[in] launchDepth Depth of the computation grid"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListAppendLaunch2D was introduced in OptiX 6.1."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListCreate,"]
+ #[doc = " @ref rtCommandListDestroy,"]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage,"]
+ #[doc = " @ref rtCommandListAppendLaunch1D,"]
+ #[doc = " @ref rtCommandListAppendLaunch2D,"]
+ #[doc = " @ref rtCommandListFinalize,"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = ""]
+ pub fn rtCommandListAppendLaunch3D(
+ list: RTcommandlist,
+ entryPointIndex: ::std::os::raw::c_uint,
+ launchWidth: RTsize,
+ launchHeight: RTsize,
+ launchDepth: RTsize,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the devices to use for this command list."]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListSetDevices specifies a list of hardware devices to use for this command list. This"]
+ #[doc = " must be a subset of the currently active devices, see @ref rtContextSetDevices. If not set then all the"]
+ #[doc = " active devices will be used."]
+ #[doc = ""]
+ #[doc = " @param[in] list Handle of the command list to set devices for"]
+ #[doc = " @param[in] count The number of devices in the list"]
+ #[doc = " @param[in] devices The list of devices"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextSetDevices,"]
+ #[doc = " @ref rtCommandListCreate,"]
+ #[doc = " @ref rtCommandListDestroy,"]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage,"]
+ #[doc = " @ref rtCommandListAppendLaunch2D,"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = ""]
+ pub fn rtCommandListSetDevices(
+ list: RTcommandlist,
+ count: ::std::os::raw::c_uint,
+ devices: *const ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Retrieve a list of hardware devices being used by the command list."]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListGetDevices retrieves a list of hardware devices used by the command list."]
+ #[doc = " Note that the device numbers are OptiX device ordinals, which may not be the same as CUDA device ordinals."]
+ #[doc = " Use @ref rtDeviceGetAttribute with @ref RT_DEVICE_ATTRIBUTE_CUDA_DEVICE_ORDINAL to query the CUDA device"]
+ #[doc = " corresponding to a particular OptiX device."]
+ #[doc = ""]
+ #[doc = " Note that if the list of set devices is empty then all active devices will be used."]
+ #[doc = ""]
+ #[doc = " @param[in] list The command list to which the hardware list is applied"]
+ #[doc = " @param[out] devices Return parameter for the list of devices. The memory must be able to hold entries"]
+ #[doc = " numbering least the number of devices as returned by @ref rtCommandListGetDeviceCount"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListSetDevices,"]
+ #[doc = " @ref rtCommandListCreate,"]
+ #[doc = " @ref rtCommandListDestroy,"]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage,"]
+ #[doc = " @ref rtCommandListAppendLaunch2D,"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = ""]
+ pub fn rtCommandListGetDevices(
+ list: RTcommandlist,
+ devices: *mut ::std::os::raw::c_int,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Query the number of devices currently being used by the command list."]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListGetDeviceCount queries the number of devices currently being used."]
+ #[doc = ""]
+ #[doc = " @param[in] list The command list containing the devices"]
+ #[doc = " @param[out] count Return parameter for the device count"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListSetDevices,"]
+ #[doc = " @ref rtCommandListCreate,"]
+ #[doc = " @ref rtCommandListDestroy,"]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage,"]
+ #[doc = " @ref rtCommandListAppendLaunch2D,"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = ""]
+ pub fn rtCommandListGetDeviceCount(
+ list: RTcommandlist,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Finalize the command list. This must be done before executing the command list."]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListFinalize finalizes the command list. This will do all work necessary to"]
+ #[doc = " prepare the command list for execution. Specifically it will do all work which can be shared"]
+ #[doc = " between subsequent calls to @ref rtCommandListExecute."]
+ #[doc = " It is invalid to call @ref rtCommandListExecute before calling @ref rtCommandListFinalize. It is"]
+ #[doc = " invalid to call @ref rtCommandListAppendPostprocessingStage or"]
+ #[doc = " @ref rtCommandListAppendLaunch2D after calling finalize and will result in an error. Also"]
+ #[doc = " @ref rtCommandListFinalize can only be called once on each command list."]
+ #[doc = ""]
+ #[doc = " @param[in] list Handle of the command list to finalize"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListFinalize was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListCreate,"]
+ #[doc = " @ref rtCommandListDestroy,"]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage,"]
+ #[doc = " @ref rtCommandListAppendLaunch2D,"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = ""]
+ pub fn rtCommandListFinalize(list: RTcommandlist) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Execute the command list."]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListExecute executes the command list. All added commands will be executed in the"]
+ #[doc = " order in which they were added. Commands can access the results of earlier executed commands."]
+ #[doc = " This must be called after calling @ref rtCommandListFinalize, otherwise an error will be returned"]
+ #[doc = " and the command list is not executed."]
+ #[doc = " @ref rtCommandListExecute can be called multiple times, but only one call may be active at the"]
+ #[doc = " same time. Overlapping calls from multiple threads will result in undefined behavior."]
+ #[doc = ""]
+ #[doc = " @param[in] list Handle of the command list to execute"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListExecute was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListCreate,"]
+ #[doc = " @ref rtCommandListDestroy,"]
+ #[doc = " @ref rtCommandListAppendPostprocessingStage,"]
+ #[doc = " @ref rtCommandListAppendLaunch2D,"]
+ #[doc = " @ref rtCommandListFinalize,"]
+ #[doc = ""]
+ pub fn rtCommandListExecute(list: RTcommandlist) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the context associated with a command list"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListGetContext queries the context associated with a command list. The"]
+ #[doc = " target command list is specified by \\a list. The context of the command list is"]
+ #[doc = " returned to \\a *context if the pointer \\a context is not \\a NULL. If \\a list is"]
+ #[doc = " not a valid command list, \\a *context is set to \\a NULL and @ref RT_ERROR_INVALID_VALUE is"]
+ #[doc = " returned."]
+ #[doc = ""]
+ #[doc = " @param[in] list Specifies the command list to be queried"]
+ #[doc = " @param[out] context Returns the context associated with the command list"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListGetContext was introduced in OptiX 5.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtContextDeclareVariable"]
+ #[doc = ""]
+ pub fn rtCommandListGetContext(list: RTcommandlist, context: *mut RTcontext) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the attribute program on a GeometryTriangles object"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetAttributeProgram sets for \\a geometrytriangles the \\a"]
+ #[doc = " program that performs attribute computation. RTprograms can be either generated with"]
+ #[doc = " @ref rtProgramCreateFromPTXFile or @ref rtProgramCreateFromPTXString. An attribute"]
+ #[doc = " program is optional. If no attribute program is specified, a default attribute"]
+ #[doc = " program will be provided. Attributes are computed after intersection and before any-"]
+ #[doc = " hit or closest-hit programs that require those attributes. No assumptions about the"]
+ #[doc = " precise invocation time should be made."]
+ #[doc = " The default attribute program provides the attribute rtTriangleBarycentrics of type float2."]
+ #[doc = ""]
+ #[doc = " Names are case sensitive and types must match. To use the attribute, declare the following"]
+ #[doc = " rtDeclareVariable( float2, barycentrics, attribute rtTriangleBarycentrics, );"]
+ #[doc = ""]
+ #[doc = " If you provide an attribute program, the following device side functions will be available:"]
+ #[doc = " float2 rtGetTriangleBarycentrics();"]
+ #[doc = " unsigned int rtGetPrimitiveIndex();"]
+ #[doc = " bool rtIsTriangleHit();"]
+ #[doc = " bool rtIsTriangleHitFrontFace();"]
+ #[doc = " bool rtIsTriangleHitBackFace();"]
+ #[doc = ""]
+ #[doc = " besides other semantics such as the ray time for motion blur."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles The geometrytriangles node for which to set the attribute program"]
+ #[doc = " @param[in] program A handle to the attribute program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesSetAttributeProgram was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetAttributeProgram,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramCreateFromPTXString,"]
+ #[doc = " @ref rtGetTriangleBarycentrics,"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesSetAttributeProgram(
+ geometrytriangles: RTgeometrytriangles,
+ program: RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the attribute program of a GeometryTriangles object"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetAttributeProgram gets the attribute \\a program of a given"]
+ #[doc = " \\a geometrytriangles object. If no program has been set, 0 is returned."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles The geometrytriangles node for which to set the attribute program"]
+ #[doc = " @param[out] program A pointer to a handle to the attribute program"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetAttributeProgram was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesDeclareVariable,"]
+ #[doc = " @ref rtGeometryTrianglesSetAttributeProgram,"]
+ #[doc = " @ref rtProgramCreateFromPTXFile,"]
+ #[doc = " @ref rtProgramCreateFromPTXString"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetAttributeProgram(
+ geometrytriangles: RTgeometrytriangles,
+ program: *mut RTprogram,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a geometry variable for a GeometryTriangles object"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesDeclareVariable declares a \\a variable attribute of a \\a geometrytriangles object with"]
+ #[doc = " a specified \\a name."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles A geometry node"]
+ #[doc = " @param[in] name The name of the variable"]
+ #[doc = " @param[out] v A pointer to a handle to the variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesDeclareVariable was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetVariable,"]
+ #[doc = " @ref rtGeometryTrianglesGetVariableCount,"]
+ #[doc = " @ref rtGeometryTrianglesQueryVariable,"]
+ #[doc = " @ref rtGeometryTrianglesRemoveVariable"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesDeclareVariable(
+ geometrytriangles: RTgeometrytriangles,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Queries a variable attached to a GeometryTriangles object"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesQueryVariable gets a variable with a given \\a name from"]
+ #[doc = " a \\a geometrytriangles object."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles A geometrytriangles object"]
+ #[doc = " @param[in] name Thee name of the variable"]
+ #[doc = " @param[out] v A pointer to a handle to the variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesQueryVariable was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesGetVariable,"]
+ #[doc = " @ref rtGeometryTrianglesGetVariableCount,"]
+ #[doc = " @ref rtGeometryTrianglesQueryVariable,"]
+ #[doc = " @ref rtGeometryTrianglesRemoveVariable"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesQueryVariable(
+ geometrytriangles: RTgeometrytriangles,
+ name: *const ::std::os::raw::c_char,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Removes a variable from GeometryTriangles object"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesRemoveVariable removes a variable from"]
+ #[doc = " a \\a geometrytriangles object."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles A geometrytriangles object"]
+ #[doc = " @param[in] v A pointer to a handle to the variable"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesRemoveVariable was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesDeclareVariable,"]
+ #[doc = " @ref rtGeometryTrianglesGetVariable,"]
+ #[doc = " @ref rtGeometryTrianglesGetVariableCount,"]
+ #[doc = " @ref rtGeometryTrianglesQueryVariable"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesRemoveVariable(
+ geometrytriangles: RTgeometrytriangles,
+ v: RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Get the number of variables attached to a GeometryTriangles object"]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetVariableCount returns a \\a count of the number"]
+ #[doc = " of variables attached to a \\a geometrytriangles object."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles A geometrytriangles node"]
+ #[doc = " @param[out] count A pointer to an unsigned int"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetVariableCount was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesDeclareVariable,"]
+ #[doc = " @ref rtGeometryTrianglesGetVariable,"]
+ #[doc = " @ref rtGeometryTrianglesQueryVariable,"]
+ #[doc = " @ref rtGeometryTrianglesRemoveVariable"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetVariableCount(
+ geometrytriangles: RTgeometrytriangles,
+ count: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Get a variable attached to a GeometryTriangles object at a specified index."]
+ #[doc = ""]
+ #[doc = " @ingroup GeometryTriangles"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetVariable returns the variable attached at a given"]
+ #[doc = " index to the specified GeometryTriangles object."]
+ #[doc = ""]
+ #[doc = " @param[in] geometrytriangles A geometry node"]
+ #[doc = " @param[in] index The index of the variable"]
+ #[doc = " @param[out] v A pointer to a variable handle"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtGeometryTrianglesGetVariable was introduced in OptiX 6.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtGeometryTrianglesDeclareVariable,"]
+ #[doc = " @ref rtGeometryTrianglesGetVariableCount,"]
+ #[doc = " @ref rtGeometryTrianglesQueryVariable,"]
+ #[doc = " @ref rtGeometryTrianglesRemoveVariable"]
+ #[doc = ""]
+ pub fn rtGeometryTrianglesGetVariable(
+ geometrytriangles: RTgeometrytriangles,
+ index: ::std::os::raw::c_uint,
+ v: *mut RTvariable,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new buffer object that will later rely on user-side CUDA allocation"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Deprecated in OptiX 4.0. Now forwards to @ref rtBufferCreate."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the buffer in"]
+ #[doc = " @param[in] bufferdesc Bitwise \\a or combination of the \\a type and \\a flags of the new buffer"]
+ #[doc = " @param[out] buffer The return handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateForCUDA was introduced in OptiX 3.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreate,"]
+ #[doc = " @ref rtBufferSetDevicePointer,"]
+ #[doc = " @ref rtBufferMarkDirty,"]
+ #[doc = " @ref rtBufferDestroy"]
+ #[doc = ""]
+ pub fn rtBufferCreateForCUDA(
+ context: RTcontext,
+ bufferdesc: ::std::os::raw::c_uint,
+ buffer: *mut RTbuffer,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the pointer to the buffer's data on the given device"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetDevicePointer returns the pointer to the data of \\a buffer on device \\a optix_device_ordinal in **\\a device_pointer."]
+ #[doc = ""]
+ #[doc = " If @ref rtBufferGetDevicePointer has been called for a single device for a given buffer,"]
+ #[doc = " the user can change the buffer's content on that device through the pointer. OptiX must then synchronize the new buffer contents to all devices."]
+ #[doc = " These synchronization copies occur at every @ref rtContextLaunch \"rtContextLaunch\", unless the buffer is created with @ref RT_BUFFER_COPY_ON_DIRTY."]
+ #[doc = " In this case, @ref rtBufferMarkDirty can be used to notify OptiX that the buffer has been dirtied and must be synchronized."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its device pointer"]
+ #[doc = " @param[in] optix_device_ordinal The number assigned by OptiX to the device"]
+ #[doc = " @param[out] device_pointer The return handle to the buffer's device pointer"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetDevicePointer was introduced in OptiX 3.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferMarkDirty,"]
+ #[doc = " @ref rtBufferSetDevicePointer"]
+ #[doc = ""]
+ pub fn rtBufferGetDevicePointer(
+ buffer: RTbuffer,
+ optix_device_ordinal: ::std::os::raw::c_int,
+ device_pointer: *mut *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets a buffer as dirty"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " If @ref rtBufferSetDevicePointer or @ref rtBufferGetDevicePointer have been called for a single device for a given buffer,"]
+ #[doc = " the user can change the buffer's content on that device through the pointer. OptiX must then synchronize the new buffer contents to all devices."]
+ #[doc = " These synchronization copies occur at every @ref rtContextLaunch, unless the buffer is declared with @ref RT_BUFFER_COPY_ON_DIRTY."]
+ #[doc = " In this case, @ref rtBufferMarkDirty can be used to notify OptiX that the buffer has been dirtied and must be synchronized."]
+ #[doc = ""]
+ #[doc = " Note that RT_BUFFER_COPY_ON_DIRTY currently only applies to CUDA interop buffers (buffers for which the application has a device pointer)."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be marked dirty"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferMarkDirty was introduced in OptiX 3.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferGetDevicePointer,"]
+ #[doc = " @ref rtBufferSetDevicePointer,"]
+ #[doc = " @ref RT_BUFFER_COPY_ON_DIRTY"]
+ #[doc = ""]
+ pub fn rtBufferMarkDirty(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets the pointer to the buffer's data on the given device"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetDevicePointer sets the pointer to the data of \\a buffer on device \\a optix_device_ordinal to \\a device_pointer."]
+ #[doc = ""]
+ #[doc = " If @ref rtBufferSetDevicePointer has been called for a single device for a given buffer,"]
+ #[doc = " the user can change the buffer's content on that device through the pointer. OptiX must then synchronize the new buffer contents to all devices."]
+ #[doc = " These synchronization copies occur at every @ref rtContextLaunch \"rtContextLaunch\", unless the buffer is declared with @ref RT_BUFFER_COPY_ON_DIRTY."]
+ #[doc = " In this case, @ref rtBufferMarkDirty can be used to notify OptiX that the buffer has been dirtied and must be synchronized."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer for which the device pointer is to be set"]
+ #[doc = " @param[in] optix_device_ordinal The number assigned by OptiX to the device"]
+ #[doc = " @param[in] device_pointer The pointer to the data on the specified device"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferSetDevicePointer was introduced in OptiX 3.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferMarkDirty,"]
+ #[doc = " @ref rtBufferGetDevicePointer"]
+ #[doc = ""]
+ pub fn rtBufferSetDevicePointer(
+ buffer: RTbuffer,
+ optix_device_ordinal: ::std::os::raw::c_int,
+ device_pointer: *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Sets a CUDA synchronization stream for the command list"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListSetCudaStream sets a CUDA synchronization stream for the command list. The"]
+ #[doc = " command list guarantees that all work on the synchronization stream finishes before any launches"]
+ #[doc = " of the command list executes on the GPU. It will also have the synchronization stream wait for"]
+ #[doc = " those launches to complete using CUDA events. This means cuda interop, such as memory copying"]
+ #[doc = " or kernel execution, can be done in a safe way both before and after executing a command list."]
+ #[doc = " If CUDA interop is made using streams other than the synchronization stream then CUDA events"]
+ #[doc = " must be used to make sure that the synchronization stream waits for all work done by other"]
+ #[doc = " streams, and also that the other streams wait for the synchronization stream after executing"]
+ #[doc = " the command list."]
+ #[doc = ""]
+ #[doc = " Note that the synchronization stream can be created on any active device, there is no need to"]
+ #[doc = " have one per device."]
+ #[doc = ""]
+ #[doc = " @param[in] list The command list buffer for which the stream is to be set"]
+ #[doc = " @param[in] stream The CUDA stream to set"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListSetCudaStream was introduced in OptiX 6.1."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListExecute"]
+ #[doc = " @ref rtCommandListGetCudaStream"]
+ #[doc = ""]
+ pub fn rtCommandListSetCudaStream(
+ list: RTcommandlist,
+ stream: *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the CUDA synchronization stream set for the command list"]
+ #[doc = ""]
+ #[doc = " @ingroup CommandList"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListGetCudaStream gets the CUDA synchronization stream set for the command list."]
+ #[doc = ""]
+ #[doc = " @param[in] list The command list buffer for which to get the stream"]
+ #[doc = " @param[out] stream Set to the CUDA stream of the command list"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtCommandListGetCudaStream was introduced in OptiX 6.1."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtCommandListSetCommandList"]
+ #[doc = ""]
+ pub fn rtCommandListGetCudaStream(
+ list: RTcommandlist,
+ stream: *mut *mut ::std::os::raw::c_void,
+ ) -> RTresult;
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct IDirect3DDevice9 {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct IDirect3DResource9 {
+ _unused: [u8; 0],
+}
+extern "C" {
+ #[doc = " @brief Binds a D3D9 device to a context and enables interop"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetD3D9Device binds \\a device to \\a context and enables D3D9 interop capabilities in \\a context. This"]
+ #[doc = " function must be executed once for \\a context before any call to @ref rtBufferCreateFromD3D9Resource or @ref rtTextureSamplerCreateFromD3D9Resource can"]
+ #[doc = " take place. A context can only be bound to one device. Once \\a device is bound to \\a context, the binding is immutable and remains upon destruction of \\a context."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to bind the device with"]
+ #[doc = " @param[in] device The D3D9 device to be used for interop with the associated context"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetD3D9Device was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D9Resource,"]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D9Resource"]
+ #[doc = ""]
+ pub fn rtContextSetD3D9Device(context: RTcontext, device: *mut IDirect3DDevice9) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the OptiX device number associated with the specified name of a D3D9 adapter"]
+ #[doc = ""]
+ #[doc = " @ingroup ContextFreeFunctions"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetD3D9Device returns in \\a device the OptiX device ID of the adapter represented by \\a pszAdapterName."]
+ #[doc = " \\a pszAdapterName is the DeviceName field in the \\a D3DADAPTER_IDENTIFIER9 struct. In combination with @ref rtContextSetDevices,"]
+ #[doc = " this function can be used to restrict OptiX to use only one device. The same device the D3D9 commands will be sent to."]
+ #[doc = ""]
+ #[doc = " This function is only supported on Windows platforms."]
+ #[doc = ""]
+ #[doc = " @param[in] device A handle to the memory location where the OptiX device ordinal associated with \\a pszAdapterName will be stored"]
+ #[doc = " @param[out] pszAdapterName The name of an adapter as can be found in the DeviceName field in the \\a D3DADAPTER_IDENTIFIER9 struct"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetD3D9Device was introduced in OptiX 2.5."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtDeviceGetDeviceCount"]
+ #[doc = ""]
+ pub fn rtDeviceGetD3D9Device(
+ device: *mut ::std::os::raw::c_int,
+ pszAdapterName: *const ::std::os::raw::c_char,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new buffer object from a D3D9 resource"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateFromD3D9Resource allocates and returns a handle to a new buffer object in \\a *buffer associated with"]
+ #[doc = " \\a context. If the allocated size of the D3D resource is \\a 0, @ref RT_ERROR_MEMORY_ALLOCATION_FAILED will be returned. Supported D3D9 buffer types are:"]
+ #[doc = ""]
+ #[doc = " - IDirect3DVertexBuffer9"]
+ #[doc = " - IDirect3DIndexBuffer9"]
+ #[doc = ""]
+ #[doc = " These buffers can be used to share data with D3D9; changes of the content in \\a buffer, either done by D3D9 or OptiX,"]
+ #[doc = " will be reflected automatically in both APIs. If the size, or format, of a D3D9 buffer is changed, appropriate OptiX"]
+ #[doc = " calls have to be used to update \\a buffer accordingly. OptiX keeps only a reference to D3D9 data, when \\a buffer is"]
+ #[doc = " destroyed, the state of \\a resource is unaltered."]
+ #[doc = ""]
+ #[doc = " The \\a type of this buffer is specified by one of the following values in \\a bufferdesc:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_BUFFER_INPUT"]
+ #[doc = " - @ref RT_BUFFER_OUTPUT"]
+ #[doc = " - @ref RT_BUFFER_INPUT_OUTPUT"]
+ #[doc = ""]
+ #[doc = " The type values are used to specify the direction of data flow from the host to the OptiX devices."]
+ #[doc = " @ref RT_BUFFER_INPUT specifies that the host may only write to the buffer and the device may only read from the buffer."]
+ #[doc = " @ref RT_BUFFER_OUTPUT specifies the opposite, read only access on the host and write only access on the device."]
+ #[doc = " Devices and the host may read and write from buffers of type @ref RT_BUFFER_INPUT_OUTPUT. Reading or writing to"]
+ #[doc = " a buffer of the incorrect type (e.g., the host writing to a buffer of type @ref RT_BUFFER_OUTPUT) is undefined."]
+ #[doc = ""]
+ #[doc = " Flags can be used to optimize data transfers between the host and it's devices. Currently no \\a flags are supported for"]
+ #[doc = " interop buffers."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the buffer in"]
+ #[doc = " @param[in] bufferdesc Bitwise \\a or combination of the \\a type and \\a flags of the new buffer"]
+ #[doc = " @param[in] resource The D3D9 resource handle for use in OptiX"]
+ #[doc = " @param[out] buffer The return handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateFromD3D9Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreate,"]
+ #[doc = " @ref rtBufferDestroy"]
+ #[doc = ""]
+ pub fn rtBufferCreateFromD3D9Resource(
+ context: RTcontext,
+ bufferdesc: ::std::os::raw::c_uint,
+ resource: *mut IDirect3DResource9,
+ buffer: *mut RTbuffer,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new texture sampler object from a D3D9 resource"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D9Resource allocates and returns a"]
+ #[doc = " handle to a new texture sampler object in \\a *texturesampler"]
+ #[doc = " associated with \\a context. If the allocated size of the D3D resource"]
+ #[doc = " is \\a 0, @ref RT_ERROR_MEMORY_ALLOCATION_FAILED will be returned. Supported"]
+ #[doc = " D3D9 texture types are:"]
+ #[doc = ""]
+ #[doc = " - IDirect3DSurface9"]
+ #[doc = ""]
+ #[doc = " - (derivatives of) IDirect3DBaseTexture9"]
+ #[doc = ""]
+ #[doc = " These texture samplers can be used to share data with D3D9; changes of"]
+ #[doc = " the content and size of \\a texturesampler done by D3D9 will be"]
+ #[doc = " reflected automatically in OptiX. Currently texture sampler data are"]
+ #[doc = " read only in OptiX programs. OptiX keeps only a reference to"]
+ #[doc = " D3D9 data, when \\a texturesampler is destroyed, the state of the"]
+ #[doc = " \\a resource is unaltered."]
+ #[doc = ""]
+ #[doc = " The array size and number of mipmap levels can't be changed for"]
+ #[doc = " texture samplers that encapsulate a D3D9 resource. Furthermore no"]
+ #[doc = " buffer objects can be queried. Please refer to the @ref InteropTypes for a"]
+ #[doc = " complete list of supported texture formats."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the texture sampler in"]
+ #[doc = " @param[in] resource The D3D9 resource handle for use in OptiX"]
+ #[doc = " @param[out] textureSampler The return handle for the texture sampler object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D9Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreate,"]
+ #[doc = " @ref rtTextureSamplerDestroy"]
+ #[doc = ""]
+ pub fn rtTextureSamplerCreateFromD3D9Resource(
+ context: RTcontext,
+ resource: *mut IDirect3DResource9,
+ textureSampler: *mut RTtexturesampler,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the D3D9 resource associated with this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetD3D9Resource stores the D3D9 resource pointer in \\a **resource if \\a buffer was created with"]
+ #[doc = " @ref rtBufferCreateFromD3D9Resource. If \\a buffer was not created from a D3D9 resource \\a **resource will be \\a 0 after"]
+ #[doc = " the call and @ref RT_ERROR_INVALID_VALUE is returned."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its D3D9 resource"]
+ #[doc = " @param[out] resource The return handle for the resource"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetD3D9Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D9Resource"]
+ #[doc = ""]
+ pub fn rtBufferGetD3D9Resource(
+ buffer: RTbuffer,
+ resource: *mut *mut IDirect3DResource9,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the D3D9 resource associated with this texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetD3D9Resource stores the D3D9 resource pointer in \\a **resource if \\a sampler was created with"]
+ #[doc = " @ref rtTextureSamplerGetD3D9Resource. If \\a sampler was not created from a D3D9 resource \\a resource will be 0 after"]
+ #[doc = " the call and @ref RT_ERROR_INVALID_VALUE is returned"]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The texture sampler to be queried for its D3D9 resource"]
+ #[doc = " @param[out] pResource The return handle for the resource"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetD3D9Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D9Resource"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetD3D9Resource(
+ textureSampler: RTtexturesampler,
+ pResource: *mut *mut IDirect3DResource9,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D9 buffer as immutable and accessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX buffer in an unregistered state can be registered to OptiX again via @ref rtBufferD3D9Register. Once registered,"]
+ #[doc = " properties like the size of the original D3D9 resource cannot be modified anymore. Calls to the corresponding D3D9 functions"]
+ #[doc = " will return with an error code. However, the data of the D3D9 resource can still be read and written by the appropriate D3D9 commands."]
+ #[doc = " When a buffer is already in a registered state @ref rtBufferD3D9Register will return @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED. A resource"]
+ #[doc = " must be registered in order to be used by OptiX. If a resource is not registered @ref RT_ERROR_INVALID_VALUE will be returned."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferD3D9Register was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtBufferD3D9Register(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D9 buffer as mutable and inaccessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX buffer in a registered state can be unregistered via @ref rtBufferD3D9Register. Once unregistered,"]
+ #[doc = " properties like the size of the original D3D9 resource can be changed. As long as a resource is unregistered,"]
+ #[doc = " OptiX will not be able to access the data and will fail with @ref RT_ERROR_INVALID_VALUE. When a buffer is already"]
+ #[doc = " in an unregistered state @ref rtBufferD3D9Unregister will return @ref RT_ERROR_RESOURCE_NOT_REGISTERED."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_NOT_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferD3D9Unregister was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtBufferD3D9Unregister(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D9 texture as immutable and accessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX texture sampler in an unregistered state can be registered to OptiX again via @ref rtTextureSamplerD3D9Register."]
+ #[doc = " Once registered, properties like the size of the original D3D9 resource cannot be modified anymore. Calls to the corresponding"]
+ #[doc = " D3D9 functions will return with an error code. However, the data of the D3D9 resource can still be read and written by the appropriate"]
+ #[doc = " D3D9 commands. When a texture sampler is already in a registered state @ref rtTextureSamplerD3D9Register will return @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED."]
+ #[doc = " A resource must be registered in order to be used by OptiX. If a resource is not registered @ref RT_ERROR_INVALID_VALUE will be returned."]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The handle for the texture object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerD3D9Register was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D9Resource"]
+ #[doc = ""]
+ pub fn rtTextureSamplerD3D9Register(textureSampler: RTtexturesampler) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D9 texture as mutable and inaccessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX texture sampler in a registered state can be unregistered via @ref rtTextureSamplerD3D9Unregister. Once unregistered,"]
+ #[doc = " properties like the size of the original D3D9 resource can be changed. As long as a resource is unregistered, OptiX will not"]
+ #[doc = " be able to access the data and will fail with @ref RT_ERROR_INVALID_VALUE. When a buffer is already in an unregistered state"]
+ #[doc = " @ref rtBufferD3D9Unregister will return @ref RT_ERROR_RESOURCE_NOT_REGISTERED."]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The handle for the texture object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_NOT_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerD3D9Unregister was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D9Resource"]
+ #[doc = ""]
+ pub fn rtTextureSamplerD3D9Unregister(textureSampler: RTtexturesampler) -> RTresult;
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct IDXGIAdapter {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct ID3D10Device {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct ID3D10Resource {
+ _unused: [u8; 0],
+}
+extern "C" {
+ #[doc = " @brief Binds a D3D10 device to a context and enables interop"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetD3D10Device binds \\a device to \\a context and enables D3D10 interop capabilities in \\a context. This"]
+ #[doc = " function must be executed once for \\a context before any call to @ref rtBufferCreateFromD3D10Resource or @ref rtTextureSamplerCreateFromD3D10Resource can"]
+ #[doc = " take place. A context can only be bound to one device. Once \\a device is bound to \\a context, the binding is immutable and remains upon destruction of \\a context."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to bind the device with"]
+ #[doc = " @param[in] device The D3D10 device to be used for interop with the associated context"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetD3D10Device was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D10Resource,"]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D10Resource"]
+ #[doc = ""]
+ pub fn rtContextSetD3D10Device(context: RTcontext, device: *mut ID3D10Device) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the OptiX device number associated with the pointer to a D3D10 adapter"]
+ #[doc = ""]
+ #[doc = " @ingroup ContextFreeFunctions"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetD3D10Device returns in \\a device the OptiX device ID of the adapter represented by \\a d3d10Device."]
+ #[doc = " \\a d3d10Device is a pointer returned from \\a D3D10CreateDeviceAndSwapChain. In combination with @ref rtContextSetDevices,"]
+ #[doc = " this function can be used to restrict OptiX to use only one device. The same device the D3D10 commands will be sent to."]
+ #[doc = ""]
+ #[doc = " This function is only supported on Windows platforms."]
+ #[doc = ""]
+ #[doc = " @param[in] device A handle to the memory location where the OptiX device ordinal associated with \\a d3d10Device will be stored"]
+ #[doc = " @param[out] pAdapter A pointer to an \\a ID3D10Device as returned from \\a D3D10CreateDeviceAndSwapChain"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetD3D10Device was introduced in OptiX 2.5."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtDeviceGetDeviceCount"]
+ #[doc = ""]
+ pub fn rtDeviceGetD3D10Device(
+ device: *mut ::std::os::raw::c_int,
+ pAdapter: *mut IDXGIAdapter,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new buffer object from a D3D10 resource"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateFromD3D10Resource allocates and returns a handle to a new buffer object in \\a *buffer associated with"]
+ #[doc = " \\a context. If the allocated size of the D3D resource is \\a 0, @ref RT_ERROR_MEMORY_ALLOCATION_FAILED will be returned. Supported D3D10 buffer types are:"]
+ #[doc = ""]
+ #[doc = " - ID3D10Buffer"]
+ #[doc = ""]
+ #[doc = " These buffers can be used to share data with D3D10; changes of the content in \\a buffer, either done by D3D10 or OptiX,"]
+ #[doc = " will be reflected automatically in both APIs. If the size, or format, of a D3D10 buffer is changed, appropriate OptiX"]
+ #[doc = " calls have to be used to update \\a buffer accordingly. OptiX keeps only a reference to D3D10 data, when \\a buffer is"]
+ #[doc = " destroyed, the state of \\a resource is unaltered."]
+ #[doc = ""]
+ #[doc = " The \\a type of this buffer is specified by one of the following values in \\a bufferdesc:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_BUFFER_INPUT"]
+ #[doc = " - @ref RT_BUFFER_OUTPUT"]
+ #[doc = " - @ref RT_BUFFER_INPUT_OUTPUT"]
+ #[doc = ""]
+ #[doc = " The type values are used to specify the direction of data flow from the host to the OptiX devices."]
+ #[doc = " @ref RT_BUFFER_INPUT specifies that the host may only write to the buffer and the device may only read from the buffer."]
+ #[doc = " @ref RT_BUFFER_OUTPUT specifies the opposite, read only access on the host and write only access on the device."]
+ #[doc = " Devices and the host may read and write from buffers of type @ref RT_BUFFER_INPUT_OUTPUT. Reading or writing to"]
+ #[doc = " a buffer of the incorrect type (e.g., the host writing to a buffer of type @ref RT_BUFFER_OUTPUT) is undefined."]
+ #[doc = ""]
+ #[doc = " Flags can be used to optimize data transfers between the host and it's devices. Currently no \\a flags are supported for"]
+ #[doc = " interop buffers."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the buffer in"]
+ #[doc = " @param[in] bufferdesc Bitwise \\a or combination of the \\a type and \\a flags of the new buffer"]
+ #[doc = " @param[in] resource The D3D10 resource handle for use in OptiX"]
+ #[doc = " @param[out] buffer The return handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateFromD3D10Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreate,"]
+ #[doc = " @ref rtBufferDestroy"]
+ #[doc = ""]
+ pub fn rtBufferCreateFromD3D10Resource(
+ context: RTcontext,
+ bufferdesc: ::std::os::raw::c_uint,
+ resource: *mut ID3D10Resource,
+ buffer: *mut RTbuffer,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new texture sampler object from a D3D10 resource"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D10Resource allocates and returns a"]
+ #[doc = " handle to a new texture sampler object in \\a *texturesampler"]
+ #[doc = " associated with \\a context. If the allocated size of the D3D resource"]
+ #[doc = " is \\a 0, @ref RT_ERROR_MEMORY_ALLOCATION_FAILED will be returned. Supported"]
+ #[doc = " D3D10 texture types are:"]
+ #[doc = ""]
+ #[doc = " - ID3D10Texture1D"]
+ #[doc = " - ID3D10Texture2D"]
+ #[doc = " - ID3D10Texture3D"]
+ #[doc = ""]
+ #[doc = " These texture samplers can be used to share data with D3D10; changes of"]
+ #[doc = " the content and size of \\a texturesampler done by D3D10 will be"]
+ #[doc = " reflected automatically in OptiX. Currently texture sampler data are"]
+ #[doc = " read only in OptiX programs. OptiX keeps only a reference to"]
+ #[doc = " D3D10 data, when \\a texturesampler is destroyed, the state of the"]
+ #[doc = " \\a resource is unaltered."]
+ #[doc = ""]
+ #[doc = " The array size and number of mipmap levels can't be changed for"]
+ #[doc = " texture samplers that encapsulate a D3D10 resource. Furthermore no"]
+ #[doc = " buffer objects can be queried. Please refer to the @ref InteropTypes for a"]
+ #[doc = " complete list of supported texture formats."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the texture sampler in"]
+ #[doc = " @param[in] resource The D3D10 resource handle for use in OptiX"]
+ #[doc = " @param[out] textureSampler The return handle for the texture sampler object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D10Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreate,"]
+ #[doc = " @ref rtTextureSamplerDestroy"]
+ #[doc = ""]
+ pub fn rtTextureSamplerCreateFromD3D10Resource(
+ context: RTcontext,
+ resource: *mut ID3D10Resource,
+ textureSampler: *mut RTtexturesampler,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the D3D10 resource associated with this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetD3D10Resource stores the D3D10 resource pointer in \\a **resource if \\a buffer was created with"]
+ #[doc = " @ref rtBufferCreateFromD3D10Resource. If \\a buffer was not created from a D3D10 resource \\a **resource will be \\a 0 after"]
+ #[doc = " the call and @ref RT_ERROR_INVALID_VALUE is returned."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its D3D10 resource"]
+ #[doc = " @param[out] resource The return handle for the resource"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetD3D10Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D10Resource"]
+ #[doc = ""]
+ pub fn rtBufferGetD3D10Resource(
+ buffer: RTbuffer,
+ resource: *mut *mut ID3D10Resource,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the D3D10 resource associated with this texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetD3D10Resource stores the D3D10 resource pointer in \\a **resource if \\a sampler was created with"]
+ #[doc = " @ref rtTextureSamplerGetD3D10Resource. If \\a sampler was not created from a D3D10 resource \\a resource will be 0 after"]
+ #[doc = " the call and @ref RT_ERROR_INVALID_VALUE is returned"]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The texture sampler to be queried for its D3D10 resource"]
+ #[doc = " @param[out] resource The return handle for the resource"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetD3D10Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D10Resource"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetD3D10Resource(
+ textureSampler: RTtexturesampler,
+ resource: *mut *mut ID3D10Resource,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D10 buffer as immutable and accessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX buffer in an unregistered state can be registered to OptiX again via @ref rtBufferD3D10Register. Once registered,"]
+ #[doc = " properties like the size of the original D3D10 resource cannot be modified anymore. Calls to the corresponding D3D10 functions"]
+ #[doc = " will return with an error code. However, the data of the D3D10 resource can still be read and written by the appropriate D3D10 commands."]
+ #[doc = " When a buffer is already in a registered state @ref rtBufferD3D10Register will return @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED. A resource"]
+ #[doc = " must be registered in order to be used by OptiX. If a resource is not registered @ref RT_ERROR_INVALID_VALUE will be returned."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferD3D10Register was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtBufferD3D10Register(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D10 buffer as mutable and inaccessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX buffer in a registered state can be unregistered via @ref rtBufferD3D10Register. Once unregistered,"]
+ #[doc = " properties like the size of the original D3D10 resource can be changed. As long as a resource is unregistered,"]
+ #[doc = " OptiX will not be able to access the data and will fail with @ref RT_ERROR_INVALID_VALUE. When a buffer is already"]
+ #[doc = " in an unregistered state @ref rtBufferD3D10Unregister will return @ref RT_ERROR_RESOURCE_NOT_REGISTERED."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_NOT_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferD3D10Unregister was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtBufferD3D10Unregister(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D10 texture as immutable and accessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX texture sampler in an unregistered state can be registered to OptiX again via @ref rtTextureSamplerD3D10Register."]
+ #[doc = " Once registered, properties like the size of the original D3D10 resource cannot be modified anymore. Calls to the corresponding"]
+ #[doc = " D3D10 functions will return with an error code. However, the data of the D3D10 resource can still be read and written by the appropriate"]
+ #[doc = " D3D10 commands. When a texture sampler is already in a registered state @ref rtTextureSamplerD3D10Register will return @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED."]
+ #[doc = " A resource must be registered in order to be used by OptiX. If a resource is not registered @ref RT_ERROR_INVALID_VALUE will be returned."]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The handle for the texture object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerD3D10Register was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D10Resource"]
+ #[doc = ""]
+ pub fn rtTextureSamplerD3D10Register(textureSampler: RTtexturesampler) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D10 texture as mutable and inaccessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX texture sampler in a registered state can be unregistered via @ref rtTextureSamplerD3D10Unregister. Once unregistered,"]
+ #[doc = " properties like the size of the original D3D10 resource can be changed. As long as a resource is unregistered, OptiX will not"]
+ #[doc = " be able to access the data and will fail with @ref RT_ERROR_INVALID_VALUE. When a buffer is already in an unregistered state"]
+ #[doc = " @ref rtBufferD3D10Unregister will return @ref RT_ERROR_RESOURCE_NOT_REGISTERED."]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The handle for the texture object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_NOT_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerD3D10Unregister was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D10Resource"]
+ #[doc = ""]
+ pub fn rtTextureSamplerD3D10Unregister(textureSampler: RTtexturesampler) -> RTresult;
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct ID3D11Device {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct ID3D11Resource {
+ _unused: [u8; 0],
+}
+extern "C" {
+ #[doc = " @brief Binds a D3D11 device to a context and enables interop"]
+ #[doc = ""]
+ #[doc = " @ingroup Context"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetD3D11Device binds \\a device to \\a context and enables D3D11 interop capabilities in \\a context. This"]
+ #[doc = " function must be executed once for \\a context before any call to @ref rtBufferCreateFromD3D11Resource or @ref rtTextureSamplerCreateFromD3D11Resource can"]
+ #[doc = " take place. A context can only be bound to one device. Once \\a device is bound to \\a context, the binding is immutable and remains upon destruction of \\a context."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to bind the device with"]
+ #[doc = " @param[in] device The D3D11 device to be used for interop with the associated context"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtContextSetD3D11Device was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource,"]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtContextSetD3D11Device(context: RTcontext, device: *mut ID3D11Device) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Returns the OptiX device number associated with the pointer to a D3D11 adapter"]
+ #[doc = ""]
+ #[doc = " @ingroup ContextFreeFunctions"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetD3D11Device returns in \\a device the OptiX device ID of the adapter represented by \\a D3D11Device."]
+ #[doc = " \\a D3D11Device is a pointer returned from \\a D3D11CreateDeviceAndSwapChain. In combination with @ref rtContextSetDevices,"]
+ #[doc = " this function can be used to restrict OptiX to use only one device. The same device the D3D11 commands will be sent to."]
+ #[doc = ""]
+ #[doc = " This function is only supported on Windows platforms."]
+ #[doc = ""]
+ #[doc = " @param[in] device A handle to the memory location where the OptiX device ordinal associated with \\a D3D11Device will be stored"]
+ #[doc = " @param[in] pAdapter A pointer to an \\a ID3D11Device as returned from \\a D3D11CreateDeviceAndSwapChain"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetD3D11Device was introduced in OptiX 2.5."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtDeviceGetDeviceCount"]
+ #[doc = ""]
+ pub fn rtDeviceGetD3D11Device(
+ device: *mut ::std::os::raw::c_int,
+ pAdapter: *mut IDXGIAdapter,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new buffer object from a D3D11 resource"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource allocates and returns a handle to a new buffer object in \\a *buffer associated with"]
+ #[doc = " \\a context. If the allocated size of the D3D resource is \\a 0, @ref RT_ERROR_MEMORY_ALLOCATION_FAILED will be returned. Supported D3D11 buffer types are:"]
+ #[doc = ""]
+ #[doc = " - ID3D11Buffer"]
+ #[doc = ""]
+ #[doc = " These buffers can be used to share data with D3D11; changes of the content in \\a buffer, either done by D3D11 or OptiX,"]
+ #[doc = " will be reflected automatically in both APIs. If the size, or format, of a D3D11 buffer is changed, appropriate OptiX"]
+ #[doc = " calls have to be used to update \\a buffer accordingly. OptiX keeps only a reference to D3D11 data, when \\a buffer is"]
+ #[doc = " destroyed, the state of \\a resource is unaltered."]
+ #[doc = ""]
+ #[doc = " The \\a type of this buffer is specified by one of the following values in \\a bufferdesc:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_BUFFER_INPUT"]
+ #[doc = " - @ref RT_BUFFER_OUTPUT"]
+ #[doc = " - @ref RT_BUFFER_INPUT_OUTPUT"]
+ #[doc = ""]
+ #[doc = " The type values are used to specify the direction of data flow from the host to the OptiX devices."]
+ #[doc = " @ref RT_BUFFER_INPUT specifies that the host may only write to the buffer and the device may only read from the buffer."]
+ #[doc = " @ref RT_BUFFER_OUTPUT specifies the opposite, read only access on the host and write only access on the device."]
+ #[doc = " Devices and the host may read and write from buffers of type @ref RT_BUFFER_INPUT_OUTPUT. Reading or writing to"]
+ #[doc = " a buffer of the incorrect type (e.g., the host writing to a buffer of type @ref RT_BUFFER_OUTPUT) is undefined."]
+ #[doc = ""]
+ #[doc = " Flags can be used to optimize data transfers between the host and it's devices. Currently no \\a flags are supported for"]
+ #[doc = " interop buffers."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the buffer in"]
+ #[doc = " @param[in] bufferdesc Bitwise \\a or combination of the \\a type and \\a flags of the new buffer"]
+ #[doc = " @param[in] resource The D3D11 resource handle for use in OptiX"]
+ #[doc = " @param[out] buffer The return handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreate,"]
+ #[doc = " @ref rtBufferDestroy"]
+ #[doc = ""]
+ pub fn rtBufferCreateFromD3D11Resource(
+ context: RTcontext,
+ bufferdesc: ::std::os::raw::c_uint,
+ resource: *mut ID3D11Resource,
+ buffer: *mut RTbuffer,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new texture sampler object from a D3D11 resource"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D11Resource allocates and returns a"]
+ #[doc = " handle to a new texture sampler object in \\a *texturesampler"]
+ #[doc = " associated with \\a context. If the allocated size of the D3D resource"]
+ #[doc = " is \\a 0, @ref RT_ERROR_MEMORY_ALLOCATION_FAILED will be returned. Supported"]
+ #[doc = " D3D11 texture types are:"]
+ #[doc = ""]
+ #[doc = " - ID3D11Texture1D"]
+ #[doc = " - ID3D11Texture2D"]
+ #[doc = " - ID3D11Texture3D"]
+ #[doc = ""]
+ #[doc = " These texture samplers can be used to share data with D3D11; changes of"]
+ #[doc = " the content and size of \\a texturesampler done by D3D11 will be"]
+ #[doc = " reflected automatically in OptiX. Currently texture sampler data are"]
+ #[doc = " read only in OptiX programs. OptiX keeps only a reference to"]
+ #[doc = " D3D11 data, when \\a texturesampler is destroyed, the state of the"]
+ #[doc = " \\a resource is unaltered."]
+ #[doc = ""]
+ #[doc = " The array size and number of mipmap levels can't be changed for"]
+ #[doc = " texture samplers that encapsulate a D3D11 resource. Furthermore no"]
+ #[doc = " buffer objects can be queried. Please refer to the @ref InteropTypes for a"]
+ #[doc = " complete list of supported texture formats."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the texture sampler in"]
+ #[doc = " @param[in] resource The D3D11 resource handle for use in OptiX"]
+ #[doc = " @param[out] textureSampler The return handle for the texture sampler object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D11Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreate,"]
+ #[doc = " @ref rtTextureSamplerDestroy"]
+ #[doc = ""]
+ pub fn rtTextureSamplerCreateFromD3D11Resource(
+ context: RTcontext,
+ resource: *mut ID3D11Resource,
+ textureSampler: *mut RTtexturesampler,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the D3D11 resource associated with this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetD3D11Resource stores the D3D11 resource pointer in \\a **resource if \\a buffer was created with"]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource. If \\a buffer was not created from a D3D11 resource \\a **resource will be \\a 0 after"]
+ #[doc = " the call and @ref RT_ERROR_INVALID_VALUE is returned."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its D3D11 resource"]
+ #[doc = " @param[out] resource The return handle for the resource"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetD3D11Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtBufferGetD3D11Resource(
+ buffer: RTbuffer,
+ resource: *mut *mut ID3D11Resource,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the D3D11 resource associated with this texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetD3D11Resource stores the D3D11 resource pointer in \\a **resource if \\a sampler was created with"]
+ #[doc = " @ref rtTextureSamplerGetD3D11Resource. If \\a sampler was not created from a D3D11 resource \\a resource will be 0 after"]
+ #[doc = " the call and @ref RT_ERROR_INVALID_VALUE is returned"]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The texture sampler to be queried for its D3D11 resource"]
+ #[doc = " @param[out] resource The return handle for the resource"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetD3D11Resource was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetD3D11Resource(
+ textureSampler: RTtexturesampler,
+ resource: *mut *mut ID3D11Resource,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D11 buffer as immutable and accessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX buffer in an unregistered state can be registered to OptiX again via @ref rtBufferD3D11Register. Once registered,"]
+ #[doc = " properties like the size of the original D3D11 resource cannot be modified anymore. Calls to the corresponding D3D11 functions"]
+ #[doc = " will return with an error code. However, the data of the D3D11 resource can still be read and written by the appropriate D3D11 commands."]
+ #[doc = " When a buffer is already in a registered state @ref rtBufferD3D11Register will return @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED. A resource"]
+ #[doc = " must be registered in order to be used by OptiX. If a resource is not registered @ref RT_ERROR_INVALID_VALUE will be returned."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferD3D11Register was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtBufferD3D11Register(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D11 buffer as mutable and inaccessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX buffer in a registered state can be unregistered via @ref rtBufferD3D11Register. Once unregistered,"]
+ #[doc = " properties like the size of the original D3D11 resource can be changed. As long as a resource is unregistered,"]
+ #[doc = " OptiX will not be able to access the data and will fail with @ref RT_ERROR_INVALID_VALUE. When a buffer is already"]
+ #[doc = " in an unregistered state @ref rtBufferD3D11Unregister will return @ref RT_ERROR_RESOURCE_NOT_REGISTERED."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_NOT_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferD3D11Unregister was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtBufferD3D11Unregister(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D11 texture as immutable and accessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX texture sampler in an unregistered state can be registered to OptiX again via @ref rtTextureSamplerD3D11Register."]
+ #[doc = " Once registered, properties like the size of the original D3D11 resource cannot be modified anymore. Calls to the corresponding"]
+ #[doc = " D3D11 functions will return with an error code. However, the data of the D3D11 resource can still be read and written by the appropriate"]
+ #[doc = " D3D11 commands. When a texture sampler is already in a registered state @ref rtTextureSamplerD3D11Register will return @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED."]
+ #[doc = " A resource must be registered in order to be used by OptiX. If a resource is not registered @ref RT_ERROR_INVALID_VALUE will be returned."]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The handle for the texture object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerD3D11Register was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtTextureSamplerD3D11Register(textureSampler: RTtexturesampler) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares a D3D11 texture as mutable and inaccessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " An OptiX texture sampler in a registered state can be unregistered via @ref rtTextureSamplerD3D11Unregister. Once unregistered,"]
+ #[doc = " properties like the size of the original D3D11 resource can be changed. As long as a resource is unregistered, OptiX will not"]
+ #[doc = " be able to access the data and will fail with @ref RT_ERROR_INVALID_VALUE. When a buffer is already in an unregistered state"]
+ #[doc = " @ref rtBufferD3D11Unregister will return @ref RT_ERROR_RESOURCE_NOT_REGISTERED."]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The handle for the texture object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_NOT_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerD3D11Unregister was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreateFromD3D11Resource"]
+ #[doc = ""]
+ pub fn rtTextureSamplerD3D11Unregister(textureSampler: RTtexturesampler) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new buffer object from an OpenGL buffer object"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateFromGLBO allocates and returns a handle to a new buffer object in *\\a buffer associated with"]
+ #[doc = " \\a context. Supported OpenGL buffer types are:"]
+ #[doc = ""]
+ #[doc = " - Pixel Buffer Objects"]
+ #[doc = ""]
+ #[doc = " - Vertex Buffer Objects"]
+ #[doc = ""]
+ #[doc = " These buffers can be used to share data with OpenGL; changes of the content in \\a buffer, either done by OpenGL or OptiX,"]
+ #[doc = " will be reflected automatically in both APIs. If the size, or format, of an OpenGL buffer is changed, appropriate OptiX"]
+ #[doc = " calls have to be used to update \\a buffer accordingly. OptiX keeps only a reference to OpenGL data, when \\a buffer is"]
+ #[doc = " destroyed, the state of the \\a gl_id object is unaltered."]
+ #[doc = ""]
+ #[doc = " The \\a type of this buffer is specified by one of the following values in \\a bufferdesc:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_BUFFER_INPUT"]
+ #[doc = " - @ref RT_BUFFER_OUTPUT"]
+ #[doc = " - @ref RT_BUFFER_INPUT_OUTPUT"]
+ #[doc = ""]
+ #[doc = " The type values are used to specify the direction of data flow from the host to the OptiX devices."]
+ #[doc = " @ref RT_BUFFER_INPUT specifies that the host may only write to the buffer and the device may only read from the buffer."]
+ #[doc = " @ref RT_BUFFER_OUTPUT specifies the opposite, read only access on the host and write only access on the device."]
+ #[doc = " Devices and the host may read and write from buffers of type @ref RT_BUFFER_INPUT_OUTPUT. Reading or writing to"]
+ #[doc = " a buffer of the incorrect type (e.g., the host writing to a buffer of type @ref RT_BUFFER_OUTPUT) is undefined."]
+ #[doc = ""]
+ #[doc = " Flags can be used to optimize data transfers between the host and it's devices. Currently no \\a flags are supported for"]
+ #[doc = " interop buffers."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the buffer in"]
+ #[doc = " @param[in] bufferdesc Bitwise \\a or combination of the \\a type and \\a flags of the new buffer"]
+ #[doc = " @param[in] glId The OpenGL image object resource handle for use in OptiX"]
+ #[doc = " @param[out] buffer The return handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferCreateFromGLBO was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreate,"]
+ #[doc = " @ref rtBufferDestroy"]
+ #[doc = ""]
+ pub fn rtBufferCreateFromGLBO(
+ context: RTcontext,
+ bufferdesc: ::std::os::raw::c_uint,
+ glId: ::std::os::raw::c_uint,
+ buffer: *mut RTbuffer,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Creates a new texture sampler object from an OpenGL image"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerCreateFromGLImage allocates and returns a handle to"]
+ #[doc = " a new texture sampler object in * \\a texturesampler associated with"]
+ #[doc = " \\a context. If the allocated size of the GL texture is 0,"]
+ #[doc = " @ref RT_ERROR_MEMORY_ALLOCATION_FAILED will be returned. Supported OpenGL"]
+ #[doc = " image types are:"]
+ #[doc = ""]
+ #[doc = " Renderbuffers"]
+ #[doc = ""]
+ #[doc = " - GL_TEXTURE_2D"]
+ #[doc = ""]
+ #[doc = " - GL_TEXTURE_2D_RECT"]
+ #[doc = ""]
+ #[doc = " - GL_TEXTURE_3D"]
+ #[doc = ""]
+ #[doc = ""]
+ #[doc = " These types are reflected by \\a target:"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TARGET_GL_RENDER_BUFFER"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TARGET_GL_TEXTURE_1D"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TARGET_GL_TEXTURE_2D"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TARGET_GL_TEXTURE_RECTANGLE"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TARGET_GL_TEXTURE_3D"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TARGET_GL_TEXTURE_1D_ARRAY"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TARGET_GL_TEXTURE_2D_ARRAY"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TARGET_GL_TEXTURE_CUBE_MAP"]
+ #[doc = ""]
+ #[doc = " - @ref RT_TARGET_GL_TEXTURE_CUBE_MAP_ARRAY"]
+ #[doc = ""]
+ #[doc = " Supported attachment points for renderbuffers are:"]
+ #[doc = ""]
+ #[doc = " - GL_COLOR_ATTACHMENT<NUM>"]
+ #[doc = ""]
+ #[doc = ""]
+ #[doc = " These texture samplers can be used to share data with OpenGL; changes"]
+ #[doc = " of the content and size of \\a texturesampler done by OpenGL will be"]
+ #[doc = " reflected automatically in OptiX. Currently texture sampler data are"]
+ #[doc = " read only in OptiX programs. OptiX keeps only a reference to"]
+ #[doc = " OpenGL data, when \\a texturesampler is destroyed, the state of the"]
+ #[doc = " \\a gl_id image is unaltered."]
+ #[doc = ""]
+ #[doc = " The array size and number of mipmap levels can't be changed for"]
+ #[doc = " texture samplers that encapsulate a GL image. Furthermore no buffer"]
+ #[doc = " objects can be queried."]
+ #[doc = ""]
+ #[doc = " Currently OptiX supports only a limited number of internal OpenGL"]
+ #[doc = " texture formats. Texture formats with an internal type of float,"]
+ #[doc = " e.g. \\a GL_RGBA32F, and many integer formats are supported. Depth formats"]
+ #[doc = " as well as multisample buffers are also currently not supported."]
+ #[doc = " Please refer to the @ref InteropTypes section for a complete list of supported"]
+ #[doc = " texture formats."]
+ #[doc = ""]
+ #[doc = " @param[in] context The context to create the buffer in"]
+ #[doc = " @param[in] glId The OpenGL image object resoure handle for use in OptiX"]
+ #[doc = " @param[in] target The OpenGL target"]
+ #[doc = " @param[out] textureSampler The return handle for the texture sampler object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerCreateFromGLImage was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreate,"]
+ #[doc = " @ref rtTextureSamplerDestroy"]
+ #[doc = ""]
+ pub fn rtTextureSamplerCreateFromGLImage(
+ context: RTcontext,
+ glId: ::std::os::raw::c_uint,
+ target: RTgltarget,
+ textureSampler: *mut RTtexturesampler,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the OpenGL Buffer Object ID associated with this buffer"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetGLBOId stores the OpenGL buffer object id in \\a gl_id if"]
+ #[doc = " \\a buffer was created with @ref rtBufferCreateFromGLBO. If \\a buffer was"]
+ #[doc = " not created from an OpenGL Buffer Object \\a gl_id will be set to 0."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The buffer to be queried for its OpenGL buffer object id"]
+ #[doc = " @param[in] glId The return handle for the id"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGetGLBOId was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromGLBO"]
+ #[doc = ""]
+ pub fn rtBufferGetGLBOId(buffer: RTbuffer, glId: *mut ::std::os::raw::c_uint) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Gets the OpenGL image object id associated with this texture sampler"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetGLImageId stores the OpenGL image object id in"]
+ #[doc = " \\a gl_id if \\a textureSampler was created with @ref rtTextureSamplerCreateFromGLImage."]
+ #[doc = " If \\a textureSampler was not created from an OpenGL image object \\a gl_id"]
+ #[doc = " will be set to 0."]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The texture sampler to be queried for its OpenGL buffer object id"]
+ #[doc = " @param[in] glId The return handle for the id"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_MEMORY_ALLOCATION_FAILED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGetGLImageId was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreateFromGLImage"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGetGLImageId(
+ textureSampler: RTtexturesampler,
+ glId: *mut ::std::os::raw::c_uint,
+ ) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares an OpenGL buffer as immutable and accessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Once registered, properties like the size of the original GL buffer cannot be modified anymore."]
+ #[doc = " Calls to the corresponding GL functions will return with an error code."]
+ #[doc = " However, the buffer data of the GL buffer can still be read and written by the appropriate GL commands."]
+ #[doc = " Returns \\a RT_ERROR_RESOURCE_ALREADY_REGISTERED if \\a buffer is already registered."]
+ #[doc = " A buffer object must be registered in order to be used by OptiX."]
+ #[doc = " If a buffer object is not registered @ref RT_ERROR_INVALID_VALUE will be returned."]
+ #[doc = " An OptiX buffer in a registered state can be unregistered via @ref rtBufferGLRegister."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGLRegister was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromGLBO,"]
+ #[doc = " @ref rtBufferGLUnregister"]
+ #[doc = ""]
+ pub fn rtBufferGLRegister(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares an OpenGL buffer as mutable and inaccessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup Buffer"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Once unregistered, properties like the size of the original GL buffer can be changed."]
+ #[doc = " As long as a buffer object is unregistered, OptiX will not be able to access the data and calls will fail with @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = " Returns \\a RT_ERROR_RESOURCE_NOT_REGISTERED if \\a buffer is already unregistered."]
+ #[doc = " An OptiX buffer in an unregistered state can be registered to OptiX again via @ref rtBufferGLRegister."]
+ #[doc = ""]
+ #[doc = " @param[in] buffer The handle for the buffer object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_NOT_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtBufferGLUnregister was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtBufferCreateFromGLBO,"]
+ #[doc = " @ref rtBufferGLRegister"]
+ #[doc = ""]
+ pub fn rtBufferGLUnregister(buffer: RTbuffer) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares an OpenGL texture as immutable and accessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Registers an OpenGL texture as accessible by OptiX. Once registered, properties like the size of the original GL texture cannot be modified anymore."]
+ #[doc = " Calls to the corresponding GL functions will return with an error code. However, the pixel data of the GL texture can still be read and written by the appropriate GL commands."]
+ #[doc = " Returns @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED if \\a textureSampler is already registered."]
+ #[doc = " A texture sampler must be registered in order to be used by OptiX. Otherwise, @ref RT_ERROR_INVALID_VALUE is returned."]
+ #[doc = " An OptiX texture sampler in a registered state can be unregistered via @ref rtTextureSamplerGLUnregister."]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The handle for the texture object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_ALREADY_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGLRegister was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreateFromGLImage,"]
+ #[doc = " @ref rtTextureSamplerGLUnregister"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGLRegister(textureSampler: RTtexturesampler) -> RTresult;
+}
+extern "C" {
+ #[doc = " @brief Declares an OpenGL texture as mutable and inaccessible by OptiX"]
+ #[doc = ""]
+ #[doc = " @ingroup TextureSampler"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " Once unregistered, properties like the size of the original GL texture can be changed."]
+ #[doc = " As long as a texture is unregistered, OptiX will not be able to access the pixel data and calls will fail with @ref RT_ERROR_INVALID_VALUE."]
+ #[doc = " Returns \\a RT_ERROR_RESOURCE_NOT_REGISTERED if \\a textureSampler is already unregistered."]
+ #[doc = " An OptiX texture sampler in an unregistered state can be registered to OptiX again via @ref rtTextureSamplerGLRegister."]
+ #[doc = ""]
+ #[doc = " @param[in] textureSampler The handle for the texture object"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_CONTEXT"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = " - @ref RT_ERROR_RESOURCE_NOT_REGISTERED"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtTextureSamplerGLUnregister was introduced in OptiX 2.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtTextureSamplerCreateFromGLImage,"]
+ #[doc = " @ref rtTextureSamplerGLRegister"]
+ #[doc = ""]
+ pub fn rtTextureSamplerGLUnregister(textureSampler: RTtexturesampler) -> RTresult;
+}
+pub type HGPUNV = *mut ::std::os::raw::c_void;
+extern "C" {
+ #[doc = " @brief returns the OptiX device number associated with the specified GPU"]
+ #[doc = ""]
+ #[doc = " @ingroup ContextFreeFunctions"]
+ #[doc = ""]
+ #[doc = " <B>Description</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetWGLDevice returns in \\a device the OptiX device ID of the GPU represented by \\a gpu."]
+ #[doc = " \\a gpu is returned from \\a WGL_NV_gpu_affinity, an OpenGL extension. This enables OptiX to create a context"]
+ #[doc = " on the same GPU that OpenGL commands will be sent to, improving OpenGL interoperation efficiency."]
+ #[doc = ""]
+ #[doc = " @param[out] device A handle to the memory location where the OptiX device ordinal associated with \\a gpu will be stored"]
+ #[doc = " @param[in] gpu A handle to a GPU as returned from the \\a WGL_NV_gpu_affinity OpenGL extension"]
+ #[doc = ""]
+ #[doc = " <B>Return values</B>"]
+ #[doc = ""]
+ #[doc = " Relevant return values:"]
+ #[doc = " - @ref RT_SUCCESS"]
+ #[doc = " - @ref RT_ERROR_INVALID_VALUE"]
+ #[doc = ""]
+ #[doc = " <B>History</B>"]
+ #[doc = ""]
+ #[doc = " @ref rtDeviceGetWGLDevice was introduced in OptiX 1.0."]
+ #[doc = ""]
+ #[doc = " <B>See also</B>"]
+ #[doc = " @ref rtDeviceGetDeviceCount,"]
+ #[doc = " \\a WGL_NV_gpu_affinity"]
+ #[doc = ""]
+ pub fn rtDeviceGetWGLDevice(device: *mut ::std::os::raw::c_int, gpu: HGPUNV) -> RTresult;
+}