RenderFactory

RenderFactory class

RenderFactory creates all resources that represented in rendering pipeline. @hideconstructor

Methods

createRenderTexture

NameDescription
createRenderTexture(parameters, targets, width, height)Create a render target that renders to the texture

Parameters:

NameTypeDescription
parametersRenderParametersRender parameters to create the render texture
targetsNumberHow many color output targets
widthNumberThe width of the render texture
heightNumberThe height of the render texture

Result: IRenderTexture


createRenderTexture

NameDescription
createRenderTexture(parameters, width, height)Create a render target contains 1 targets that renders to the texture

Parameters:

NameTypeDescription
parametersRenderParametersRender parameters to create the render texture
widthNumberThe width of the render texture
heightNumberThe height of the render texture

Result: IRenderTexture


createDescriptorSet

NameDescription
createDescriptorSet(shader)Create the descriptor set for specified shader program.

Parameters:

NameTypeDescription
shaderShaderProgramThe shader program

Result: IDescriptorSet


createCubeRenderTexture

NameDescription
createCubeRenderTexture(parameters, width, height)Create a render target contains 1 cube texture

Parameters:

NameTypeDescription
parametersRenderParametersRender parameters to create the render texture
widthNumberThe width of the render texture
heightNumberThe height of the render texture

Result: IRenderTexture


createRenderWindow

NameDescription
createRenderWindow(parameters, handle)Create a render target that renders to the native window.

Parameters:

NameTypeDescription
parametersRenderParametersRender parameters to create the render window
handleWindowHandleThe handle of the window to render

Result: IRenderWindow


createVertexBuffer

NameDescription
createVertexBuffer(declaration)Create an com.aspose.threed.IVertexBuffer instance to store polygon’s vertex information.

Parameters:

NameTypeDescription
declaratioVertexDeclarationnull

Result: IVertexBuffer


createIndexBuffer

NameDescription
createIndexBuffer()Create an com.aspose.threed.IIndexBuffer instance to store polygon’s face information.

Result: IIndexBuffer


createTextureUnit

NameDescription
createTextureUnit(textureType)Create a texture unit that can be accessed by shader.

Parameters:

NameTypeDescription
textureTypeTextureTypeTextureType

Result: ITextureUnit


createTextureUnit

NameDescription
createTextureUnit()Create a 2D texture unit that can be accessed by shader.

Result: ITextureUnit


createShaderProgram

NameDescription
createShaderProgram(shaderSource)Create a ShaderProgram object

Parameters:

NameTypeDescription
shaderSourceShaderSourceThe source code of the shader

Result: ShaderProgram


createPipeline

NameDescription
createPipeline(shader, renderState, vertexDeclaration, drawOperation)Create a preconfigured graphics pipeline with preconfigured shader/render state/vertex declaration and draw operations.

Parameters:

NameTypeDescription
shaderShaderProgramThe shader used in the rendering
renderStateRenderStateThe render state used in the rendering
vertexDeclarationVertexDeclarationThe vertex declaration of input vertex data
drawOperationDrawOperationDrawOperation

Result: IPipeline


createUniformBuffer

NameDescription
createUniformBuffer(size)Create a new uniform buffer in GPU side with pre-allocated size.

Parameters:

NameTypeDescription
sizeNumberThe size of the uniform buffer

Result: IBuffer