Creating a default device
{
if (!device) {
}
...
}
static class IGraphicsDevice * createDevice(RenderingAllocatorInfo *allocatorInfo=nullptr)
Creates a graphics device.
Definition: Factory.cpp:46
Creating a device of a specific type
Since the rendering abstraction library might be built with support for multiple graphics device types it might be necessary to specify the desired type.
Valid types are:
- OpenGL20
- OpenGLES30
- Direct3D11
{
if (!device) {
}
...
}
@ OpenGL20
Graphics device using OpenGL, supporting at least OpenGL 2.0.
Initializing the graphics device
When you have created a valid graphics device it can be initialized in the current application context.
Initializing a graphics device on Windows systems:
{
...
if (!device->initialize(hWnd)) {
}
...
}