A renderer that uses the GPU-accelerated Apex RIP to create images from arbitrary DOM.
More...
#include <apexrenderer.h>
|
virtual void | render (const IDOMNodePtr &node, CRenderSpec *renderSpec)=0 |
| Render a node, targeting the given render specification. Any gray, RGB (except sRGB), or CMYK space is currently supported for both the process space. Extended gamut (ie CMYKOV or CMYKOVG) ICC color spaces are supported as the final output space, achievable by the use of a color conversion post process. For best results, it is recommended that a wide gamut CMYK profile is used as the process space in order to preserve as much gamut as possible, while still affording normal PDF transparency and CMYK overprint semantics.
|
|
virtual ITexturePtr | uploadImage (void *data, uint32 size, uint8 numComponents, uint32 width, uint32 height, uint32 depth, bool filtered=false)=0 |
| Upload an image to the GPU preparing for its use as a texture by a custom post processing step (see apexcustompostprocess.h).
|
|
virtual IFragmentShaderPtr | createFragmentShader (void *data, uint32 size)=0 |
| Create a fragment shader ready to run on the GPU. These fragment shaders must be presented in SPIR-V format suitable for use with the Vulkan graphics API. These are typically written using GLSL and compiled to SPIR-V using glslc (included with the Vulkan SDK) or similar.
|
|
virtual void | addRef () const =0 |
| Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
|
|
virtual bool | decRef () const =0 |
| Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
|
|
virtual int32 | getRefCount () const =0 |
| Retrieve the current reference count of the actual object pointed to.
|
|
|
static JAWSMAKO_API IApexRendererPtr | create (const IJawsMakoPtr &jawsMako, int32 deviceIndex=-1) |
| Create an Apex renderer instance.
|
|
static JAWSMAKO_API CGpuDeviceInfoVect | enumerateGpus () |
| Enumerate all the available GPU devices.
|
|
|
virtual | ~IRCObject () |
| Virtual destructor.
|
|
A renderer that uses the GPU-accelerated Apex RIP to create images from arbitrary DOM.
◆ create()
static JAWSMAKO_API IApexRendererPtr JawsMako::IApexRenderer::create |
( |
const IJawsMakoPtr & | jawsMako, |
|
|
int32 | deviceIndex = -1 ) |
|
static |
Create an Apex renderer instance.
- Parameters
-
jawsMako | The Mako instance. |
deviceIndex | The index of the device to use, or -1 for automatic. Device indexes may be discovered with enumerateGpus below; the index passed here is the index within the resulting enumerated GPUs. |
- Returns
- IApexRendererPtr The new renderer instance.
◆ createFragmentShader()
virtual IFragmentShaderPtr JawsMako::IApexRenderer::createFragmentShader |
( |
void * | data, |
|
|
uint32 | size ) |
|
pure virtual |
Create a fragment shader ready to run on the GPU. These fragment shaders must be presented in SPIR-V format suitable for use with the Vulkan graphics API. These are typically written using GLSL and compiled to SPIR-V using glslc (included with the Vulkan SDK) or similar.
- Parameters
-
data | A pointer to the fragment shader data in SPIR-V format. |
size | The size, in bytes, of the fragment shader data. |
- Returns
- IFragmentShaderPtr The shader ready to be used with a custom post- process step. Objects of this type must be released before the IApexRenderer that created it is released.
◆ enumerateGpus()
static JAWSMAKO_API CGpuDeviceInfoVect JawsMako::IApexRenderer::enumerateGpus |
( |
| ) |
|
|
static |
Enumerate all the available GPU devices.
- Returns
- CGpuDeviceInfoVect A vector of all the available GPU devices.
◆ render()
virtual void JawsMako::IApexRenderer::render |
( |
const IDOMNodePtr & | node, |
|
|
CRenderSpec * | renderSpec ) |
|
pure virtual |
Render a node, targeting the given render specification. Any gray, RGB (except sRGB), or CMYK space is currently supported for both the process space. Extended gamut (ie CMYKOV or CMYKOVG) ICC color spaces are supported as the final output space, achievable by the use of a color conversion post process. For best results, it is recommended that a wide gamut CMYK profile is used as the process space in order to preserve as much gamut as possible, while still affording normal PDF transparency and CMYK overprint semantics.
- Parameters
-
◆ uploadImage()
virtual ITexturePtr JawsMako::IApexRenderer::uploadImage |
( |
void * | data, |
|
|
uint32 | size, |
|
|
uint8 | numComponents, |
|
|
uint32 | width, |
|
|
uint32 | height, |
|
|
uint32 | depth, |
|
|
bool | filtered = false ) |
|
pure virtual |
Upload an image to the GPU preparing for its use as a texture by a custom post processing step (see apexcustompostprocess.h).
Instances must be released prior to the release of the creating IApexRendererPtr in order to satisfy Vulkan API rules.
These images may have one or four components, and may use 8, 16, or 32 bit (single-precision floating point) depth. Little-endian byte ordering is to be used.
The image may be created such that any shader that uses it will receive filtered pixels, using linear interpolation. The default is nearest-neighbour interpolation.
The maximum image dimension supported will differ by GPU, but on typical desktop GPUs and iGPUs, images up to 16384 pixels in each dimension are generally supported. Please see the Vulkan Hardware Database to browse current limits: https://vulkan.gpuinfo.org/displaydevicelimit.php?name=maxImageDimension2D&platform=all
- Parameters
-
data | A pointer to the data to be uploaded. Must be little endian. |
size | The size, in bytes, of the data. |
numComponents | The number of components in the image. Must be 1 or 4. |
width | The width of the image. Must not exceed the maximum image size of the GPU device in use. |
height | The height of the image. Must not exceed the maximum image size of the GPU device in use. |
depth | The depth of the image. Must be 8, 16, or 32 (float) |
filtered | If true, the resulting image will be set up for filtered (interpolated) reads from any fragment shader. |
- Returns
- ITexturePtr The uploaded texture ready to be used with a custom post-process step. Objects of this type must be released before the IApexRenderer that created it is released.
The documentation for this class was generated from the following file: