RenderFactory

Inheritance: java.lang.Object

public abstract class RenderFactory

RenderFactory creates all resources that represented in rendering pipeline.

Constructors

ConstructorDescription
RenderFactory()

Methods

MethodDescription
createCubeRenderTexture(RenderParameters parameters, int width, int height)Create a render target contains 1 cube texture
createDescriptorSet(ShaderProgram shader)Create the descriptor set for specified shader program.
createIndexBuffer()Create an IIndexBuffer instance to store polygon’s face information.
createPipeline(ShaderProgram shader, RenderState renderState, VertexDeclaration vertexDeclaration, DrawOperation drawOperation)Create a preconfigured graphics pipeline with preconfigured shader/render state/vertex declaration and draw operations.
createRenderTexture(RenderParameters parameters, int width, int height)Create a render target contains 1 targets that renders to the texture
createRenderTexture(RenderParameters parameters, int targets, int width, int height)Create a render target that renders to the texture
createRenderWindow(RenderParameters parameters, WindowHandle handle)Create a render target that renders to the native window.
createShaderProgram(ShaderSource shaderSource)Create a ShaderProgram object
createTextureUnit()Create a 2D texture unit that can be accessed by shader.
createTextureUnit(TextureType textureType)Create a texture unit that can be accessed by shader.
createUniformBuffer(int size)Create a new uniform buffer in GPU side with pre-allocated size.
createVertexBuffer(VertexDeclaration declaration)Create an IVertexBuffer instance to store polygon’s vertex information.
equals(Object arg0)
getClass()
hashCode()
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

RenderFactory()

public RenderFactory()

createCubeRenderTexture(RenderParameters parameters, int width, int height)

public abstract IRenderTexture createCubeRenderTexture(RenderParameters parameters, int width, int height)

Create a render target contains 1 cube texture

Parameters:

ParameterTypeDescription
parametersRenderParametersRender parameters to create the render texture
widthintThe width of the render texture
heightintThe height of the render texture

Returns: IRenderTexture

createDescriptorSet(ShaderProgram shader)

public abstract IDescriptorSet createDescriptorSet(ShaderProgram shader)

Create the descriptor set for specified shader program.

Parameters:

ParameterTypeDescription
shaderShaderProgramThe shader program

Returns: IDescriptorSet - A new descriptor set instance

createIndexBuffer()

public abstract IIndexBuffer createIndexBuffer()

Create an IIndexBuffer instance to store polygon’s face information.

Returns: IIndexBuffer

createPipeline(ShaderProgram shader, RenderState renderState, VertexDeclaration vertexDeclaration, DrawOperation drawOperation)

public abstract IPipeline createPipeline(ShaderProgram shader, RenderState renderState, VertexDeclaration vertexDeclaration, DrawOperation drawOperation)

Create a preconfigured graphics pipeline with preconfigured shader/render state/vertex declaration and draw operations.

Parameters:

ParameterTypeDescription
shaderShaderProgramThe shader used in the rendering
renderStateRenderStateThe render state used in the rendering
vertexDeclarationVertexDeclarationThe vertex declaration of input vertex data
drawOperationDrawOperationDraw operation

Returns: IPipeline - A new pipeline instance

createRenderTexture(RenderParameters parameters, int width, int height)

public abstract IRenderTexture createRenderTexture(RenderParameters parameters, int width, int height)

Create a render target contains 1 targets that renders to the texture

Parameters:

ParameterTypeDescription
parametersRenderParametersRender parameters to create the render texture
widthintThe width of the render texture
heightintThe height of the render texture

Returns: IRenderTexture

createRenderTexture(RenderParameters parameters, int targets, int width, int height)

public abstract IRenderTexture createRenderTexture(RenderParameters parameters, int targets, int width, int height)

Create a render target that renders to the texture

Parameters:

ParameterTypeDescription
parametersRenderParametersRender parameters to create the render texture
targetsintHow many color output targets
widthintThe width of the render texture
heightintThe height of the render texture

Returns: IRenderTexture

createRenderWindow(RenderParameters parameters, WindowHandle handle)

public abstract IRenderWindow createRenderWindow(RenderParameters parameters, WindowHandle handle)

Create a render target that renders to the native window.

Parameters:

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

Returns: IRenderWindow

createShaderProgram(ShaderSource shaderSource)

public abstract ShaderProgram createShaderProgram(ShaderSource shaderSource)

Create a ShaderProgram object

Parameters:

ParameterTypeDescription
shaderSourceShaderSourceThe source code of the shader

Returns: ShaderProgram

createTextureUnit()

public ITextureUnit createTextureUnit()

Create a 2D texture unit that can be accessed by shader.

Returns: ITextureUnit

createTextureUnit(TextureType textureType)

public abstract ITextureUnit createTextureUnit(TextureType textureType)

Create a texture unit that can be accessed by shader.

Parameters:

ParameterTypeDescription
textureTypeTextureTypeType of the texture

Returns: ITextureUnit

createUniformBuffer(int size)

public abstract IBuffer createUniformBuffer(int size)

Create a new uniform buffer in GPU side with pre-allocated size.

Parameters:

ParameterTypeDescription
sizeintThe size of the uniform buffer

Returns: IBuffer - The uniform buffer instance

createVertexBuffer(VertexDeclaration declaration)

public abstract IVertexBuffer createVertexBuffer(VertexDeclaration declaration)

Create an IVertexBuffer instance to store polygon’s vertex information.

Parameters:

ParameterTypeDescription
declarationVertexDeclaration

Returns: IVertexBuffer

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int