15 struct IPipelineStates;
16 struct IRenderTargets;
19 struct ResourceStatistics;
163 struct SharedGraphicsContext;
242 virtual void setSize(
int width,
int height) = 0;
247 virtual bool getSize(
int& width,
int& height)
const = 0;
Represents a graphics device used to manage graphics resources and issue drawing commands.
Definition: IGraphicsDevice.h:169
virtual IEffects * getEffects()=0
Get a pointer to the effect management interface.
virtual ISyncObjects * getSyncObjects()=0
Get a pointer to the sync object management interface.
virtual void releaseSharedContext(SharedGraphicsContext *)
Releases the given shared context.
Definition: IGraphicsDevice.h:208
virtual ITextures * getTextures()=0
Get a pointer to the texture management interface.
virtual void waitForCommandSync()
Wait for any GPU commands on the current device to finish before returning.
Definition: IGraphicsDevice.h:271
virtual void endFrame(uint32_t syncInterval=0, uint32_t presentFlags=PresentFlags::None)=0
Signal the end of a frame to the graphics device.
virtual ~IGraphicsDevice()=default
Destructor.
virtual ResourceStatistics getResourceStatistics()
Definition: IGraphicsDevice.cpp:11
virtual void deleteSwapChain(ISwapChain *)
Deletes the specified swap chain.
Definition: IGraphicsDevice.h:288
std::vector< ISwapChain * > swapChains
Definition: IGraphicsDevice.h:374
virtual bool setSettings(const GraphicsDeviceSettings &newSettings)
Updates the settings associated with this device.
Definition: IGraphicsDevice.h:362
virtual ISwapChain * createSwapChain(struct WindowData *)
Create a new swap chain for the specified window.
Definition: IGraphicsDevice.h:283
virtual void * getNativeDevice()
Definition: IGraphicsDevice.h:353
virtual ICapabilities * getCapabilities()=0
Get a pointer to the capability management interface used to query the graphics device capability fla...
virtual IContext * getImmediateContext()=0
Get a pointer to the immediate context used to issue commands to the graphics device.
virtual void releaseResources()=0
Release all resources allocated.
virtual void beginFrame()=0
Signal the beginning of a new frame to the graphics device.
virtual void activateSharedContext(SharedGraphicsContext *)
Activates the given shared context on the calling thread.
Definition: IGraphicsDevice.h:201
virtual bool isInitializationFinished()
Check if async initialization is finished.
Definition: IGraphicsDevice.h:218
static void fillGraphicsSettings(struct WindowData *windowData, int requestedSampleCount)
Set platform specific graphics settings used for window creation e.g.: XVisualInfo on Linux.
Definition: IGraphicsDevice.cpp:17
virtual IBuffers * getBuffers()=0
Get a pointer to the buffer management interface.
GraphicsDeviceSettings settings
Definition: IGraphicsDevice.h:373
virtual std::string getIdentifier() const
Get the graphics device identifier.
Definition: IGraphicsDevice.h:227
virtual bool initialize()=0
Initializes the graphics device with the settings previous set through calling setSettings.
virtual GraphicsDeviceType getType() const
Get the type of the graphics device.
Definition: IGraphicsDevice.h:234
virtual bool getSize(int &width, int &height) const =0
Retrieve the size previously set by setSize.
virtual void setSize(int width, int height)=0
Set the size of the main drawing buffer used by the graphics device in pixels.
virtual SharedGraphicsContext * createSharedContext()
Create a shared graphics context that can be used to activate another thread for rendering.
Definition: IGraphicsDevice.h:192
virtual IRenderTargets * getRenderTargets()=0
Get a pointer to the render target management interface.
virtual ISwapChain * getDefaultSwapChain()=0
Get a pointer to the default swap chain for this graphics device.
const GraphicsDeviceSettings & getSettings() const
Definition: IGraphicsDevice.h:364
virtual IPipelineStates * getPipelineStates()=0
Get a pointer to the pipeline state management interface.
virtual bool initializeThread()
Initialize the graphics device for operation on the current thread.
Definition: IGraphicsDevice.h:177
Definition: ISwapChain.h:10
GraphicsDeviceType
Contains types of graphics devices that may be supported.
Definition: Base.h:48
@ Unknown
Unknown type of graphics device.
GraphicsDeviceFlags
Flags controlling the behavior of a graphics device.
Definition: IGraphicsDevice.h:28
@ ForceSoftwareRendering
Force software rendering.
Definition: IGraphicsDevice.h:62
@ UseESCompatibility
Instead of creating an ES2 context via WGL, create a full GL context and check for ARB_ES2_compatibil...
Definition: IGraphicsDevice.h:70
@ DumpShaderContents
Dump shader contents for debugging.
Definition: IGraphicsDevice.h:58
@ None
Default flags.
Definition: IGraphicsDevice.h:30
@ EnableDiagnostics
If available, the device will print diagnostic information to the log.
Definition: IGraphicsDevice.h:44
@ EnableShaderCache
Enables using a shader cache to avoid recompiling previously seen shaders.
Definition: IGraphicsDevice.h:48
@ UseOpenGLClipControl
For OpenGL / OpenGLES backends.
Definition: IGraphicsDevice.h:80
@ Debug
If available, the device will operate in debug mode, performing additional validation of input data,...
Definition: IGraphicsDevice.h:37
@ EnableTraceLogging
Enables trace logging.
Definition: IGraphicsDevice.h:54
@ UseSwapEffectDiscard
Under DX11 the default swap effect is FLIP_DISCARD, however there are some systems where this does no...
Definition: IGraphicsDevice.h:75
@ UseSharedSurface
Use shared surface for D3D9 interop.
Definition: IGraphicsDevice.h:66
Format
Definition: DataFormat.h:22
Settings for graphics device initialization.
Definition: IGraphicsDevice.h:89
int featureLevelMajor
Major feature level.
Definition: IGraphicsDevice.h:100
TextureFormat depthFormat
Depth buffer format.
Definition: IGraphicsDevice.h:121
int numSamples
Number of samples to use for back buffer MSAA.
Definition: IGraphicsDevice.h:126
void ** sharedSurface
Pointer to storage for a pointer to a shared surface.
Definition: IGraphicsDevice.h:156
struct WindowData * windowData
Native window handle used to initialize the graphics device.
Definition: IGraphicsDevice.h:144
int featureLevelMinor
Minor feature level.
Definition: IGraphicsDevice.h:111
int flags
Flags controlling the behavior of the graphics device.
Definition: IGraphicsDevice.h:133
IIOHandler * ioHandler
Optional pointer to an IO handler.
Definition: IGraphicsDevice.h:159
TextureFormat colorFormat
Back buffer format.
Definition: IGraphicsDevice.h:116
Provides buffer management functionality.
Definition: IBuffers.h:13
Provides capability query functionality.
Definition: ICapabilities.h:141
Represents a graphics device context which can receive rendering commands.
Definition: IContext.h:43
Provides effects and shader management functionality.
Definition: IEffects.h:148
I/O handler.
Definition: IEffects.h:106
Definition: IPipelineStates.h:8
Provides render target management functionality.
Definition: IRenderTargets.h:59
Provides sync object management.
Definition: ISyncObjects.h:14
Provides texture management functionality.
Definition: ITextures.h:40
@ None
No flags.
Definition: Common.h:177
Definition: Statistics.h:14