PixelLightAPI
.
|
#include <RendererContext.h>
Public Member Functions | |
PLRENDERER_API | ~RendererContext () |
Destructor. | |
Renderer & | GetRenderer () const |
Returns the used renderer. | |
PLRENDERER_API TextureManager & | GetTextureManager () |
Returns the texture manager of this renderer context. | |
PLRENDERER_API EffectManager & | GetEffectManager () |
Returns the effect manager of this renderer context. | |
PLRENDERER_API MaterialManager & | GetMaterialManager () |
Returns the material manager of this renderer context. | |
PLRENDERER_API void | Update () |
Updates the render context. | |
Static Public Member Functions | |
static PLRENDERER_API RendererContext * | CreateInstance (const PLCore::String &sBackend, PLCore::handle nNativeWindowHandle, Renderer::EMode nMode=Renderer::ModeBoth, PLCore::uint32 nZBufferBits=24, PLCore::uint32 nStencilBits=8, PLCore::uint32 nMultisampleAntialiasingSamples=0, const PLCore::String &sDefaultShaderLanguage="") |
Creates a renderer context instance. | |
Public Attributes | |
PLCore::Event | EventUpdate |
Renderer context.
Please note that the renderer context is by design window independent, it doesn't even know anything about one or multiple windows (renderer targets). The renderer instance is connected with the renderer context. So, the renderer doesn't depend on an OS window as well, but the internal renderer implementation may need an OS window. If you have an OS main window which is valid as long as the renderer context instance exists, it's highly recommended to tell the renderer context of this main window during creation, else the internal renderer may create it's own invisible dummy window. Most times, there's no problem with an invisible dummy window holding a renderer implementation together. Sadly, there are e.g. some OpenGL ES 2.0 implementations which just fail when using multiple windows (the internal invisible dummy window and the real visible one => two windows).
In a nutshell:
PLRENDERER_API PLRenderer::RendererContext::~RendererContext | ( | ) |
Destructor.
static PLRENDERER_API RendererContext* PLRenderer::RendererContext::CreateInstance | ( | const PLCore::String & | sBackend, |
PLCore::handle | nNativeWindowHandle, | ||
Renderer::EMode | nMode = Renderer::ModeBoth , |
||
PLCore::uint32 | nZBufferBits = 24 , |
||
PLCore::uint32 | nStencilBits = 8 , |
||
PLCore::uint32 | nMultisampleAntialiasingSamples = 0 , |
||
const PLCore::String & | sDefaultShaderLanguage = "" |
||
) | [static] |
Creates a renderer context instance.
[in] | sBackend | Name of the renderer backend to use (for example 'PLRendererOpenGL::Renderer') |
[in] | nNativeWindowHandle | Handle of a native OS window which is valid as long as the renderer instance exists, "NULL_HANDLE" if there's no such window (see class remarks for more information) |
[in] | nMode | Mode hint the renderer should run in, the renderer is not enforced to use this requested mode |
[in] | nZBufferBits | Z buffer bits (just a hint, for example 24) |
[in] | nStencilBits | Stencil buffer bits (just a hint, for example 8) |
[in] | nMultisampleAntialiasingSamples | Multisample antialiasing samples per pixel, <=1 means no antialiasing (just a hint) |
[in] | sDefaultShaderLanguage | The name of the default shader language of the renderer (for example "GLSL" or "Cg"), if the string is empty, the default is chosen by the renderer implementation, this information is just a hint |
Renderer & PLRenderer::RendererContext::GetRenderer | ( | ) | const [inline] |
Returns the used renderer.
PLRENDERER_API TextureManager& PLRenderer::RendererContext::GetTextureManager | ( | ) |
Returns the texture manager of this renderer context.
PLRENDERER_API EffectManager& PLRenderer::RendererContext::GetEffectManager | ( | ) |
Returns the effect manager of this renderer context.
PLRENDERER_API MaterialManager& PLRenderer::RendererContext::GetMaterialManager | ( | ) |
Returns the material manager of this renderer context.
PLRENDERER_API void PLRenderer::RendererContext::Update | ( | ) |
Updates the render context.
Update event
|