-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunity-plugin-graphics.txt
More file actions
37 lines (27 loc) · 1.56 KB
/
unity-plugin-graphics.txt
File metadata and controls
37 lines (27 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
https://github.com/rsanchezsaez/CardboardSDK-iOS/blob/master/Unity/Cardboard.UnityProject/Builds/iOS/Classes/Unity/CVTextureCache.mm
https://github.com/rsanchezsaez/CardboardSDK-iOS/blob/master/Unity/Cardboard.UnityProject/Builds/iOS/Classes/Unity/CVTextureCache.h
// depending on selected rendering api it will be or GLES or Metal texture cache
// returns CVOpenGLESTextureCacheRef/CVMetalTextureCacheRef
void* CreateCVTextureCache();
// cache = CVOpenGLESTextureCacheRef/CVMetalTextureCacheRef
void FlushCVTextureCache(void* cache);
// returns CVOpenGLESTextureRef/CVMetalTextureRef
// cache = CVOpenGLESTextureCacheRef/CVMetalTextureCacheRef
// image = CVImageBufferRef/CVPixelBufferRef
void* CreateTextureFromCVTextureCache(void* cache, void* image, unsigned w, unsigned h);
// texture = CVOpenGLESTextureRef
unsigned GetGLTextureFromCVTextureCache(void* texture);
// texture = CVMetalTextureRef
MTLTextureRef GetMetalTextureFromCVTextureCache(void* texture);
// texture = CVOpenGLESTextureRef/CVMetalTextureRef
uintptr_t GetTextureFromCVTextureCache(void* texture);
// returns CVPixelBufferRef
// enforces kCVPixelFormatType_32BGRA
void* CreatePixelBufferForCVTextureCache(unsigned w, unsigned h);
// returns CVOpenGLESTextureRef
// cache = CVOpenGLESTextureCacheRef
// pb = CVPixelBufferRef (out)
// enforces rgba texture with bgra backing
void* CreateReadableRTFromCVTextureCache(void* cache, unsigned w, unsigned h, void** pb);
----
https://bitbucket.org/Unity-Technologies/iosnativecodesamples/src/a0bc90e7d6358e456caf25d717134864218740a7/Graphics/AsyncScreenshot/?at=stable