RenderFactory
Inheritance: java.lang.Object
public abstract class RenderFactory
RenderFactory creates all resources that represented in rendering pipeline.
Constructors
Constructor | Description |
---|---|
RenderFactory() |
Methods
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:
Parameter | Type | Description |
---|---|---|
parameters | RenderParameters | Render parameters to create the render texture |
width | int | The width of the render texture |
height | int | The 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:
Parameter | Type | Description |
---|---|---|
shader | ShaderProgram | The 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:
Parameter | Type | Description |
---|---|---|
shader | ShaderProgram | The shader used in the rendering |
renderState | RenderState | The render state used in the rendering |
vertexDeclaration | VertexDeclaration | The vertex declaration of input vertex data |
drawOperation | DrawOperation | Draw 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:
Parameter | Type | Description |
---|---|---|
parameters | RenderParameters | Render parameters to create the render texture |
width | int | The width of the render texture |
height | int | The 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:
Parameter | Type | Description |
---|---|---|
parameters | RenderParameters | Render parameters to create the render texture |
targets | int | How many color output targets |
width | int | The width of the render texture |
height | int | The 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:
Parameter | Type | Description |
---|---|---|
parameters | RenderParameters | Render parameters to create the render window |
handle | WindowHandle | The handle of the window to render |
Returns: IRenderWindow
createShaderProgram(ShaderSource shaderSource)
public abstract ShaderProgram createShaderProgram(ShaderSource shaderSource)
Create a ShaderProgram object
Parameters:
Parameter | Type | Description |
---|---|---|
shaderSource | ShaderSource | The 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:
Parameter | Type | Description |
---|---|---|
textureType | TextureType | Type 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:
Parameter | Type | Description |
---|---|---|
size | int | The 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:
Parameter | Type | Description |
---|---|---|
declaration | VertexDeclaration |
Returns: IVertexBuffer
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |