#ifndef __nsi_procedural_h
#define __nsi_procedural_h
#include "nsi.h"
#ifdef __cplusplus
extern "C" {
#endif
struct NSIProcedural_t;
typedef void (*NSIReport_t)(NSIContext_t ctx, int level, const char* message);
#define NSI_PROCEDURAL_UNLOAD(name) \
void name( \
NSIContext_t ctx, \
NSIReport_t report, \
struct NSIProcedural_t* proc)
typedef NSI_PROCEDURAL_UNLOAD((*NSIProceduralUnload_t));
#define NSI_PROCEDURAL_EXECUTE(name) \
void name( \
NSIContext_t ctx, \
NSIReport_t report, \
struct NSIProcedural_t* proc, \
int nparams, \
const struct NSIParam_t* params)
typedef NSI_PROCEDURAL_EXECUTE((*NSIProceduralExecute_t));
struct NSIProcedural_t
{
unsigned nsi_version;
NSIProceduralUnload_t unload;
NSIProceduralExecute_t execute;
};
#define NSI_PROCEDURAL_INIT(proc, unload_fct, execute_fct) \
{ \
(proc).nsi_version = NSI_VERSION; \
(proc).unload = unload_fct; \
(proc).execute = execute_fct; \
}
#define NSI_PROCEDURAL_LOAD_SYMBOL NSIProceduralLoad
#define NSI_PROCEDURAL_LOAD_PARAMS \
NSIContext_t ctx, \
NSIReport_t report, \
const char* nsi_library_path, \
const char* renderer_version
typedef struct NSIProcedural_t* (*NSIProceduralLoad_t)(
NSI_PROCEDURAL_LOAD_PARAMS);
#define NSI_PROCEDURAL_LOAD \
_3DL_EXTERN_C _3DL_EXPORT \
struct NSIProcedural_t* NSI_PROCEDURAL_LOAD_SYMBOL( \
NSI_PROCEDURAL_LOAD_PARAMS)
#ifdef __cplusplus
}
#endif
#endif