Sleeping Wombat Graphic API  1.010
swGraphicAPI
ResourcesFactory.h
Go to the documentation of this file.
1 #pragma once
2 
9 #include "swGraphicAPI/Resources/RasterizerState.h"
10 #include "swGraphicAPI/Resources/BlendingState.h"
12 #include "swGraphicAPI/Resources/SwapChain.h"
14 
15 class AssetsManager;
16 
17 
25 {
26  friend class ResourceManager;
27  friend class AssetsManager;
28 private:
29  static TextureObject* CreateTextureFromMemory ( const MemoryChunk& texData, TextureInfo&& texInfo );
30 
31  static VertexShader* CreateVertexShaderFromFile ( const std::wstring& fileName, const std::string& shaderName, const char* shaderModel = "vs_4_0" );
32  static PixelShader* CreatePixelShaderFromFile ( const std::wstring& fileName, const std::string& shaderName, const char* shaderModel = "ps_4_0" );
33  static ComputeShader* CreateComputeShaderFromFile ( const std::wstring& fileName, const std::string& shaderName, const char* shaderModel = "cs_4_0" );
34 
35  static BufferObject* CreateBufferFromMemory ( const std::wstring& name, const uint8* data, const BufferInfo& bufferInfo );
36 
37  static VertexShader* CreateVertexShaderFromFile ( const std::wstring& fileName,
38  const std::string& shaderName,
39  ShaderInputLayout** layout,
40  InputLayoutDescriptor* layout_desc,
41  const char* shaderModel = "vs_4_0" );
42 
43  static BlendingState* CreateBlendingState ( const BlendingInfo& info );
46 
47 public:
48  static IGraphicAPIInitializer* CreateAPIInitializer ();
50  static SwapChain* CreateScreenSwapChain ( RenderTargetObject* screenRT );
51  static InputLayoutDescriptor* CreateInputLayoutDescriptor ( const std::wstring& layoutName );
52  static RenderTargetObject* CreateRenderTarget ( const std::wstring& name, const RenderTargetDescriptor& renderTargetDescriptor );
53 };
54 
Definition: DepthStencilState.h:45
Deskryptor tekstury.
Definition: MeshResources.h:145
Interfejs klasy do inicjowania API graficznego.
Definition: IGraphicAPIInitializer.h:97
Obiekt opakowujący bufor.Bufor może być zarówno buforem wierzchołków, indeksów jak i stałych...
Definition: MeshResources.h:516
Klasa przechowuje opis layoutu wierzchołka, na podstawie którego tworzony jest obiekt layoutu...
Definition: MeshResources.h:352
static DepthStencilState * CreateDepthStencilState(const DepthStencilInfo &info)
Creates DepthStencilState.
Definition: ResourcesFactory.cpp:93
Definition: RasterizerState.h:20
Descriptor of buffer.
Definition: IBuffer.h:35
static PixelShader * CreatePixelShaderFromFile(const std::wstring &fileName, const std::string &shaderName, const char *shaderModel="ps_4_0")
Tworzy obekt pixel shadera.
Definition: ResourcesFactory.cpp:104
static RenderTargetObject * CreateScreenRenderTarget()
Definition: ResourcesFactory.cpp:140
static RasterizerState * CreateRasterizerState(const RasterizerStateInfo &info)
Creates RasterizerState.
Definition: ResourcesFactory.cpp:87
Klasa przechowująca pixel shader.
Definition: MeshResources.h:408
Struktura używana do tworzenia render targetu.
Definition: MeshResources.h:238
Initialization of BlendingState.
Definition: BlendingState.h:20
Plik zawiera deklaracje formatów wierzchołków oraz klas zawierających assety shadery itp...
static ComputeShader * CreateComputeShaderFromFile(const std::wstring &fileName, const std::string &shaderName, const char *shaderModel="cs_4_0")
Tworzy obekt compute shadera.
Definition: ResourcesFactory.cpp:120
static VertexShader * CreateVertexShaderFromFile(const std::wstring &fileName, const std::string &shaderName, const char *shaderModel="vs_4_0")
Tworzy obiekt vertex shadera.
Definition: ResourcesFactory.cpp:46
static BufferObject * CreateBufferFromMemory(const std::wstring &name, const uint8 *data, const BufferInfo &bufferInfo)
Tworzy bufor na podstawie sanych w pamięci.
Definition: ResourcesFactory.cpp:132
Klasa przechowująca tekstury.Klasa bazowa, która będzie używana przez obiekty silnika. Powinny po niej odziedziczyć obiekty konkretnego API graficznego, żeby zaimplementować najważniejsze funkcjonalności.
Definition: MeshResources.h:206
Klasa ze statycznymi funkcjami do tworzenia obiektów assetów.Jest potrzebna, żeby wybrać implementacj...
Definition: ResourcesFactory.h:24
Klasa przechowująca compute shader.
Definition: MeshResources.h:492
static TextureObject * CreateTextureFromMemory(const MemoryChunk &texData, TextureInfo &&texInfo)
Tworzy teksturę z podanego deskryptora.
Definition: ResourcesFactory.cpp:34
Klasa przechowuje layout wierzchołka trafiającego do vertex shadera.
Definition: MeshResources.h:334
Klasa dla render targetów.Klasa umożliwia pobranie jednej z tekstur składowych i udostępnienie dla sh...
Definition: MeshResources.h:301
Definition: DepthStencilState.h:17
Deklaracja interfejsu IGraphicAPIInitializer.
Klasa przechowująca vertex shader.
Definition: MeshResources.h:387
Rasterizer state and depth stencil state.
Definition: RasterizerState.h:67
Definition: BlendingState.h:72
static BlendingState * CreateBlendingState(const BlendingInfo &info)
Creates BlendingState.
Definition: ResourcesFactory.cpp:81
Definition: SwapChain.h:33
static InputLayoutDescriptor * CreateInputLayoutDescriptor(const std::wstring &layoutName)
Definition: ResourcesFactory.cpp:156
Manager for low level resources.
Definition: ResourceManager.h:24