Faro Engine 0.0.0.b519570 (main)
Loading...
Searching...
No Matches
GraphicsPipeline.hpp
Go to the documentation of this file.
1#pragma once
3#include <Primitives.hpp>
5#include <GraphicsFormat.hpp>
6
7namespace Faro
8{
9 /// @brief Describes a graphics pipeline.
11 {
12 /// @brief Pointer to a binary vertex shader.
13 uint8* vsData = nullptr;
14 /// @brief Size of the vertex shader data.
16
17 /// @brief Pointer to a binary geometry shader.
18 uint8* gsData = nullptr;
19 /// @brief Size of the geometry shader data.
21
22 /// @brief Pointer to a binary pixel shader.
23 uint8* psData = nullptr;
24 /// @brief Size of the pixel shader data.
26
27 /// @brief Describes an input layout element.
29 {
30 /// @brief Element format.
32 /// @brief Semantic name.
34 /// @brief Semantic index.
36 };
37 /// @brief List of input layout element.
39
40 /// @brief List of rendertarget formats.
42 };
43
44 /// @brief Graphics pipeline state object
46 {
47 public:
48 /**
49 * @brief Load a prebuilt shader into the provided pipeline description.
50 * @param stream Stream to read the shader from
51 * @param[out] desc Pipeline description to place the shader in
52 * @return true The shader was loaded successfully
53 * @return false An error occurred while trying to load the shader
54 */
55 static bool LoadShader(DataStream* stream, GraphicsPipelineDesc& desc);
56
59
60 protected:
62 };
63}
Definition Array.hpp:11
Interface that reads and writes data to and from a stream.
Definition Stream.hpp:21
Definition GraphicsAdapter.hpp:27
Graphics pipeline state object.
Definition GraphicsPipeline.hpp:46
GraphicsPipelineDesc desc
Definition GraphicsPipeline.hpp:61
void Init() override
Run the initialization logic of this object. Should be overriden by deriving classes.
Definition GraphicsAdapterChild.cpp:16
static bool LoadShader(DataStream *stream, GraphicsPipelineDesc &desc)
Load a prebuilt shader into the provided pipeline description.
Definition GraphicsPipeline.cpp:61
Definition GraphicsAdapterChild.hpp:9
void Init() override
Run the initialization logic of this object. Should be overriden by deriving classes.
Definition GraphicsAdapterChild.cpp:16
Definition String.hpp:12
Definition Array.hpp:8
uint16_t uint16
Definition Primitives.hpp:9
uint8_t uint8
Definition Primitives.hpp:6
Describes a graphics format.
Definition GraphicsFormat.hpp:48
Describes an input layout element.
Definition GraphicsPipeline.hpp:29
String name
Semantic name.
Definition GraphicsPipeline.hpp:33
GraphicsFormat format
Element format.
Definition GraphicsPipeline.hpp:31
uint8 semanticIndex
Semantic index.
Definition GraphicsPipeline.hpp:35
Describes a graphics pipeline.
Definition GraphicsPipeline.hpp:11
uint16 psSize
Size of the pixel shader data.
Definition GraphicsPipeline.hpp:25
uint8 * vsData
Pointer to a binary vertex shader.
Definition GraphicsPipeline.hpp:13
Array< InputLayoutElement > inputLayout
List of input layout element.
Definition GraphicsPipeline.hpp:38
uint16 gsSize
Size of the geometry shader data.
Definition GraphicsPipeline.hpp:20
uint16 vsSize
Size of the vertex shader data.
Definition GraphicsPipeline.hpp:15
Array< GraphicsFormat > renderTargets
List of rendertarget formats.
Definition GraphicsPipeline.hpp:41
uint8 * psData
Pointer to a binary pixel shader.
Definition GraphicsPipeline.hpp:23
uint8 * gsData
Pointer to a binary geometry shader.
Definition GraphicsPipeline.hpp:18