Aether3D
Game Engine
Public Member Functions | Static Public Member Functions | List of all members
Aether3D_API Class Reference

Handles DLL loading and engine object creation. More...

#include <Aether3D.hpp>

Public Member Functions

Error::Enum LoadDLL (const std::string &path)
 
AudioMakeAudio ()
 
CameraMakeCamera ()
 
KeyboardInputMakeKeyboardInput ()
 
LightMakeLight (Light::Type lightType)
 
MaterialMakeMaterial ()
 
MouseInputMakeMouseInput ()
 
ModelMakeModel (const std::string &path, Error::Enum &outError)
 
RendererMakeRenderer (const std::string &builtinAssetPath)
 
SceneMakeScene ()
 
TextureMakeTexture (const std::string &path, bool useMipmaps, bool sRGB, Texture::Tiling tiling, Texture::Filter filter)
 
TextureMakeTexture (const char *left, const char *right, const char *top, const char *bottom, const char *front, const char *back)
 
TextureMakeRenderTexture (int width, int height)
 
TextureMakeRenderTextureCube (int size)
 
TextureMakeTexture (const std::string &atlasPath, const std::string &atlasMetadataPath, const std::string &fileName)
 

Static Public Member Functions

static const std::string & ReturnCodeToErrorString (int returnCode)
 

Detailed Description

Handles DLL loading and engine object creation.

Member Function Documentation

◆ LoadDLL()

Error::Enum Aether3D_API::LoadDLL ( const std::string &  path)

Loads the engine DLL. Must be called before doing anything else with the engine.

Parameters
pathDLL path. If extension is omitted, it's automatically added depending on the running platform.
Returns
NO_ERRORS if loading DLL succeeded.
DLL_NOT_FOUND if DLL could not be found or read.
UNSUPPORTED_RENDERER if GPU driver doesn't support requested renderer.
FACTORY_NOT_FOUND if DLL is found but could not be loaded by LoadLibraryA() on Windows or dlopen() on OSX or Linux.

◆ MakeAudio()

Audio * Aether3D_API::MakeAudio ( )
Returns
new Audio. Caller is responsible for freeing the allocated memory.

◆ MakeCamera()

Camera * Aether3D_API::MakeCamera ( )
Returns
new Camera. Caller is responsible for freeing the allocated memory.

◆ MakeKeyboardInput()

KeyboardInput * Aether3D_API::MakeKeyboardInput ( )
Returns
new KeyboardInput. Caller is responsible for freeing the allocated memory.

◆ MakeLight()

Light * Aether3D_API::MakeLight ( Light::Type  lightType)
Parameters
lightTypeLight Type.
Returns
new Light. Caller is responsible for freeing the allocated memory.

◆ MakeMaterial()

Material * Aether3D_API::MakeMaterial ( )
Returns
new Material. Caller is responsible for freeing the allocated memory. Must be called after Renderer::OpenWindow().

◆ MakeModel()

Model * Aether3D_API::MakeModel ( const std::string &  path,
Error::Enum &  outError 
)

Loads a model from .ae3d file. Caller is responsible for freeing the allocated memory. Must be called after Renderer::OpenWindow().

Parameters
pathModel path.
outErrorError.
Returns
Model.

◆ MakeMouseInput()

MouseInput * Aether3D_API::MakeMouseInput ( )
Returns
new MouseInput. Caller is responsible for freeing the allocated memory.

◆ MakeRenderer()

Renderer * Aether3D_API::MakeRenderer ( const std::string &  builtinAssetPath)

Creates a renderer and returns its instance. It's a singleton. Doesn't allocate memory so must not be deleted.

Returns
Instance to Renderer.

◆ MakeRenderTexture()

Texture * Aether3D_API::MakeRenderTexture ( int  width,
int  height 
)

Creates a 2D render texture. Must be called after Renderer::OpenWindow().

Parameters
widthWidth in pixels.
heightHeight in pixels.
Returns
Texture.

◆ MakeRenderTextureCube()

Texture * Aether3D_API::MakeRenderTextureCube ( int  size)

Creates a cube map render texture. Must be called after Renderer::OpenWindow().

Parameters
sizeWidth and height in pixels.
Returns
Texture.

◆ MakeScene()

Scene * Aether3D_API::MakeScene ( )
Returns
new Scene. Caller is responsible for freeing the allocated memory.

◆ MakeTexture() [1/3]

Texture * Aether3D_API::MakeTexture ( const char *  left,
const char *  right,
const char *  top,
const char *  bottom,
const char *  front,
const char *  back 
)

Loads a cube map texture. Formats supported: .png, .jpg, .tga, .bmp etc. Must be called after Renderer::OpenWindow().

Todo:
Document sides also in API-friendly way: "positive z" etc.
Parameters
leftLeft.
rightRight.
topTop.
bottomBottom.
frontFront.
backBack.

◆ MakeTexture() [2/3]

Texture * Aether3D_API::MakeTexture ( const std::string &  atlasPath,
const std::string &  atlasMetadataPath,
const std::string &  fileName 
)

Loads a texture from an atlas. Formats supported: .png, .jpg, .tga, .bmp etc. Must be called after Renderer::OpenWindow().

Parameters
atlasPathTexture path.
atlasMetadataPathMeta data path. Format must be CEGUI/Ogre (eg. Texture Packer exports them).
fileNameName of texture in atlas.
Returns
Texture.

◆ MakeTexture() [3/3]

Texture * Aether3D_API::MakeTexture ( const std::string &  path,
bool  useMipmaps,
bool  sRGB,
Texture::Tiling  tiling,
Texture::Filter  filter 
)

Loads a texture. Formats supported: .png, .jpg, .tga, .bmp, .dds and .pvr depending on platform. Must be called after Renderer::OpenWindow().

Parameters
pathTexture path.
useMipmapsTrue, if mipmaps should be generated.
sRGBTrue, if the texture is sRGB. Normal maps should use false.
tilingTiling.
filterFilter.
Returns
Texture.

◆ ReturnCodeToErrorString()

const std::string & Aether3D_API::ReturnCodeToErrorString ( int  returnCode)
static

Converts return code to an error string.

Parameters
returnCodeInteger representation of Error::Enum.
Returns
Error string.

The documentation for this class was generated from the following files: