Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
command_context_manager.h
1 #pragma once
2 
3 #include "util/vector.h"
4 #include "util/queue.h"
5 #include "renderer/d3d12_includes.h"
6 
7 namespace blowbox
8 {
9  class CommandContext;
10 
24  {
25  public:
30 
32  void Startup();
33 
39  CommandContext* RequestContext(D3D12_COMMAND_LIST_TYPE type);
40 
45  void DiscardContext(CommandContext* context);
46  private:
49  };
50 }
Wrapper around D3D12 command lists.
Definition: command_context.h:77
eastl::vector< T > Vector
Typedef for wrapping the EASTL vector.
Definition: vector.h:14
void Startup()
Starts up the CommandContextManager.
Definition: command_context_manager.cc:26
Queue< CommandContext * > available_contexts_[4]
The available pool of contexts. Any context in these arrays is a context that is ready to be re-used...
Definition: command_context_manager.h:48
Vector< CommandContext * > contexts_pool_[4]
The complete pool of contexts. This is 4 different arrays of arrays. Every top level array is an arra...
Definition: command_context_manager.h:47
eastl::queue< T > Queue
Typedef for wrapping the EASTL queue.
Definition: queue.h:14
void DiscardContext(CommandContext *context)
By calling this function, you indicate that the CommandContext is free for re-use again...
Definition: command_context_manager.cc:58
The main Blowbox namespace.
Definition: image.cc:8
CommandContext * RequestContext(D3D12_COMMAND_LIST_TYPE type)
Allows you to request a new CommandContext, which will be initialized and ready for use when it is re...
Definition: command_context_manager.cc:32
Manages the pool of available CommandContexts.
Definition: command_context_manager.h:23
CommandContextManager()
Constructs the CommandContextManager.
Definition: command_context_manager.cc:8
~CommandContextManager()
Destructs the CommandContextManager.
Definition: command_context_manager.cc:14