Methods
BeginScene()
Begins rendering a new scene.
This method should be called before rendering a new frame
- Source:
ClearDepthBuffer()
Clears the depth buffer
- Source:
ClearScreen(color)
Clears the frame buffer with a specified color
Parameters:
Name | Type | Description |
---|---|---|
color |
AxVector4 | Color to cleare the frame buffer with |
- Source:
CreateMesh() → {AxGraphicsDeviceMesh}
Creates a new mesh for the respective device
- Source:
Returns:
New mesh for the respective device
- Type
- AxGraphicsDeviceMesh
CreateShader() → {AxDeviceShader}
Creates a new shader for the respective device
- Source:
Returns:
New shader for the respective device
- Type
- AxDeviceShader
CreateTexture() → {AxDeviceTexture2D}
Creates a new texture for the respective device
- Source:
Returns:
New texture for the respective device
- Type
- AxDeviceTexture2D
EndScene()
Ends rendering of a scene.
This method should be called after all rendering in a frame is done
- Source:
GetPixelFormat() → {AxPixelFormat}
Gets the pixel format of the device
- Source:
Returns:
The pixel format of the device
- Type
- AxPixelFormat
Present() → {Boolean}
Presents the frame buffer on the screen to the set rendering target window
- Source:
Returns:
True if presenting succeeded.
- Type
- Boolean
RenderMesh()
Renders the mesh set to the device using the set shader and device settings
- Source:
SetMesh(mesh)
Sets the mesh to render
Parameters:
Name | Type | Description |
---|---|---|
mesh |
AxDeviceMesh | The mesh to be rendered |
- Source:
SetRenderState(renderState)
Sets the render state
The render state represents a set of settings for the graphics device
Parameters:
Name | Type | Description |
---|---|---|
renderState |
AxRenderState | The rendering shader to be set |
- Source:
SetRenderTargetTexture(texture) → {Bool}
Sets a target texture to render onto
Parameters:
Name | Type | Description |
---|---|---|
texture |
AxDeviceTexture2D | Texture to use for rendering onto |
- Source:
Returns:
New mesh for the respective device
- Type
- Bool
SetRenderTargetWindow(windowHandle) → {Bool}
Sets a target window for presenting the rendering result
Parameters:
Name | Type | Description |
---|---|---|
windowHandle |
Canvas | Canvas to use for presenting the rendering result |
- Source:
Returns:
New mesh for the respective device
- Type
- Bool
SetShader(shader)
Sets the rendering shader
Parameters:
Name | Type | Description |
---|---|---|
shader |
AxDeviceShader | The shader to be set |
- Source:
SetViewport(x, y, width, height)
Sets the viewport of the frame buffer
Parameters:
Name | Type | Description |
---|---|---|
x |
Integer | Left boundary in pixels of the viewport |
y |
Integer | Top boundary in pixels of the viewport |
width |
Integer | Width in pixels of the viewport |
height |
Integer | Height in pixels of the viewport |
- Source: