Graphics/FramePass: Replace render rect parameter of CommandCallback by FramePassEnvironment
This commit is contained in:
@@ -19,8 +19,10 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class BakedFrameGraph;
|
||||
class CommandBufferBuilder;
|
||||
class FrameGraph;
|
||||
class RenderFrame;
|
||||
|
||||
enum class FramePassExecution
|
||||
{
|
||||
@@ -29,10 +31,17 @@ namespace Nz
|
||||
UpdateAndExecute
|
||||
};
|
||||
|
||||
struct FramePassEnvironment
|
||||
{
|
||||
BakedFrameGraph& frameGraph;
|
||||
Recti renderRect;
|
||||
RenderFrame& renderFrame;
|
||||
};
|
||||
|
||||
class NAZARA_GRAPHICS_API FramePass
|
||||
{
|
||||
public:
|
||||
using CommandCallback = std::function<void(CommandBufferBuilder& builder, const Recti& renderRect)>;
|
||||
using CommandCallback = std::function<void(CommandBufferBuilder& builder, const FramePassEnvironment& env)>;
|
||||
using ExecutionCallback = std::function<FramePassExecution()>;
|
||||
struct DepthStencilClear;
|
||||
struct Input;
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace Nz
|
||||
case PixelFormat::BGRA8: return GLTextureFormat{ GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, GL_BLUE, GL_GREEN, GL_RED, GL_ALPHA };
|
||||
case PixelFormat::BGRA8_SRGB: return GLTextureFormat{ GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, GL_BLUE, GL_GREEN, GL_RED, GL_ALPHA };
|
||||
case PixelFormat::Depth16: return GLTextureFormat{ GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, GL_RED, GL_ZERO, GL_ZERO, GL_ZERO };
|
||||
case PixelFormat::Depth24: return GLTextureFormat{ GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_RED, GL_ZERO, GL_ZERO, GL_ZERO };
|
||||
case PixelFormat::Depth24Stencil8: return GLTextureFormat{ GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_RED, GL_GREEN, GL_ZERO, GL_ZERO };
|
||||
case PixelFormat::Depth32F: return GLTextureFormat{ GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, GL_RED, GL_ZERO, GL_ZERO, GL_ZERO };
|
||||
case PixelFormat::Depth32FStencil8: return GLTextureFormat{ GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, GL_RED, GL_GREEN, GL_ZERO, GL_ZERO };
|
||||
|
||||
Reference in New Issue
Block a user