Cogs.Core
Public Member Functions | Private Attributes | List of all members
Cogs::GraphicsDeviceGLES30 Struct Reference
Inheritance diagram for Cogs::GraphicsDeviceGLES30:
Cogs::IGraphicsDevice

Public Member Functions

 GraphicsDeviceGLES30 (RenderingAllocatorInfo *)
 
bool initialize ()
 Initializes the graphics device with the settings previous set through calling setSettings.
 
std::string getIdentifier () const override
 Get the graphics device identifier.
 
GraphicsDeviceType getType () const override
 Get the type of the graphics device.
 
void setSize (int width, int height) override
 Set the size of the main drawing buffer used by the graphics device in pixels.
 
bool getSize (int &w, int &h) const override
 Retrieve the size previously set by setSize.
 
void beginFrame () override
 Signal the beginning of a new frame to the graphics device.
 
void endFrame (uint32_t syncInterval=0, uint32_t presentFlags=PresentFlags::None) override
 Signal the end of a frame to the graphics device.
 
void releaseResources () override
 Release all resources allocated.
 
IBuffersgetBuffers () override
 Get a pointer to the buffer management interface.
 
ITexturesgetTextures () override
 Get a pointer to the texture management interface.
 
IContextgetImmediateContext () override
 Get a pointer to the immediate context used to issue commands to the graphics device.
 
IEffectsgetEffects () override
 Get a pointer to the effect management interface.
 
IPipelineStatesgetPipelineStates () override
 Get a pointer to the pipeline state management interface.
 
IRenderTargetsgetRenderTargets () override
 Get a pointer to the render target management interface.
 
ICapabilitiesgetCapabilities () override
 Get a pointer to the capability management interface used to query the graphics device capability flags.
 
ISyncObjectsgetSyncObjects () override
 Get a pointer to the sync object management interface.
 
ISwapChaingetDefaultSwapChain () override
 Get a pointer to the default swap chain for this graphics device.
 
void waitForCommandSync () override
 Wait for any GPU commands on the current device to finish before returning.
 
void * getNativeDevice () override
 
ResourceStatistics getResourceStatistics () override
 
- Public Member Functions inherited from Cogs::IGraphicsDevice
virtual ~IGraphicsDevice ()=default
 Destructor.
 
virtual bool initializeThread ()
 Initialize the graphics device for operation on the current thread.
 
virtual SharedGraphicsContextcreateSharedContext ()
 Create a shared graphics context that can be used to activate another thread for rendering.
 
virtual void activateSharedContext (SharedGraphicsContext *)
 Activates the given shared context on the calling thread.
 
virtual void releaseSharedContext (SharedGraphicsContext *)
 Releases the given shared context.
 
virtual bool initialize ()=0
 Initializes the graphics device with the settings previous set through calling setSettings.
 
virtual bool isInitializationFinished ()
 Check if async initialization is finished.
 
virtual ResourceStatistics getResourceStatistics ()
 
virtual std::string getIdentifier () const
 Get the graphics device identifier.
 
virtual GraphicsDeviceType getType () const
 Get the type of the graphics device.
 
virtual void setSize (int width, int height)=0
 Set the size of the main drawing buffer used by the graphics device in pixels.
 
virtual bool getSize (int &width, int &height) const =0
 Retrieve the size previously set by setSize.
 
virtual void beginFrame ()=0
 Signal the beginning of a new frame to the graphics device.
 
virtual void endFrame (uint32_t syncInterval=0, uint32_t presentFlags=PresentFlags::None)=0
 Signal the end of a frame to the graphics device.
 
virtual void waitForCommandSync ()
 Wait for any GPU commands on the current device to finish before returning.
 
virtual void releaseResources ()=0
 Release all resources allocated.
 
virtual ISwapChaincreateSwapChain (struct WindowData *)
 Create a new swap chain for the specified window.
 
virtual void deleteSwapChain (ISwapChain *)
 Deletes the specified swap chain.
 
