Sleeping Wombat Graphic API  1.010
swGraphicAPI
IGraphicAPIInitializer.h
Go to the documentation of this file.
1 #pragma once
2 
11 #include "swGraphicAPI/Resources/SwapChain.h"
12 #include "swCommonLib/Common/TypesDefinitions.h"
13 
14 #include <string>
15 
16 
17 
35 {
36  uint16 WindowWidth;
37  uint16 WindowHeight;
38  WindowHandler WindowHandle;
39  bool FullScreen;
40  uint8 SamplesCount;
41  uint8 SamplesQuality;
42  uint8 NumBuffers;
44  ResourceFormat BackBufferFormat;
45 
46 // ================================ //
47 //
49  {
50  DefaultSettings();
51  }
52 
53  void DefaultSettings()
54  {
55  WindowWidth = 1024;
56  WindowHeight = 768;
57  FullScreen = false;
58  NumBuffers = 1;
59  SamplesCount = 1;
60  SamplesQuality = 0;
61  DepthStencilFormat = DepthStencilFormat::DEPTH_STENCIL_FORMAT_D24_UNORM_S8_UINT;
62  BackBufferFormat = ResourceFormat::RESOURCE_FORMAT_R8G8B8A8_UNORM;
63  }
64 };
65 
70 {
72  bool SingleThreaded;
73  bool UseDebugLayer;
74  bool CreateSwapChain; // You can create SwapChain and main render target later.
75 
76 // ================================ //
77 //
79  {
80  DefaultSettings();
81  }
82 
83  void DefaultSettings()
84  {
85  SingleThreaded = true;
86  UseDebugLayer = false;
87  CreateSwapChain = true;
88  }
89 };
90 
98 {
99 private:
100 protected:
101 public:
102  virtual ~IGraphicAPIInitializer() = default;
103 
104  virtual IRenderer* CreateRenderer ( RendererUsage usage ) = 0;
105  virtual SwapChain* CreateSwapChain ( SwapChainInitData& swapChainData ) = 0;
106  virtual bool InitAPI ( GraphicAPIInitData& initData ) = 0;
107  virtual void ReleaseAPI () = 0;
108  virtual void* GetRenderTargetHandle ( RenderTargetObject* renderTarget ) = 0;
109 
110  // Future
111  // virtual std::wstring GetErrorString() = 0;
112 };
DepthStencilFormat
Typy dostępne dla bufora głębokości.
Definition: GraphicAPIConstants.h:141
Interfejs klasy do inicjowania API graficznego.
Definition: IGraphicAPIInitializer.h:97
ResourceFormat
Specyfikuje format tekstury bądź innego zasobu.
Definition: GraphicAPIConstants.h:153
Klasa interfejsu renderera.
Definition: IRenderer.h:29
RendererUsage
Sposób użycia renderera.
Definition: IRenderer.h:18
Klasa dla render targetów.Klasa umożliwia pobranie jednej z tekstur składowych i udostępnienie dla sh...
Definition: MeshResources.h:301
Przechowuje informacje potrzebne do SwapChaina. Parametr dla funkcji IGraphicAPIInitializer::CreateSw...
Definition: IGraphicAPIInitializer.h:34
Przechowuje informacje potrzebne do inicjalizacji API graficznego. Parametr dla funkcji IGraphicAPIIn...
Definition: IGraphicAPIInitializer.h:69
Definition: SwapChain.h:33