Engine C API Reference

Engine C API Reference

This reference contains a browsable companion to the native C plug-in APIs exposed by the interactive engine. You can use these APIs to access services provided by the engine.

For background information on writing engine plug-ins, and an overview of how to use the APIs in this reference, see Extend the Engine.

The material in this reference mostly falls into the following categories:

The main plug-in and service APIs

The PluginApi struct represents the main interface that your plug-in should implement in order to hook in to the engine. When the engine calls the functions in your PluginApi, it passes along a GetApiFunction that your plug-in can use in order to access other services provided by the engine. For a list of these engine services, see the PluginApiID enumeration.

Mostly, these service APIs have names that end in Api. For example: RenderBufferApi, AllocatorApi, FileSystemApi, FlowNodesApi, etc.

The C gameplay API

One of the engine service APIs that your plug-in can request is the ScriptApi: a way for your plug-in to interact with the running project from C in much the same way that you can use Lua to control the project's gameplay and interaction. Through the ScriptApi, you can access functions for managing things like game worlds, levels, units, entities, physics actors, and more.

The structs that make up this gameplay API mostly have names that end in CApi. For example: WorldCApi, ApplicationCApi, UnitCApi, etc.

The plug-in foundation

This is an optional set of helpers for dealing with common types of objects and data structures used in game programming. This foundation API is provided for your convenience, to make it easier to deal with things like vectors and matrices, memory buffers, hashes, and strings. These helpers can be found the plugin_foundation directory, and all members are gathered under the stingray_plugin_foundation namespace.