#include <Render.h>
Public Member Functions | |
Render (void) | |
virtual | ~Render (void) |
bool | init (HWND hwnd, int width, int heigth, RenderDesc &desc) |
void | uninit (void) |
void | keepCurrentGeometry (void) |
void | resetCurrentGeometry (void) |
pIGeometry | createGeometry (MeshData &meshData) |
Create geometry (mesh) from MeshData. | |
pITexture | createTexture (TextureData &textureData) |
Create a Texture from TextureData. | |
void | createSkyBox (TextureData &, TextureData &, TextureData &, TextureData &, TextureData &, TextureData &) |
Create a sky box from TextureDatas. | |
pIControl | createControl (pIGeometry geometry, pITexture texture) |
Create GUI Control. | |
pIControl | createButton (pIGeometry geometry, pITexture texture, void callback(pIControl)) |
Create GUI Button. | |
void | freeTexture (pITexture &texture) |
void | freeGeometry (pIGeometry &geometry) |
pInstance | createDrawCall (pITexture texture, pIGeometry geometry, pIBody body) |
Create draw call. | |
pInstance | createColorDrawCall (pIGeometry geometry, pIBody body) |
Create draw call that uses no texture. | |
void | createGuiDrawCall (pIControl control) |
Create GUI draw call. | |
void | clear (void) |
Free all used memory on the GPU. | |
void | update (Camera &camera) |
Draw and update the scene. | |
void | updateScreenSize (int width, int height) |
Updates viewport and GUI matrix conversion. | |
void | toggleGui () |
Enable GUI drawing. | |
bool | guiIsShown () |
Is the GUI drawn? | |
void | setLight (int index, LightData &lightData) |
Set light from LightData. | |
void | setEnableBlending (bool b) |
Enables and disables debug settings. | |
bool | getEnableBlending (void) |
void | setEnableCulling (bool b) |
bool | getEnableCulling (void) |
void | setEnableWireframe (bool b) |
bool | getEnableWireframe (void) |
void | setEnableMipmap (bool b) |
bool | getEnableMipmap () |
void | setEnableLinearTexture (bool b) |
bool | getEnableLinearTexture () |
Protected Member Functions | |
virtual void | initGLEW (void) |
virtual void | reserveDeviceMemory (int width, int height, RenderDesc &desc) |
virtual const float4x4 | getGuiMatrix (int width, int height) |
Definition at line 27 of file Render.h.
Render::Render | ( | void | ) |
Definition at line 6 of file Render.cpp.
Render::~Render | ( | void | ) | [virtual] |
Definition at line 89 of file Render.cpp.
void Render::clear | ( | void | ) | [virtual] |
pIControl Render::createButton | ( | pIGeometry | geometry, | |
pITexture | texture, | |||
void | callbackpIControl | |||
) | [virtual] |
pInstance Render::createColorDrawCall | ( | pIGeometry | geometry, | |
pIBody | body | |||
) | [virtual] |
Create draw call that uses no texture.
Implements IRender.
Definition at line 779 of file Render.cpp.
pIControl Render::createControl | ( | pIGeometry | geometry, | |
pITexture | texture | |||
) | [virtual] |
pInstance Render::createDrawCall | ( | pITexture | texture, | |
pIGeometry | geometry, | |||
pIBody | body | |||
) | [virtual] |
pIGeometry Render::createGeometry | ( | MeshData & | meshData | ) | [virtual] |
Create geometry (mesh) from MeshData.
Implements IRender.
Definition at line 622 of file Render.cpp.
void Render::createGuiDrawCall | ( | pIControl | control | ) | [virtual] |
void Render::createSkyBox | ( | TextureData & | top, | |
TextureData & | bottom, | |||
TextureData & | left, | |||
TextureData & | right, | |||
TextureData & | front, | |||
TextureData & | back | |||
) | [virtual] |
pITexture Render::createTexture | ( | TextureData & | textureData | ) | [virtual] |
void Render::freeGeometry | ( | pIGeometry & | ) | [virtual] |
Free geometry. Note that this does not free the geometry on the GPU. Use virtual void clear(void) to free all the memory used on the GPU.
Implements IRender.
Definition at line 759 of file Render.cpp.
void Render::freeTexture | ( | pITexture & | ) | [virtual] |
Free texture. Note that this does not free the texture on the GPU. Use virtual void clear(void) to free all the memory used on the GPU.
Implements IRender.
Definition at line 750 of file Render.cpp.
bool Render::getEnableBlending | ( | void | ) | [inline, virtual] |
bool Render::getEnableCulling | ( | void | ) | [inline, virtual] |
bool Render::getEnableLinearTexture | ( | ) | [inline, virtual] |
bool Render::getEnableMipmap | ( | ) | [inline, virtual] |
bool Render::getEnableWireframe | ( | void | ) | [inline, virtual] |
const float4x4 Render::getGuiMatrix | ( | int | width, | |
int | height | |||
) | [protected, virtual] |
Definition at line 293 of file Render.cpp.
bool Render::guiIsShown | ( | ) | [inline, virtual] |
bool Render::init | ( | HWND | hwnd, | |
int | width, | |||
int | height, | |||
RenderDesc & | desc | |||
) | [virtual] |
Initialize the render module. This method must be called before using any other method of this class. It initializes the graphic context an reserves memory on the CPU and GPU.
Implements IRender.
Definition at line 94 of file Render.cpp.
void Render::initGLEW | ( | void | ) | [protected, virtual] |
Definition at line 846 of file Render.cpp.
void Render::keepCurrentGeometry | ( | void | ) | [virtual] |
Implements IRender.
Definition at line 280 of file Render.cpp.
void Render::reserveDeviceMemory | ( | int | width, | |
int | height, | |||
RenderDesc & | desc | |||
) | [protected, virtual] |
Definition at line 321 of file Render.cpp.
void Render::resetCurrentGeometry | ( | void | ) | [virtual] |
Implements IRender.
Definition at line 288 of file Render.cpp.
void Render::setEnableBlending | ( | bool | b | ) | [inline, virtual] |
void Render::setEnableCulling | ( | bool | b | ) | [inline, virtual] |
void Render::setEnableLinearTexture | ( | bool | b | ) | [virtual] |
Implements IRender.
Definition at line 874 of file Render.cpp.
void Render::setEnableMipmap | ( | bool | b | ) | [virtual] |
Implements IRender.
Definition at line 861 of file Render.cpp.
void Render::setEnableWireframe | ( | bool | b | ) | [inline, virtual] |
void Render::setLight | ( | int | index, | |
LightData & | lightData | |||
) | [virtual] |
void Render::toggleGui | ( | ) | [virtual] |
void Render::uninit | ( | void | ) | [virtual] |
Uninitialize module. After this method was called no other methods (except virtual void init(HWND, int, int, RenderDesc&)) may be called.
Implements IRender.
Definition at line 823 of file Render.cpp.
void Render::update | ( | Camera & | camera | ) | [virtual] |
void Render::updateScreenSize | ( | int | width, | |
int | height | |||
) | [virtual] |
Updates viewport and GUI matrix conversion.
Implements IRender.
Definition at line 795 of file Render.cpp.
float4 Render::lightColorArray[MAX_ACTIVE_LIGHTS] |
float4 Render::lightPositionArray[MAX_ACTIVE_LIGHTS] |