Base::RenderDeviceBase Class Reference
#include <renderdevicebase.h>
Detailed Description
The central rendering object of the Nebula3 core graphics system. This is basically an encapsulation of the Direct3D device. The render device will presents its backbuffer to the display managed by the CoreGraphics::DisplayDevice singleton.(C) 2006 Radon Labs GmbH
Public Member Functions | |
RenderDeviceBase () | |
constructor | |
virtual | ~RenderDeviceBase () |
destructor | |
bool | Open () |
open the device | |
void | Close () |
close the device | |
bool | IsOpen () const |
return true if currently open | |
void | AttachEventHandler (const Ptr< CoreGraphics::RenderEventHandler > &h) |
attach a render event handler | |
void | RemoveEventHandler (const Ptr< CoreGraphics::RenderEventHandler > &h) |
remove a render event handler | |
const Ptr < CoreGraphics::RenderTarget > & | GetDefaultRenderTarget () const |
get default render target | |
bool | BeginFrame () |
begin complete frame | |
void | BeginPass (const Ptr< CoreGraphics::RenderTarget > &rt, const Ptr< CoreGraphics::ShaderInstance > &passShader) |
begin rendering a frame pass | |
void | BeginBatch (CoreGraphics::BatchType::Code batchType, const Ptr< CoreGraphics::ShaderInstance > &batchShader) |
begin rendering a batch inside | |
void | SetVertexBuffer (const Ptr< CoreGraphics::VertexBuffer > &vb) |
set current vertex buffer | |
const Ptr < CoreGraphics::VertexBuffer > & | GetVertexBuffer () const |
get current vertex buffer | |
void | SetIndexBuffer (const Ptr< CoreGraphics::IndexBuffer > &ib) |
set current index buffer | |
const Ptr < CoreGraphics::IndexBuffer > & | GetIndexBuffer () const |
get current index buffer | |
void | SetPrimitiveGroup (const CoreGraphics::PrimitiveGroup &pg) |
set current primitive group | |
const CoreGraphics::PrimitiveGroup & | GetPrimitiveGroup () const |
get current primitive group | |
void | Draw () |
draw current primitives | |
void | EndBatch () |
end current batch | |
void | EndPass () |
end current pass | |
void | EndFrame () |
end current frame | |
bool | IsInBeginFrame () const |
check if inside BeginFrame | |
void | Present () |
present the rendered scene | |
void | SaveScreenshot (CoreGraphics::ImageFileFormat::Code fmt, const Ptr< IO::Stream > &outStream) |
save a screenshot to the provided stream | |
int | GetRefCount () const |
get the current refcount | |
void | AddRef () |
increment refcount by one | |
void | Release () |
decrement refcount and destroy object if refcount is zero | |
bool | IsInstanceOf (const Rtti &rtti) const |
return true if this object is instance of given class | |
bool | IsInstanceOf (const Util::String &className) const |
return true if this object is instance of given class by string | |
bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
return true if this object is instance of given class by fourcc | |
bool | IsA (const Rtti &rtti) const |
return true if this object is instance of given class, or a derived class | |
bool | IsA (const Util::String &rttiName) const |
return true if this object is instance of given class, or a derived class, by string | |
bool | IsA (const Util::FourCC &rttiFourCC) const |
return true if this object is instance of given class, or a derived class, by fourcc | |
const Util::String & | GetClassName () const |
get the class name | |
Util::FourCC | GetClassFourCC () const |
get the class FourCC code | |
Static Public Member Functions | |
static bool | CanCreate () |
test if a compatible render device can be created on this machine | |
static void | DumpRefCountingLeaks () |
dump refcounting leaks, call at end of application (NEBULA3_DEBUG builds only!) | |
Protected Member Functions | |
bool | NotifyEventHandlers (const CoreGraphics::RenderEvent &e) |
notify event handlers about an event |
Member Function Documentation
bool Base::RenderDeviceBase::CanCreate | ( | ) | [static] |
test if a compatible render device can be created on this machine
This static method can be used to check whether a RenderDevice object can be created on this machine before actually instantiating the device object (for instance by checking whether the right Direct3D version is installed). Use this method at application startup to check if the application should run at all.
Reimplemented in Direct3D9::D3D9RenderDevice.
void Base::RenderDeviceBase::AttachEventHandler | ( | const Ptr< CoreGraphics::RenderEventHandler > & | h | ) |
attach a render event handler
Attach an event handler to the render device.
void Base::RenderDeviceBase::RemoveEventHandler | ( | const Ptr< CoreGraphics::RenderEventHandler > & | h | ) |
remove a render event handler
Remove an event handler from the display device.
bool Base::RenderDeviceBase::NotifyEventHandlers | ( | const CoreGraphics::RenderEvent & | e | ) | [protected] |
notify event handlers about an event
Notify all event handlers about an event.
int Core::RefCounted::GetRefCount | ( | ) | const [inline, inherited] |
get the current refcount
Return the current refcount of the object.
void Core::RefCounted::AddRef | ( | ) | [inline, inherited] |
increment refcount by one
Increment the refcount of the object.
void Core::RefCounted::Release | ( | ) | [inline, inherited] |
decrement refcount and destroy object if refcount is zero
Decrement the refcount and destroy object if refcount is zero.
const Util::String & Core::RefCounted::GetClassName | ( | ) | const [inline, inherited] |
get the class name
Get the class name of the object.
Util::FourCC Core::RefCounted::GetClassFourCC | ( | ) | const [inline, inherited] |
get the class FourCC code
Get the class FourCC of the object.
void Core::RefCounted::DumpRefCountingLeaks | ( | ) | [static, inherited] |
dump refcounting leaks, call at end of application (NEBULA3_DEBUG builds only!)
This method should be called as the very last before an application exits.