virtual IContextgetImmediateContext ()=0
 Get a pointer to the immediate context used to issue commands to the graphics device.
 
virtual IBuffersgetBuffers ()=0
 Get a pointer to the buffer management interface.
 
virtual ITexturesgetTextures ()=0
 Get a pointer to the texture management interface.
 
virtual IRenderTargetsgetRenderTargets ()=0
 Get a pointer to the render target management interface.
 
virtual IEffectsgetEffects ()=0
 Get a pointer to the effect management interface.
 
virtual IPipelineStatesgetPipelineStates ()=0
 Get a pointer to the pipeline state management interface.
 
virtual ICapabilitiesgetCapabilities ()=0
 Get a pointer to the capability management interface used to query the graphics device capability flags.
 
virtual ISwapChaingetDefaultSwapChain ()=0
 Get a pointer to the default swap chain for this graphics device.
 
virtual ISyncObjectsgetSyncObjects ()=0
 Get a pointer to the sync object management interface.
 
virtual void * getNativeDevice ()
 
virtual bool setSettings (const GraphicsDeviceSettings &newSettings)
 Updates the settings associated with this device.
 
const GraphicsDeviceSettingsgetSettings () const
 

Private Attributes

ContextGLES30 context
 
BuffersGLES30 buffers
 
TexturesGLES30 textures
 
EffectsGLES30 effects
 
RenderTargetsGLES30 renderTargets
 
CapabilitiesGLES30 capabilities
 
GLSyncObjects syncObjects
 
GLContext glContext
 
int width = 1
 
int height = 1
 

Additional Inherited Members

- Static Public Member Functions inherited from Cogs::IGraphicsDevice
static void fillGraphicsSettings (struct WindowData *windowData, int requestedSampleCount)
 Set platform specific graphics settings used for window creation e.g.: XVisualInfo on Linux.
 
- Protected Attributes inherited from Cogs::IGraphicsDevice
GraphicsDeviceSettings settings
 
std::vector< ISwapChain * > swapChains
 

Detailed Description

Definition at line 19 of file GraphicsDeviceGLES30.h.

Constructor & Destructor Documentation

◆ GraphicsDeviceGLES30()

Cogs::GraphicsDeviceGLES30::GraphicsDeviceGLES30 ( RenderingAllocatorInfo )

Definition at line 13 of file GraphicsDeviceGLES30.cpp.

◆ ~GraphicsDeviceGLES30()

Cogs::GraphicsDeviceGLES30::~GraphicsDeviceGLES30 ( )

Definition at line 17 of file GraphicsDeviceGLES30.cpp.

Member Function Documentation

◆ beginFrame()

void Cogs::GraphicsDeviceGLES30::beginFrame ( )
overridevirtual

Signal the beginning of a new frame to the graphics device.

Implements Cogs::IGraphicsDevice.

Definition at line 83 of file GraphicsDeviceGLES30.cpp.

◆ endFrame()

void Cogs::GraphicsDeviceGLES30::endFrame ( uint32_t  syncInterval = 0,
uint32_t  presentFlags = PresentFlags::None 
)
overridevirtual

Signal the end of a frame to the graphics device.

When the graphics device itself is responsible for managing the device context (e.g in D3D11), and the PresentFlags::NoSwap flag is not set, this will swap the back buffer to make the result of previous drawing visible.

Parameters
syncIntervalSynchronization interval.
  • 0 - No synchronization, presentation occurs immediately.
  • 1 - Synchronize presentation after 1 vertical blank.
presentFlagsA combination of PresentFlags controlling the presentation of the rendered frame.
See also
PresentFlags

Implements Cogs::IGraphicsDevice.

Definition at line 92 of file GraphicsDeviceGLES30.cpp.

◆ getBuffers()

IBuffers * Cogs::GraphicsDeviceGLES30::getBuffers ( )
inlineoverridevirtual

