VRC SDK
This project aims to completely document the VRChat Unity SDK
Loading...
Searching...
No Matches
VRC.SDK3.Image.VRCImageDownloader.ImageDownloader Class Reference
Inheritance diagram for VRC.SDK3.Image.VRCImageDownloader.ImageDownloader:
Collaboration diagram for VRC.SDK3.Image.VRCImageDownloader.ImageDownloader:

Classes

struct  d
 
struct  d__51
 
struct  d__52
 
struct  ImageInfo
 
struct  ImageLoadSettings
 
struct  ImageResult
 

Public Types

enum  ImageError : Enum
 
enum  ImageFormat : Enum
 
enum  ImageLoadSettingsFlags : Enum
 

Public Member Functions

 ImageDownloader (VRCUrl url, Material material, IUdonEventReceiver udonBehaviour=null, TextureInfo textureInfo=null)
 
virtual void StartDownload ()
 
void Dispose ()
 
void CancelDownload ()
 
void StartDownload ()
 
void CancelDownload ()
 

Static Public Member Functions

static IVRCImageDownload DownloadImage (VRCUrl url, Material material, IUdonEventReceiver udonBehaviour, TextureInfo textureInfo)
 

Protected Member Functions

UniTask DownloadImage (Uri uri, CancellationToken cancellationToken)
 

Static Package Functions

static UniTask< DownloadImageg__SlicedTextureUpload (int width, int height, int bytesPerPixel, TextureFormat format, int mipLevel, NativeSlice< byte > outputBuffer, Texture2D outputTexture)
 

Properties

VRCImageDownloadState State [get, protected set]
 
VRCImageDownloadError Error [get, protected set]
 
string ErrorMessage [get, protected set]
 
Texture2D Result [get, protected set]
 
int SizeInMemoryBytes [get]
 
float Progress [get, protected set]
 
VRCUrl Url [get, protected set]
 
Material Material [get, protected set]
 
IUdonEventReceiver UdonBehaviour [get, protected set]
 
TextureInfo TextureInfo [get, protected set]
 
- Properties inherited from VRC.SDK3.Image.IVRCImageDownload
VRCImageDownloadState State [get]
 
VRCImageDownloadError Error [get]
 
string ErrorMessage [get]
 
Texture2D Result [get]
 
int SizeInMemoryBytes [get]
 
float Progress [get]
 
VRCUrl Url [get]
 
Material Material [get]
 
IUdonEventReceiver UdonBehaviour [get]
 
TextureInfo TextureInfo [get]
 

Private Member Functions

static ImageResult LoadImage (System.IntPtr inputBytes, uint inputBytesLength, System.IntPtr outputBuffer, uint outputBufferLength, ImageLoadSettings settings)
 
void SetProgress (float progress)
 
UniTask RunUdonEventOnMainThreadAndRemoveFromQueue (string eventName, ValueTuple< string, object > argument)
 
 ~ImageDownloader ()
 

Static Private Attributes

const string NATIVE_LIB = "vrc_image_loader"
 
const float MINIMUM_DELAY_BETWEEN_REQUESTS = 5f
 
const int MAXIMUM_DIMENSION = 2048
 
const int MAX_BUFFER_SIZE = 33554432
 
const int SLICE_SIZE_BYTES = 1048576
 

Detailed Description

Definition at line 2847 of file VRCSDK3.cs.

Member Enumeration Documentation

◆ ImageError

◆ ImageFormat

◆ ImageLoadSettingsFlags

Constructor & Destructor Documentation

◆ ImageDownloader()

VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.ImageDownloader ( VRCUrl  url,
Material  material,
IUdonEventReceiver  udonBehaviour = null,
TextureInfo  textureInfo = null 
)

Definition at line 4297 of file VRCSDK3.cs.

◆ ~ImageDownloader()

VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.~ImageDownloader ( )
private

Definition at line 4442 of file VRCSDK3.cs.

Here is the call graph for this function:

Member Function Documentation

◆ CancelDownload()

void VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.CancelDownload ( )

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4432 of file VRCSDK3.cs.

