XLE
v0.02.0
|
Main interface for controlling rendering behaviour. More...
Namespaces | |
Metal | |
Low level interface for rendering. | |
Metal_DX11 | |
This is the implementation of RenderCore::Metal for DX11 platforms. | |
ShaderStage | |
Container for ShaderStage::Enum. | |
Classes | |
class | CompiledShaderByteCode |
Represents a chunk of compiled shader code More... | |
class | Device |
class | DeviceDX11 |
class | IDevice |
Represents a hardware device capable of rendering More... | |
class | IDeviceDX11 |
IDevice extension for DX11 More... | |
class | IPresentationChain |
Represents a set of back buffer for rendering to a window More... | |
class | IThreadContext |
Represents the context state of a particular thread while rendering More... | |
class | IThreadContextDX11 |
IThreadContext extension for DX11 More... | |
class | PresentationChain |
class | ResourceList |
Used by the Metal interface to set many objects at once More... | |
class | ResourceList< Type, 0 > |
class | ShaderService |
class | SharedPkt |
A reference counted packet for small allocations More... | |
class | ThreadContext |
class | ThreadContextDX11 |
class | ThreadContextStateDesc |
class | ViewportContext |
Typedefs | |
typedef IDeviceDX11 | Base_DeviceDX11 |
typedef IThreadContext | FLEX_MAKE_BASE_NAME(ThreadContext) |
typedef IThreadContextDX11 | Base_ThreadContextDX11 |
typedef IPresentationChain | Base_PresentationChain |
typedef IDevice | Base_Device |
Functions | |
intrusive_ptr< IDXGI::Adapter > | SelectAdapter () |
template<typename DestinationType , typename SourceType > | |
intrusive_ptr< DestinationType > | GetParent (intrusive_ptr< SourceType > child) |
ID3D::Device * | GetDefaultUnderlyingDevice () |
render_dll_export std::shared_ptr< IDevice > | CreateDevice () |
SharedPkt | MakeSharedPktSize (size_t size) |
SharedPkt | MakeSharedPkt (const void *begin, const void *end) |
template<typename T > | |
SharedPkt | MakeSharedPkt (const T &input) |
unsigned | ARGBtoABGR (unsigned input) |
template<typename Type > | |
ResourceList< Type, 1 > | MakeResourceList (const Type &zero) |
Constructs a new ResourceList object More... | |
template<typename Type > | |
ResourceList< Type, 2 > | MakeResourceList (const Type &zero, const Type &one) |
template<typename Type > | |
ResourceList< Type, 3 > | MakeResourceList (const Type &zero, const Type &one, const Type &two) |
template<typename Type > | |
ResourceList< Type, 4 > | MakeResourceList (const Type &zero, const Type &one, const Type &two, const Type &three) |
template<typename Type > | |
ResourceList< Type, 5 > | MakeResourceList (const Type &zero, const Type &one, const Type &two, const Type &three, const Type &four) |
template<typename Type > | |
ResourceList< Type, 6 > | MakeResourceList (const Type &zero, const Type &one, const Type &two, const Type &three, const Type &four, const Type &five) |
template<typename Type > | |
ResourceList< Type, 7 > | MakeResourceList (const Type &zero, const Type &one, const Type &two, const Type &three, const Type &four, const Type &five, const Type &six) |
template<typename Type > | |
ResourceList< Type, 8 > | MakeResourceList (const Type &zero, const Type &one, const Type &two, const Type &three, const Type &four, const Type &five, const Type &six, const Type &seven) |
template<typename Type > | |
ResourceList< Type, 1 > | MakeResourceList (unsigned offset, const Type &zero) |
template<typename Type > | |
ResourceList< Type, 2 > | MakeResourceList (unsigned offset, const Type &zero, const Type &one) |
template<typename Type > | |
ResourceList< Type, 3 > | MakeResourceList (unsigned offset, const Type &zero, const Type &one, const Type &two) |
template<typename Type > | |
ResourceList< Type, 4 > | MakeResourceList (unsigned offset, const Type &zero, const Type &one, const Type &two, const Type &three) |
template<typename Type > | |
ResourceList< Type, 5 > | MakeResourceList (unsigned offset, const Type &zero, const Type &one, const Type &two, const Type &three, const Type &four) |
template<typename Type > | |
ResourceList< Type, 6 > | MakeResourceList (unsigned offset, const Type &zero, const Type &one, const Type &two, const Type &three, const Type &four, const Type &five) |
template<typename Type > | |
ResourceList< Type, 7 > | MakeResourceList (unsigned offset, const Type &zero, const Type &one, const Type &two, const Type &three, const Type &four, const Type &five, const Type &six) |
template<typename Type > | |
ResourceList< Type, 8 > | MakeResourceList (unsigned offset, const Type &zero, const Type &one, const Type &two, const Type &three, const Type &four, const Type &five, const Type &six, const Type &seven) |
template<typename Type > | |
ResourceList< Type, 9 > | MakeResourceList (unsigned offset, const Type &zero, const Type &one, const Type &two, const Type &three, const Type &four, const Type &five, const Type &six, const Type &seven, const Type &eight) |
Variables | |
char | VersionString [] = "v0.0.0" |
char | BuildDateString [] = "" |
Main interface for controlling rendering behaviour.
RenderCore is used to manage basic rendering behaviour. RenderCore always runs on top of another API, called the "low-level API." Normally this will be DirectX or OpenGL.
Responsibilities for RenderCore include:
Note that there are 2 interfaces to RenderCore. This is because RenderCore is used in 2 very different ways.
In other words, most clients will use interface 1. Only clients that want to create new rendering behaviour will use interface 2.
The advantage is we don't need to centralise all rendering behaviour is a single place. Instead of having 1 library that does all of the rendering, it's better to have many small libraries that each implement only a single rendering feature.
The first interface is the main "RenderCore" interface. This is the non "graphics aware" interface:
This interface can be exported from a DLL. It will insulate clients from the details of the low level API.
RenderCore::IDevice::QueryInterface can be used to access extension interfaces for the device. For example, this might include platform-specific interfaces like RenderCore::IDeviceDX11.
The second interface is RenderCore::Metal. This is the low level interface that can be used to create new rendering behaviour.
RenderCore::Metal is a non-centralised rendering interface. This means that there are many objects to interact with, and each one as a small set of interface functions.
In DirectX7/8/9 era rendering engines often had a giant "device" interface, with behaviour for every aspect of rendering. But RenderCore::Metal attempts to avoid centralising interface methods in a single place.
RenderCore::Metal is mostly a thin layer over the low-level API. The interface for RenderCore::Metal is platform-independent, but the implementation is very platform dependent.
The implementation for RenderCore::Metal is in the following (platform specific) directories:
However, when including headers, don't include from these directories. Instead, include headers from:
These will redirect to the correct platform header. For example, in DirectX mode, RenderCore/Metal/DeviceContext.h will automatically include RenderCore/DX11/Metal/DeviceContext.h.
Likewise, the platform specific implementations are in the following namespaces:
But don't use these namespaces directly. Instead use RenderCore::Metal. This will contain the symbols from whatever platform is currently active.
Good starting places for RenderCore::Metal are:
IDevice example code:
RenderCore::Metal example code:
So, while RenderCore::IDevice can be used by anyone, RenderCore::Metal requires some knowledge of rendering basics.
ResourceList<Type,1> RenderCore::MakeResourceList | ( | const Type & | zero | ) |
Constructs a new ResourceList object