Package com.aspose.threed
Class RenderFactory
- java.lang.Object
-
- com.aspose.threed.RenderFactory
-
public abstract class RenderFactory extends java.lang.Object
RenderFactory creates all resources that represented in rendering pipeline.
-
-
Constructor Summary
Constructors Constructor Description RenderFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract IRenderTexture
createCubeRenderTexture(RenderParameters parameters, int width, int height)
Create a render target contains 1 cube textureabstract IDescriptorSet
createDescriptorSet(ShaderProgram shader)
Create the descriptor set for specified shader program.abstract IIndexBuffer
createIndexBuffer()
Create anIIndexBuffer
instance to store polygon's face information.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.abstract IRenderTexture
createRenderTexture(RenderParameters parameters, int width, int height)
Create a render target contains 1 targets that renders to the textureabstract IRenderTexture
createRenderTexture(RenderParameters parameters, int targets, int width, int height)
Create a render target that renders to the textureabstract IRenderWindow
createRenderWindow(RenderParameters parameters, WindowHandle handle)
Create a render target that renders to the native window.abstract ShaderProgram
createShaderProgram(ShaderSource shaderSource)
Create aShaderProgram
objectITextureUnit
createTextureUnit()
Create a 2D texture unit that can be accessed by shader.abstract ITextureUnit
createTextureUnit(TextureType textureType)
Create a texture unit that can be accessed by shader.abstract IBuffer
createUniformBuffer(int size)
Create a new uniform buffer in GPU side with pre-allocated size.abstract IVertexBuffer
createVertexBuffer(VertexDeclaration declaration)
Create anIVertexBuffer
instance to store polygon's vertex information.
-
-
-
Method Detail
-
createRenderTexture
public abstract IRenderTexture createRenderTexture(RenderParameters parameters, int targets, int width, int height)
Create a render target that renders to the texture- Parameters:
parameters
- Render parameters to create the render texturetargets
- How many color output targetswidth
- The width of the render textureheight
- The height of the render texture
-
createRenderTexture
public abstract IRenderTexture createRenderTexture(RenderParameters parameters, int width, int height)
Create a render target contains 1 targets that renders to the texture- Parameters:
parameters
- Render parameters to create the render texturewidth
- The width of the render textureheight
- The height of the render texture
-
createDescriptorSet
public abstract IDescriptorSet createDescriptorSet(ShaderProgram shader)
Create the descriptor set for specified shader program.- Parameters:
shader
- The shader program- Returns:
- A new descriptor set instance
-
createCubeRenderTexture
public abstract IRenderTexture createCubeRenderTexture(RenderParameters parameters, int width, int height)
Create a render target contains 1 cube texture- Parameters:
parameters
- Render parameters to create the render texturewidth
- The width of the render textureheight
- The height of the render texture
-
createRenderWindow
public abstract IRenderWindow createRenderWindow(RenderParameters parameters, WindowHandle handle)
Create a render target that renders to the native window.- Parameters:
parameters
- Render parameters to create the render windowhandle
- The handle of the window to render
-
createVertexBuffer
public abstract IVertexBuffer createVertexBuffer(VertexDeclaration declaration)
Create anIVertexBuffer
instance to store polygon's vertex information.- Parameters:
declaration
-
-
createIndexBuffer
public abstract IIndexBuffer createIndexBuffer()
Create anIIndexBuffer
instance to store polygon's face information.
-
createTextureUnit
public abstract ITextureUnit createTextureUnit(TextureType textureType)
Create a texture unit that can be accessed by shader.- Parameters:
textureType
- Type of the texture
-
createTextureUnit
public ITextureUnit createTextureUnit()
Create a 2D texture unit that can be accessed by shader.
-
createShaderProgram
public abstract ShaderProgram createShaderProgram(ShaderSource shaderSource)
Create aShaderProgram
object- Parameters:
shaderSource
- The source code of the shader
-
createPipeline
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:
shader
- The shader used in the renderingrenderState
- The render state used in the renderingvertexDeclaration
- The vertex declaration of input vertex datadrawOperation
- Draw operation- Returns:
- A new pipeline instance
-
createUniformBuffer
public abstract IBuffer createUniformBuffer(int size)
Create a new uniform buffer in GPU side with pre-allocated size.- Parameters:
size
- The size of the uniform buffer- Returns:
- The uniform buffer instance
-
-