◆ Dispose()

void VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.Dispose ( )

Definition at line 4395 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DownloadImage() [1/2]

UniTask VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.DownloadImage ( Uri  uri,
CancellationToken  cancellationToken 
)
protected

Definition at line 4360 of file VRCSDK3.cs.

Here is the call graph for this function:

◆ DownloadImage() [2/2]

static IVRCImageDownload VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.DownloadImage ( VRCUrl  url,
Material  material,
IUdonEventReceiver  udonBehaviour,
TextureInfo  textureInfo 
)
static

Definition at line 4292 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ g__SlicedTextureUpload()

static UniTask< DownloadImage > VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.g__SlicedTextureUpload ( int  width,
int  height,
int  bytesPerPixel,
TextureFormat  format,
int  mipLevel,
NativeSlice< byte >  outputBuffer,
Texture2D  outputTexture 
)
staticpackage

Definition at line 4456 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadImage()

static ImageResult VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.LoadImage ( System.IntPtr  inputBytes,
uint  inputBytesLength,
System.IntPtr  outputBuffer,
uint  outputBufferLength,
ImageLoadSettings  settings 
)
private
Here is the caller graph for this function:

◆ RunUdonEventOnMainThreadAndRemoveFromQueue()

UniTask VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.RunUdonEventOnMainThreadAndRemoveFromQueue ( string  eventName,
ValueTuple< string, object >  argument 
)
private

Definition at line 4378 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetProgress()

void VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.SetProgress ( float  progress)
private

Definition at line 4354 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ StartDownload()

virtual void VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.StartDownload ( )
virtual

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4308 of file VRCSDK3.cs.

Here is the call graph for this function:

Member Data Documentation

◆ MAX_BUFFER_SIZE

const int VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.MAX_BUFFER_SIZE = 33554432
staticprivate

Definition at line 4186 of file VRCSDK3.cs.

◆ MAXIMUM_DIMENSION

const int VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.MAXIMUM_DIMENSION = 2048
staticprivate

Definition at line 4184 of file VRCSDK3.cs.

◆ MINIMUM_DELAY_BETWEEN_REQUESTS

const float VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.MINIMUM_DELAY_BETWEEN_REQUESTS = 5f
staticprivate

Definition at line 4182 of file VRCSDK3.cs.

◆ NATIVE_LIB

const string VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.NATIVE_LIB = "vrc_image_loader"
staticprivate

Definition at line 4180 of file VRCSDK3.cs.

◆ SLICE_SIZE_BYTES

const int VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.SLICE_SIZE_BYTES = 1048576
staticprivate

Definition at line 4188 of file VRCSDK3.cs.

Property Documentation

◆ Error

VRCImageDownloadError VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.Error
getprotected set

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4206 of file VRCSDK3.cs.

◆ ErrorMessage

string VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.ErrorMessage
getprotected set

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4215 of file VRCSDK3.cs.

◆ Material

Material VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.Material
getprotected set

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4263 of file VRCSDK3.cs.

◆ Progress

float VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.Progress
getprotected set

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4245 of file VRCSDK3.cs.

◆ Result

Texture2D VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.Result
getprotected set

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4224 of file VRCSDK3.cs.

◆ SizeInMemoryBytes

int VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.SizeInMemoryBytes
get

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4232 of file VRCSDK3.cs.

◆ State

VRCImageDownloadState VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.State
getprotected set

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4197 of file VRCSDK3.cs.

◆ TextureInfo

TextureInfo VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.TextureInfo
getprotected set

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4281 of file VRCSDK3.cs.

◆ UdonBehaviour

IUdonEventReceiver VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.UdonBehaviour
getprotected set

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4272 of file VRCSDK3.cs.

◆ Url

VRCUrl VRC.SDK3.Image.VRCImageDownloader.ImageDownloader.Url
getprotected set

Implements VRC.SDK3.Image.IVRCImageDownload.

Definition at line 4254 of file VRCSDK3.cs.


The documentation for this class was generated from the following file: