Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents an interface to a graphics device driver. More...
#include <omGraphicsDevice.h>
Public Member Functions | |
virtual | ~GraphicsDevice () |
Destroy a graphics device, releasing all of its resources and internal state. More... | |
virtual Shared< GraphicsContext > | createContext (const RenderedPixelFormat &pixelFormat, const GraphicsContextFlags &flags)=0 |
Create a new context for this graphics device with the specified framebuffer pixel format and flags. More... | |
virtual Shared< GraphicsContext > | createContext (const RenderedPixelFormat &pixelFormat, const GraphicsContextFlags &flags, const Shared< GraphicsContext > &sharedContext)=0 |
Create a new context with shared resources for this graphics device with the specified framebuffer pixel format and flags. More... | |
virtual Bool | checkFormat (RenderedPixelFormat &pixelFormat, GraphicsContextFlags &flags, Bool strict=false) const =0 |
Return whether or not the specified pixel format and flags are supported by this device. More... | |
virtual GraphicsDeviceType | getType () const =0 |
Return an object that indicates the type of this graphics device. More... | |
A class that represents an interface to a graphics device driver.
Specialized implementations inherit from this interface to provide a way to provide uniform access to their underlying drivers.
|
inlinevirtual |
Destroy a graphics device, releasing all of its resources and internal state.
|
pure virtual |
Create a new context for this graphics device with the specified framebuffer pixel format and flags.
This method chooses a pixel format for the context which most closely matches the specified pixel format and flags. A pointer to the created context is returned. If the returned pointer is NULL, the context creation failed.
Implemented in om::graphics::devices::opengl::OpenGLDevice.
|
pure virtual |
Create a new context with shared resources for this graphics device with the specified framebuffer pixel format and flags.
The new context is able to use resources from the specified shared context. This method chooses a pixel format for the context which most closely matches the specified pixel format and flags. A pointer to the created context is returned. If the returned pointer is NULL, the context creation failed.
Implemented in om::graphics::devices::opengl::OpenGLDevice.
|
pure virtual |
Return whether or not the specified pixel format and flags are supported by this device.
If they are supported as-is, the method returns TRUE indicating that the format is supported by this device.
If the format is not entirely supported but can be approximated (i.e. different bit depth) and the strict flag is not set, the supported format which most closely matches the specified format is written to the output pixel format and flags. TRUE is returned.
Otherwise, if the format cannot be approximated or if the strict flag is set, FALSE is returned indicating that the format is not supported. This means that creating a device context with these settings would fail.
Implemented in om::graphics::devices::opengl::OpenGLDevice.
|
pure virtual |
Return an object that indicates the type of this graphics device.
Implemented in om::graphics::devices::opengl::OpenGLDevice.