FOpenGLDynamicRHI::RHIAsyncReallocateTexture2D

Override Hierarchy

FDynamicRHI::RHIAsyncReallocateTexture2D()

FOpenGLDynamicRHI::RHIAsyncReallocateTexture2D()

Syntax

virtual FTexture2DRHIRef RHIAsyncReallocateTexture2D
(
    FTexture2DRHIParamRef Texture2D,
    int32 NewMipCount,
    int32 NewSizeX,
    int32 NewSizeY,
    FThreadSafeCounter * RequestStatus
)

Remarks

Starts an asynchronous texture reallocation. It may complete immediately if the reallocation could be performed without any reshuffling of texture memory, or if there isn't enough memory. The specified status counter will be decremented by 1 when the reallocation is complete (success or failure).

Returns a new reference to the texture, which will represent the new mip count when the reallocation is complete. RHIFinalizeAsyncReallocateTexture2D() must be called to complete the reallocation.

Returns

  • New reference to the texture, or an invalid reference upon failureFlushType: Flush RHI Thread NP: Note that no RHI currently implements this as an async call, we should simplify the API.

Parameters

Parameter

Description

Texture2D

Texture to reallocate

NewMipCount

New number of mip-levels

NewSizeX

New width, in pixels

NewSizeY

New height, in pixels

RequestStatus

Will be decremented by 1 when the reallocation is complete (success or failure).

References

Module

OpenGLDrv

Header

Runtime/OpenGLDrv/Public/OpenGLDrv.h

Source

Runtime/OpenGLDrv/Private/OpenGLTexture.cpp