Inheritance diagram for DzRenderer:
Implements a standard RenderMan interface for the scene to render itself through an offline renderer.
DzRenderer::aboutToRender | ( | DzRenderer | renderer | ) | [signal] |
Signature: "aboutToRender(DzRenderer*)"
Emitted when just before the renderer begins rendering
renderer | A pointer to this renderer |
Compiles the shader at the given path, if necessary, and returns the path to the compiled shader.
shaderPath | The path to the shader source to compile |
Boolean DzRenderer::customRender | ( | DzRenderHandler | handler, | |
DzCamera | camera, | |||
Array | lights, | |||
Array | nodes, | |||
DzRenderOptions | opt | |||
) |
Render a custom set of items.
handler | Settings and handler for the render. | |
camera | Camera to render from. | |
lights | List of lights for the render. | |
nodes | List of items to be rendered. | |
opt | Options for this render. |
DtFilterFunc DzRenderer::getFilterFunction | ( | DzRenderOptions::PixelFilter | filterType | ) |
This function provides a way to query the renderer for a filter function of the given type. Subclasses should override this method and return function pointers to the appropriate filters from the specific rendering engine being used.
filterType | The type of filter to get from the renderer. |
String DzRenderer::getName | ( | ) |
String DzRenderer::getShaderCompilerPath | ( | ) |
Reimplemented in DzScriptedRenderer.
String DzRenderer::getShaderExtension | ( | ) |
Given a shader name (e.g. "metal"), this method returns the file name for it by appending the shader extension for the renderer (e.g. "metal.sdl").
DzShaderDescription DzRenderer::getShaderInfo | ( | String | shaderPath | ) |
Gets the parameter information for the given shader. The passed shader name should be the path to the compiled shader.
Given a shader name (e.g. "metal"), looks in all the shader directories attempting to find the file for it. If withExtension is true, the shader path, including the extension for the renderer is returned. Otherwise, it returns the full shader path without the extension appended. If it fails to find the shader, it returns an empty string.
Array DzRenderer::getShaderSearchPaths | ( | ) |
This method returns a list of paths which are used to search for shaders while rendering. It is used by the getShaderPath() method.
String DzRenderer::getTextureUtilityPath | ( | ) |
Signature: "imagePrepared(const DzTexture*,const QString& )"
Emitted when the image preparation for img is finished. Derived classes need to make sure to emit this signal at the appropriate times.
img | A pointer to the DzTexture object for which image preparation is complete. | |
filename | The path to the prepared image file to be associated with img. |
Boolean DzRenderer::isRendering | ( | ) |
void DzRenderer::killRender | ( | ) |
Called to kill any current render threads on this renderer.
Called by the framework to prepare/convert an image into a format that this renderer can understand/use when rendering. In derived classes, the function should result in a new image file being generated along with a path that the renderer can use to refer to the file. If the image could not be converted or is not usable by this renderer, the returned string should be empty.
Since the framework will call this function intermittently while processing other events, derived classes that need to implement this function should make it return as quickly as possible, and do the actual image preparation in separate threads or processes, in order to avoid performance problems or interface lock-ups.
After the image preparation is finished, derived classes should emit the imagePrepared() signal, passing img and the new path as parameters.
The default implementation simply emits the imagePrepared() signal with the original file name.
img | A pointer to the DzTexture object for which the image is being prepared. This pointer acts as an identifier and must be used when emitting the imagePrepared() signal when prepartion is complete. | |
filename | The path to the original image file that needs to be processed. |
Processes the given shader name into a form the renderer can use (i.e. appending file extensions, finding absolute paths, etc.).
Boolean DzRenderer::render | ( | DzRenderHandler | handler, | |
DzCamera | camera, | |||
DzRenderOptions | opt | |||
) |
Render the current scene.
handler | Settings and handler for the render. | |
camera | Camera to render the scene from. | |
opt | Options for this render. |
DzRenderer::renderFinished | ( | DzRenderer | renderer | ) | [signal] |
Signature: "renderFinished(DzRenderer*)"
Emitted when just after the renderer finishes rendering
renderer | A pointer to this renderer |