This is a texture class that handles loading and manipulating textures It is higher level then the TextureUtilities and is async
More...
|
static void | OnTick (MonoBehaviour ctx, float deltaTime) |
| Fire this from your update interval via StartCoroutine() More...
|
|
static TextureJob | GetTexture2D (TextureRequest request) |
| A generic way to convert from any format to any other (within reason) See TextureRequest's options for the many choices/bits/pieces you can set/toggle You must have a srcXYZ variable set and the output will live in dstTexture2D More...
|
|
static TextureJob | GetTexture2D (PrimitiveTexture pt) |
| Efficiently converts a PrimitiveTexture to a Texture2D while minimally blocking main thread More...
|
|
static TextureJob | GetReadable (TextureRequest request) |
| Yields a new texture that is readable on the cpu side, as in you can call GetPixels on it NOTE: this is not as efficient as simply getting the data out w/o it being in this format see nativeBuffer More...
|
|
|
static IEnumerator | SendToGPU () |
| Fired as a coroutine ensuring a Texture2D.Apply is called at the end of the frame, avoiding pipeline stalls More...
|
|
static void | EnqueueGPUSend (TextureRequest request) |
| Used internally to queue up a Texture2D.Apply call for end of frame, job self completes if in the request More...
|
|
static TextureJob | LoadTexture2D (TextureRequest request) |
| Our job here is not to resize/scale/etc, but to just simply create a Texture2D from the PrimitiveTexture there is no processing being done here More...
|
|
static void | SubmitReadRequest (TextureRequest request) |
| Submits a readback request against the gpu, this is an async operation and will avoid blocking main thread as much as possible based on your priority in the request More...
|
|
static void | ProcessRequestSendToGPU (TextureRequest request) |
|
This is a texture class that handles loading and manipulating textures It is higher level then the TextureUtilities and is async
NOTE: using this will typically increase the time spent before you get a texture, but it reduces the stalls and frame drops from immediate lookups
◆ EnqueueGPUSend()
static void Astra.Asset.TextureManager.EnqueueGPUSend |
( |
TextureRequest |
request | ) |
|
|
inlinestaticprotected |
Used internally to queue up a Texture2D.Apply call for end of frame, job self completes if in the request
- Parameters
-
◆ GetReadable()
Yields a new texture that is readable on the cpu side, as in you can call GetPixels on it NOTE: this is not as efficient as simply getting the data out w/o it being in this format see nativeBuffer
- Parameters
-
- Returns
◆ GetTexture2D() [1/2]
static TextureJob Astra.Asset.TextureManager.GetTexture2D |
( |
PrimitiveTexture |
pt | ) |
|
|
inlinestatic |
Efficiently converts a PrimitiveTexture to a Texture2D while minimally blocking main thread
- Parameters
-
- Returns
◆ GetTexture2D() [2/2]
A generic way to convert from any format to any other (within reason) See TextureRequest's options for the many choices/bits/pieces you can set/toggle You must have a srcXYZ variable set and the output will live in dstTexture2D
- Parameters
-
- Returns
◆ LoadTexture2D()
Our job here is not to resize/scale/etc, but to just simply create a Texture2D from the PrimitiveTexture there is no processing being done here
- Parameters
-
- Returns
◆ OnTick()
static void Astra.Asset.TextureManager.OnTick |
( |
MonoBehaviour |
ctx, |
|
|
float |
deltaTime |
|
) |
| |
|
inlinestatic |
Fire this from your update interval via StartCoroutine()
- Parameters
-
◆ SendToGPU()
static IEnumerator Astra.Asset.TextureManager.SendToGPU |
( |
| ) |
|
|
inlinestaticprotected |
Fired as a coroutine ensuring a Texture2D.Apply is called at the end of the frame, avoiding pipeline stalls
- Returns
◆ SubmitReadRequest()
static void Astra.Asset.TextureManager.SubmitReadRequest |
( |
TextureRequest |
request | ) |
|
|
inlinestaticprotected |
Submits a readback request against the gpu, this is an async operation and will avoid blocking main thread as much as possible based on your priority in the request
- Parameters
-
The documentation for this class was generated from the following file:
- Assets/Astra/Asset/Texture/TextureManager.cs