Skip to content

Commit c1f3ba0

Browse files
committed
update GLTF : add of RPRS_context argument
1 parent 856f6c6 commit c1f3ba0

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed
Binary file not shown.
Binary file not shown.
5.5 KB
Binary file not shown.

RadeonProRender/inc/ProRenderGLTF.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515

1616
#include <RadeonProRender.h>
17+
#include <RprLoadStore.h>
1718

1819
#ifdef __cplusplus
1920
extern "C" {
@@ -71,10 +72,13 @@ struct RprGltfImportCallbacks
7172
@param scene The scene at gltTF::scene is loaded and stored in this handle.
7273
@param callbacks Callbacks to be used during scene parsing - set it to NULL if not used.
7374
@param importFlags see RPRGLTF_IMPORTFLAG_* for more details - set it to 0 if not used.
75+
@param rprsCtx new argument introduced in 2.02.6 API. can be NULL.
76+
This context is created/deleted with rprsCreateContext/rprsDeleteContext.
77+
It can be used to store additional data for the Export
7478
@return GLTF_SUCCESS if success, GLTF_ERROR_IMPORT or GLTF_ERROR_LOAD otherwise.
7579
*/
7680
extern int rprImportFromGLTF(const char* filename, rpr_context context, rpr_material_system materialSystem, rpr_scene* scene,
77-
RprGltfImportCallbacks *callbacks, unsigned int importFlags);
81+
RprGltfImportCallbacks *callbacks, unsigned int importFlags, RPRS_context rprsCtx);
7882

7983
/* Exports a list of Radeon ProRender scenes to a gltf file on disk.
8084
@param filename The path to the gltf file to export. (For Unicode, you can encode the name with UTF-8)
@@ -83,9 +87,12 @@ extern int rprImportFromGLTF(const char* filename, rpr_context context, rpr_mate
8387
@param uberMatContext The pre-initialized Radeon ProRender uber material system context handle to export API objects from.
8488
@param scenes All exported scenes to be written out to the gltf file.
8589
@param exportFlags (new parameter from RPR SDK 1.325) - see RPRGLTF_EXPORTFLAG_* for more details - set it to 0 if not used.
90+
@param rprsCtx new argument introduced in 2.02.6 API. can be NULL.
91+
This context is created/deleted with rprsCreateContext/rprsDeleteContext.
92+
It can be used to read additional data after an Import.
8693
@return GLTF_SUCCESS if success, GLTF_ERROR_EXPORT or GLTF_ERROR_SAVE otherwise.
8794
*/
88-
extern int rprExportToGLTF(const char* filename, rpr_context context, rpr_material_system materialSystem_NOT_USED, const rpr_scene* scenes, size_t sceneCount, unsigned int exportFlags);
95+
extern int rprExportToGLTF(const char* filename, rpr_context context, rpr_material_system materialSystem_NOT_USED, const rpr_scene* scenes, size_t sceneCount, unsigned int exportFlags, RPRS_context rprsCtx);
8996

9097

9198
/*
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)