Core thread

Description

Core objects and interaction with the core (rendering) thread.

Classes

class  CommandQueueNoSync
 Command queue policy that provides no synchonization. More...
 
class  CommandQueueSync
 Command queue policy that provides synchonization. More...
 
struct  QueuedCommand
 Represents a single queued command in the command list. More...
 
class  CommandQueueBase
 Manages a list of commands that can be queued for later execution on the core thread. More...
 
class  CommandQueue< SyncPolicy >
 Constructor. More...
 
class  CoreObjectManager
 Manager that keeps track of all active CoreObjects. More...
 
class  CoreThread
 Manager for the core thread. More...
 

Typedefs

typedef Flags< CoreThreadQueueFlag > CoreThreadQueueFlags
 

Enumerations

enum  CoreThreadQueueFlag { CTQF_Default = 0, CTQF_InternalQueue = 1 << 0, CTQF_BlockUntilComplete = 1 << 1 }
 Flags that control how is a command submitted to the command queue. More...
 

Functions

BS_CORE_EXPORT CoreThread & gCoreThread ()
 Returns the core thread manager used for dealing with the core thread from external threads. More...
 
BS_CORE_EXPORT void throwIfNotCoreThread ()
 Throws an exception if current thread isn't the core thread. More...
 
BS_CORE_EXPORT void throwIfCoreThread ()
 Throws an exception if current thread is the core thread. More...
 

Enumeration Type Documentation

enum CoreThreadQueueFlag

Flags that control how is a command submitted to the command queue.

Enumerator
CTQF_Default 

Default flag, meaning the commands will be added to the per-thread queue and only begin executing after submit() has been called.

CTQF_InternalQueue 

Specifies that the queued command should be executed on the internal queue.

Internal queue doesn't require a separate CoreThread::submit() call, and the queued command is instead immediately visible to the core thread. The downside is that the queue requires additional synchronization and is slower than the normal queue.

CTQF_BlockUntilComplete 

If true, the method will block until the command finishes executing on the core thread.

Only relevant for the internal queue commands since contents of the normal queue won't be submitted to the core thread until the CoreThread::submit() call.

Function Documentation

BS_CORE_EXPORT CoreThread& bs::gCoreThread ( )

Returns the core thread manager used for dealing with the core thread from external threads.

See also
CoreThread
BS_CORE_EXPORT void bs::throwIfCoreThread ( )

Throws an exception if current thread is the core thread.

BS_CORE_EXPORT void bs::throwIfNotCoreThread ( )

Throws an exception if current thread isn't the core thread.