Get a pointer to the buffer management interface.

Returns
A pointer to the buffer management interface.

Implements Cogs::IGraphicsDevice.

Definition at line 36 of file GraphicsDeviceGLES30.h.

◆ getCapabilities()

ICapabilities * Cogs::GraphicsDeviceGLES30::getCapabilities ( )
inlineoverridevirtual

Get a pointer to the capability management interface used to query the graphics device capability flags.

Returns
A pointer to the capability management interface.

Implements Cogs::IGraphicsDevice.

Definition at line 42 of file GraphicsDeviceGLES30.h.

◆ getDefaultSwapChain()

ISwapChain * Cogs::GraphicsDeviceGLES30::getDefaultSwapChain ( )
inlineoverridevirtual

Get a pointer to the default swap chain for this graphics device.

Returns
A pointer to the default swap chain.

Implements Cogs::IGraphicsDevice.

Definition at line 44 of file GraphicsDeviceGLES30.h.

◆ getEffects()

IEffects * Cogs::GraphicsDeviceGLES30::getEffects ( )
inlineoverridevirtual

Get a pointer to the effect management interface.

Returns
A pointer to the effect management interface.

Implements Cogs::IGraphicsDevice.

Definition at line 39 of file GraphicsDeviceGLES30.h.

◆ getIdentifier()

std::string Cogs::GraphicsDeviceGLES30::getIdentifier ( ) const
inlineoverridevirtual

Get the graphics device identifier.

Returns
A string containing the name of the currently initialized graphics device.

Reimplemented from Cogs::IGraphicsDevice.

Definition at line 26 of file GraphicsDeviceGLES30.h.

◆ getImmediateContext()

IContext * Cogs::GraphicsDeviceGLES30::getImmediateContext ( )
inlineoverridevirtual

Get a pointer to the immediate context used to issue commands to the graphics device.

Returns
A pointer to the context interface.

Implements Cogs::IGraphicsDevice.

Definition at line 38 of file GraphicsDeviceGLES30.h.

◆ getNativeDevice()

void * Cogs::GraphicsDeviceGLES30::getNativeDevice ( )
inlineoverridevirtual

Reimplemented from Cogs::IGraphicsDevice.

Definition at line 48 of file GraphicsDeviceGLES30.h.

◆ getPipelineStates()

IPipelineStates * Cogs::GraphicsDeviceGLES30::getPipelineStates ( )
inlineoverridevirtual

Get a pointer to the pipeline state management interface.

Returns
A pointer to the pipeline state management interface.

Implements Cogs::IGraphicsDevice.

Definition at line 40 of file GraphicsDeviceGLES30.h.

◆ getRenderTargets()

IRenderTargets * Cogs::GraphicsDeviceGLES30::getRenderTargets ( )
inlineoverridevirtual

Get a pointer to the render target management interface.

Returns
A pointer to the render target management interface.

Implements Cogs::IGraphicsDevice.

Definition at line 41 of file GraphicsDeviceGLES30.h.

◆ getResourceStatistics()

Cogs::ResourceStatistics Cogs::GraphicsDeviceGLES30::getResourceStatistics ( )
overridevirtual

Reimplemented from Cogs::IGraphicsDevice.

Definition at line 106 of file GraphicsDeviceGLES30.cpp.

◆ getSize()

bool Cogs::GraphicsDeviceGLES30::getSize ( int &  width,
int &  height 
) const
inlineoverridevirtual

Retrieve the size previously set by setSize.

Implements Cogs::IGraphicsDevice.

Definition at line 30 of file GraphicsDeviceGLES30.h.

◆ getSyncObjects()

ISyncObjects * Cogs::GraphicsDeviceGLES30::getSyncObjects ( )
inlineoverridevirtual

Get a pointer to the sync object management interface.

Returns
A pointer to the sync object management interface.

Implements Cogs::IGraphicsDevice.

Definition at line 43 of file GraphicsDeviceGLES30.h.

◆ getTextures()

ITextures * Cogs::GraphicsDeviceGLES30::getTextures ( )
inlineoverridevirtual

Get a pointer to the texture management interface.

Returns
A pointer to the texture management interface.

Implements Cogs::IGraphicsDevice.

Definition at line 37 of file GraphicsDeviceGLES30.h.

◆ getType()

GraphicsDeviceType Cogs::GraphicsDeviceGLES30::getType ( ) const
inlineoverridevirtual

Get the type of the graphics device.

Returns
The identifier of the graphics device.

Reimplemented from Cogs::IGraphicsDevice.

Definition at line 27 of file GraphicsDeviceGLES30.h.

References Cogs::OpenGLES30.

◆ initialize()

bool Cogs::GraphicsDeviceGLES30::initialize ( )
virtual

Initializes the graphics device with the settings previous set through calling setSettings.

Implements Cogs::IGraphicsDevice.

Definition at line 25 of file GraphicsDeviceGLES30.cpp.

References Cogs::EnableDiagnostics, and Cogs::UseOpenGLClipControl.

◆ releaseResources()

void Cogs::GraphicsDeviceGLES30::releaseResources ( )
overridevirtual

Release all resources allocated.

Implements Cogs::IGraphicsDevice.

Definition at line 98 of file GraphicsDeviceGLES30.cpp.

◆ setSize()

void Cogs::GraphicsDeviceGLES30::setSize ( int  width,
int  height 
)
overridevirtual

Set the size of the main drawing buffer used by the graphics device in pixels.

Parameters
widthWidth of the drawing buffer in pixels.
heightHeight of the drawing buffer in pixels.

Implements Cogs::IGraphicsDevice.

Definition at line 71 of file GraphicsDeviceGLES30.cpp.

◆ waitForCommandSync()

void Cogs::GraphicsDeviceGLES30::waitForCommandSync ( )
inlineoverridevirtual

Wait for any GPU commands on the current device to finish before returning.

After this command returns, any commands issued to the graphics device should be finished, and results from these ready to use.

Reimplemented from Cogs::IGraphicsDevice.

Definition at line 46 of file GraphicsDeviceGLES30.h.

Member Data Documentation

◆ buffers

BuffersGLES30 Cogs::GraphicsDeviceGLES30::buffers
private

Definition at line 54 of file GraphicsDeviceGLES30.h.

◆ capabilities

CapabilitiesGLES30 Cogs::GraphicsDeviceGLES30::capabilities
private

Definition at line 58 of file GraphicsDeviceGLES30.h.

◆ context

ContextGLES30 Cogs::GraphicsDeviceGLES30::context
private

Definition at line 53 of file GraphicsDeviceGLES30.h.

◆ effects

EffectsGLES30 Cogs::GraphicsDeviceGLES30::effects
private

Definition at line 56 of file GraphicsDeviceGLES30.h.

◆ glContext

GLContext Cogs::GraphicsDeviceGLES30::glContext
private

Definition at line 60 of file GraphicsDeviceGLES30.h.

◆ height

int Cogs::GraphicsDeviceGLES30::height = 1
private

Definition at line 62 of file GraphicsDeviceGLES30.h.

◆ renderTargets

RenderTargetsGLES30 Cogs::GraphicsDeviceGLES30::renderTargets
private

Definition at line 57 of file GraphicsDeviceGLES30.h.

◆ syncObjects

GLSyncObjects Cogs::GraphicsDeviceGLES30::syncObjects
private

Definition at line 59 of file GraphicsDeviceGLES30.h.

◆ textures

TexturesGLES30 Cogs::GraphicsDeviceGLES30::textures
private

Definition at line 55 of file GraphicsDeviceGLES30.h.

◆ width

int Cogs::GraphicsDeviceGLES30::width = 1
private

Definition at line 61 of file GraphicsDeviceGLES30.h.


The documentation for this struct was generated from the following files: