Note
You have to include the header Main.h.
SetMemoryAllocator
(MemoryAllocator
*memoryAllocator)Sets a custom memory allocator. Only one memory allocator can be set. A memory allocator cannot be removed or replaced. This function must be called before calling the Init function.
Init
()Initializes InstantTerraApi. Must be called once before calling the CreateInstantTerra function.
Error - If the
Instant Terra is already initialized, an Error will be reported
with the code
ErrorCode::InstantTerraApiAlreadyInitialized
.
Init(); // Init InstantTerraApi
Close
()Closes InstantTerraApi. It must be the last call. If a memory allocator or an error handler have been set, they will be deleted.
Close(); // Close InstantTerraApi
SetErrorHandler
(ErrorHandler
*errorHandler)Sets a custom error handler. Only one error handler can be set at the same time. Setting a new error handler will remove and delete the previous one, if any. Pass nullptr to remove the current error handler.
CreateInstantTerra
()This is the entry point of the API. Create an InstantTerra object and use it to start an instance of the Instant Terra application.
Error - If the
Instant Terra is not initialized, an Error will be reported with
the code
ErrorCode::InstantTerraApiIsNotInizialized
.
// Create an instant of Instant Terra
InstantTerra instantTerra = CreateInstantTerra();
Copyright © 2022 · All Rights Reserved · Wysilab