Aether3D Game Engine
Classes | 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>

Classes

struct  Impl
 

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 std::string &left, const std::string &right, const std::string &top, const std::string &bottom, const std::string &front, const std::string &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

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.
Audio * Aether3D_API::MakeAudio ( )
Returns
new Audio. Caller is responsible for freeing the allocated memory.
Camera * Aether3D_API::MakeCamera ( )
Returns
new Camera. Caller is responsible for freeing the allocated memory.
KeyboardInput * Aether3D_API::MakeKeyboardInput ( )
Returns
new KeyboardInput. Caller is responsible for freeing the allocated memory.
Light * Aether3D_API::MakeLight ( Light::Type  lightType)
Parameters
lightTypeLight Type.
Returns
new Light. Caller is responsible for freeing the allocated memory.
Material * Aether3D_API::MakeMaterial ( )
Returns
new Material. Caller is responsible for freeing the allocated memory. Must be called after Renderer::OpenWindow().
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.
MouseInput * Aether3D_API::MakeMouseInput ( )
Returns
new MouseInput. Caller is responsible for freeing the allocated memory.
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.
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.
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.
Scene * Aether3D_API::MakeScene ( )
Returns
new Scene. Caller is responsible for freeing the allocated memory.
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.
Texture * Aether3D_API::MakeTexture ( const std::string &  left,
const std::string &  right,
const std::string &  top,
const std::string &  bottom,
const std::string &  front,
const std::string &  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.
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.
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: