src/ngfx/porting/d3d/D3DBlitOp.h
Namespaces
Classes
Source code
#pragma once
#include "ngfx/porting/d3d/D3DBuffer.h"
#include "ngfx/porting/d3d/D3DCommandList.h"
#include "ngfx/porting/d3d/D3DFramebuffer.h"
#include "ngfx/porting/d3d/D3DGraphicsPipeline.h"
#include <glm/glm.hpp>
namespace ngfx {
struct Region {
glm::ivec3 p0, p1;
};
class D3DGraphicsContext;
class D3DTexture;
class D3DGraphics;
class D3DBlitOp {
public:
D3DBlitOp(D3DGraphicsContext *ctx, D3DTexture *srcTexture, uint32_t srcLevel,
D3DTexture *dstTexture, uint32_t dstLevel, Region srcRegion,
Region dstRegion, uint32_t srcBaseLayer = 0,
uint32_t srcLayerCount = 1, uint32_t dstBaseLayer = 0,
uint32_t dstLayerCount = 1);
void apply(D3DGraphicsContext *ctx, D3DCommandList *cmdList,
D3DGraphics *graphics);
void draw(D3DCommandList *cmdList, D3DGraphics *graphics);
std::unique_ptr<D3DFramebuffer> outputFramebuffer;
std::unique_ptr<D3DBuffer> bPos, bTexCoord, bUbo;
D3DTexture *srcTexture, *dstTexture;
uint32_t srcLevel, dstLevel;
Region srcRegion, dstRegion;
uint32_t srcBaseLayer, srcLayerCount, dstBaseLayer, dstLayerCount;
protected:
virtual void createPipeline();
struct UBOData {
uint32_t lod, padding[3];
};
D3DGraphicsPipeline *graphicsPipeline;
uint32_t numVerts;
uint32_t B_POS, B_TEXCOORD, U_UBO, U_TEXTURE;
D3DGraphicsContext *ctx;
};
};
Updated on 3 April 2021 at 20:21:51 PDT