@bloomengine/engine 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/native/tvos/metal-patched/Cargo.toml +178 -0
- package/native/tvos/metal-patched/LICENSE-APACHE +201 -0
- package/native/tvos/metal-patched/LICENSE-MIT +25 -0
- package/native/tvos/metal-patched/src/acceleration_structure.rs +667 -0
- package/native/tvos/metal-patched/src/acceleration_structure_pass.rs +108 -0
- package/native/tvos/metal-patched/src/argument.rs +366 -0
- package/native/tvos/metal-patched/src/blitpass.rs +102 -0
- package/native/tvos/metal-patched/src/buffer.rs +71 -0
- package/native/tvos/metal-patched/src/capturedescriptor.rs +76 -0
- package/native/tvos/metal-patched/src/capturemanager.rs +113 -0
- package/native/tvos/metal-patched/src/commandbuffer.rs +192 -0
- package/native/tvos/metal-patched/src/commandqueue.rs +44 -0
- package/native/tvos/metal-patched/src/computepass.rs +107 -0
- package/native/tvos/metal-patched/src/constants.rs +152 -0
- package/native/tvos/metal-patched/src/counters.rs +119 -0
- package/native/tvos/metal-patched/src/depthstencil.rs +190 -0
- package/native/tvos/metal-patched/src/device.rs +2134 -0
- package/native/tvos/metal-patched/src/drawable.rs +39 -0
- package/native/tvos/metal-patched/src/encoder.rs +2041 -0
- package/native/tvos/metal-patched/src/heap.rs +281 -0
- package/native/tvos/metal-patched/src/indirect_encoder.rs +344 -0
- package/native/tvos/metal-patched/src/lib.rs +657 -0
- package/native/tvos/metal-patched/src/library.rs +902 -0
- package/native/tvos/metal-patched/src/mps.rs +575 -0
- package/native/tvos/metal-patched/src/pipeline/compute.rs +475 -0
- package/native/tvos/metal-patched/src/pipeline/mod.rs +71 -0
- package/native/tvos/metal-patched/src/pipeline/render.rs +762 -0
- package/native/tvos/metal-patched/src/renderpass.rs +443 -0
- package/native/tvos/metal-patched/src/resource.rs +182 -0
- package/native/tvos/metal-patched/src/sampler.rs +165 -0
- package/native/tvos/metal-patched/src/sync.rs +178 -0
- package/native/tvos/metal-patched/src/texture.rs +352 -0
- package/native/tvos/metal-patched/src/types.rs +90 -0
- package/native/tvos/metal-patched/src/vertexdescriptor.rs +250 -0
- package/package.json +5 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Copyright 2016 GFX developers
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
|
|
4
|
+
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
|
|
5
|
+
// http://opensource.org/licenses/MIT>, at your option. This file may not be
|
|
6
|
+
// copied, modified, or distributed except according to those terms.
|
|
7
|
+
|
|
8
|
+
use block::Block;
|
|
9
|
+
|
|
10
|
+
use super::NSUInteger;
|
|
11
|
+
|
|
12
|
+
type DrawablePresentedHandler<'a> = Block<(&'a DrawableRef,), ()>;
|
|
13
|
+
type CFTimeInterval = f64;
|
|
14
|
+
|
|
15
|
+
/// See <https://developer.apple.com/documentation/metal/mtldrawable>
|
|
16
|
+
pub enum MTLDrawable {}
|
|
17
|
+
|
|
18
|
+
foreign_obj_type! {
|
|
19
|
+
type CType = MTLDrawable;
|
|
20
|
+
pub struct Drawable;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
impl DrawableRef {
|
|
24
|
+
pub fn present(&self) {
|
|
25
|
+
unsafe { msg_send![self, present] }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
pub fn drawable_id(&self) -> NSUInteger {
|
|
29
|
+
unsafe { msg_send![self, drawableID] }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
pub fn add_presented_handler(&self, block: &DrawablePresentedHandler) {
|
|
33
|
+
unsafe { msg_send![self, addPresentedHandler: block] }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
pub fn presented_time(&self) -> CFTimeInterval {
|
|
37
|
+
unsafe { msg_send![self, presentedTime] }
|
|
38
|
+
}
|
|
39
|
+
}
|