|
PH_API void | phConfigRendererResourceDirectory (const PhChar *directory) |
|
PH_API PhBool | phInit () |
|
PH_API PhBool | phExit () |
|
PH_API void | phCreateEngine (PhUInt64 *out_engineId, const PhUInt32 numRenderThreads) |
| Creates an engine.
|
|
PH_API void | phSetNumRenderThreads (PhUInt64 engineId, const PhUInt32 numRenderThreads) |
|
PH_API void | phEnterCommand (PhUInt64 engineId, const PhChar *commandFragment) |
|
PH_API PhBool | phLoadCommands (PhUInt64 engineId, const PhChar *filePath) |
|
PH_API void | phRender (PhUInt64 engineId) |
|
PH_API void | phUpdate (PhUInt64 engineId) |
|
PH_API void | phGetRenderDimension (PhUInt64 engineId, PhUInt32 *out_widthPx, PhUInt32 *out_heightPx) |
|
PH_API void | phGetObservableRenderData (PhUInt64 engineId, struct PHObservableRenderData *out_data) |
|
PH_API void | phDeleteEngine (PhUInt64 engineId) |
|
PH_API void | phSetWorkingDirectory (PhUInt64 engineId, const PhChar *workingDirectory) |
|
PH_API void | phAquireFrame (PhUInt64 engineId, PhUInt64 channelIndex, PhUInt64 frameId) |
|
PH_API void | phAquireFrameRaw (PhUInt64 engineId, PhUInt64 channelIndex, PhUInt64 frameId) |
|
PH_API void | phCreateFrame (PhUInt64 *out_frameId, PhUInt32 widthPx, PhUInt32 heightPx) |
|
PH_API void | phGetFrameDimension (PhUInt64 frameId, PhUInt32 *out_widthPx, PhUInt32 *out_heightPx) |
|
PH_API void | phGetFrameRgbData (PhUInt64 frameId, const PhFloat32 **out_data) |
|
PH_API void | phDeleteFrame (PhUInt64 frameId) |
|
PH_API PhBool | phLoadFrame (PhUInt64 frameId, const PhChar *filePath) |
|
PH_API PhBool | phSaveFrame (PhUInt64 frameId, const PhChar *filePath, const PhFrameSaveInfo *saveInfo) |
| Save a frame to the filesystem.
|
|
PH_API PhBool | phSaveFrameToBuffer (PhUInt64 frameId, PhUInt64 bufferId, PhBufferFormat format, const PhFrameSaveInfo *saveInfo) |
| Save a frame to a buffer.
|
|
PH_API void | phFrameOpAbsDifference (PhUInt64 frameAId, PhUInt64 frameBId, PhUInt64 resultFrameId) |
|
PH_API PhFloat32 | phFrameOpMSE (PhUInt64 expectedFrameId, PhUInt64 estimatedFramIde) |
|
PH_API void | phCreateBuffer (PhUInt64 *out_bufferId) |
|
PH_API void | phGetBufferBytes (PhUInt64 bufferId, const PhUChar **out_bytesPtr, PhSize *out_numBytes) |
|
PH_API void | phDeleteBuffer (PhUInt64 bufferId) |
|
PH_API void | phAsyncGetRenderProgress (PhUInt64 engineId, PhRenderProgress *out_progress) |
|
PH_API void | phAsyncGetRenderStatistics (PhUInt64 engineId, PhFloat32 *out_percentageProgress, PhFloat32 *out_samplesPerSecond) |
|
PH_API void | phAsyncGetRenderState (PhUInt64 engineId, struct PHRenderState *out_state) |
|
PH_API PhBool | phAsyncPollUpdatedFrameRegion (PhUInt64 engineId, PhFrameRegionInfo *out_regionInfo) |
| Polls for a single changed region during engine runtime.
|
|
PH_API PhSize | phAsyncPollUpdatedFrameRegions (PhUInt64 engineId, PhUInt64 bufferId, PhFrameRegionInfo *out_regionInfos, PhSize maxRegionInfos) |
| Polls for multiple changed regions during engine runtime.
|
|
PH_API PhSize | phAsyncPollMergedUpdatedFrameRegions (PhUInt64 engineId, PhUInt64 bufferId, PhSize mergeSize, PhFrameRegionInfo *out_regionInfos, PhSize maxRegionInfos) |
| Polls for multiple changed regions during engine runtime.
|
|
PH_API void | phAsyncPeekFrame (PhUInt64 engineId, PhUInt64 layerIndex, PhUInt32 xPx, PhUInt32 yPx, PhUInt32 widthPx, PhUInt32 heightPx, PhUInt64 frameId) |
|
PH_API void | phAsyncPeekFrameRaw (PhUInt64 engineId, PhUInt64 layerIndex, PhUInt32 xPx, PhUInt32 yPx, PhUInt32 widthPx, PhUInt32 heightPx, PhUInt64 frameId) |
|
Contains main C APIs of the render engine.
To correctly use Photon-v2 API, please read the following notes:
phInit()
and phExit()
must be called before and after the use of the API, and should be called on the same thread.
phCreate/Delete<X>()
and phAsync<X>()
functions can be used in a multithreaded environment. They are thread-safe provided the following conditions are met: phDelete<X>()
should be called from the same thread its corresponding phCreate<X>()
was called from. phAsync<X>()
cannot be called during phUpdate()
(memory effects must be made visible to the calling thread).
- Resources created by
phCreate<X>()
cannot be manipulated concurrently. Any function requiring some resource ID inputs (except phAsync<X>()
functions) is considered a resource manipulating operation on those resources.