ShadowExample

Undocumented in source.

Constructors

this
this(string[] args)
Undocumented in source.

Members

Classes

ShadowFrameData
class ShadowFrameData
Undocumented in source.

Functions

dispose
void dispose()
Undocumented in source. Be warned that the author may not have intended to support it.
makeFrameData
FrameData makeFrameData(ImageBase swcColor, CommandBuffer tempBuf)
Undocumented in source. Be warned that the author may not have intended to support it.
prepare
void prepare()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareDescriptors
void prepareDescriptors()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareMeshPipeline
PipelineInfo prepareMeshPipeline()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareMeshRenderPass
void prepareMeshRenderPass()
Undocumented in source. Be warned that the author may not have intended to support it.
preparePipelines
void preparePipelines()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareRenderPass
void prepareRenderPass()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareSceneAndResources
void prepareSceneAndResources()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareShadowFramebuffers
void prepareShadowFramebuffers()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareShadowPipeline
PipelineInfo prepareShadowPipeline()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareShadowRenderPass
void prepareShadowRenderPass()
Undocumented in source. Be warned that the author may not have intended to support it.
rebuildSwapchain
void rebuildSwapchain()
Undocumented in source. Be warned that the author may not have intended to support it.
recordCmds
Submission[] recordCmds(FrameData frameData)
Undocumented in source. Be warned that the author may not have intended to support it.
updateBuffers
void updateBuffers(FMat4 viewProj)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

maxLights
enum maxLights;
Undocumented in source.
numLights
enum numLights;
Undocumented in source.
shadowSize
enum shadowSize;
Undocumented in source.

Structs

Light
struct Light
Undocumented in source.
LightBlk
struct LightBlk
Undocumented in source.
Mesh
struct Mesh
Undocumented in source.
MeshFsLights
struct MeshFsLights
Undocumented in source.
MeshFsMaterial
struct MeshFsMaterial
Undocumented in source.
MeshVsLocals
struct MeshVsLocals
Undocumented in source.
ShadowVsLocals
struct ShadowVsLocals
Undocumented in source.
Vertex
struct Vertex
Undocumented in source.

Variables

descPool
Rc!DescriptorPool descPool;
Undocumented in source.
indBuf
Rc!Buffer indBuf;
Undocumented in source.
lastSub
Rc!Fence lastSub;
Undocumented in source.
ligUniformBuf
Rc!Buffer ligUniformBuf;
Undocumented in source.
lights
Light[] lights;
Undocumented in source.
meshDS
DescriptorSet meshDS;
Undocumented in source.
meshDSLayout
Rc!DescriptorSetLayout meshDSLayout;
Undocumented in source.
meshLayout
Rc!PipelineLayout meshLayout;
Undocumented in source.
meshPipeline
Rc!Pipeline meshPipeline;
Undocumented in source.
meshRenderPass
Rc!RenderPass meshRenderPass;
Undocumented in source.
meshShadowView
Rc!ImageView meshShadowView;
Undocumented in source.
meshUniformBuf
Rc!Buffer meshUniformBuf;
Undocumented in source.
meshes
Mesh[] meshes;
Undocumented in source.
shadowDS
DescriptorSet shadowDS;
Undocumented in source.
shadowDSLayout
Rc!DescriptorSetLayout shadowDSLayout;
Undocumented in source.
shadowFinishedSem
Rc!Semaphore shadowFinishedSem;
Undocumented in source.
shadowLayout
Rc!PipelineLayout shadowLayout;
Undocumented in source.
shadowPipeline
Rc!Pipeline shadowPipeline;
Undocumented in source.
shadowRenderPass
Rc!RenderPass shadowRenderPass;
Undocumented in source.
shadowSampler
Rc!Sampler shadowSampler;
Undocumented in source.
shadowTex
Rc!Image shadowTex;
Undocumented in source.
vertBuf
Rc!Buffer vertBuf;
Undocumented in source.

Inherited Members

From Example

title
string title;
Undocumented in source.
args
string[] args;
Undocumented in source.
display
Rc!Display display;
Undocumented in source.
window
Window window;
Undocumented in source.
instance
Rc!Instance instance;
Undocumented in source.
ndc
NDC ndc;
Undocumented in source.
physicalDevice
PhysicalDevice physicalDevice;
Undocumented in source.
device
Rc!Device device;
Undocumented in source.
graphicsQueue
Queue graphicsQueue;
Undocumented in source.
presentQueue
Queue presentQueue;
Undocumented in source.
surfaceSize
uint[2] surfaceSize;
Undocumented in source.
hasAlpha
bool hasAlpha;
Undocumented in source.
swapchain
Rc!Swapchain swapchain;
Undocumented in source.
imageAvailableSem
Rc!Semaphore imageAvailableSem;
Undocumented in source.
renderingFinishSem
Rc!Semaphore renderingFinishSem;
Undocumented in source.
frameNumber
uint frameNumber;
Undocumented in source.
frameDatas
FrameData[] frameDatas;
Undocumented in source.
probe
FpsProbe probe;
Undocumented in source.
garbageEntries
GarbageEntry garbageEntries;
Undocumented in source.
lastGarbageEntry
GarbageEntry lastGarbageEntry;
Undocumented in source.
maxFcAge
enum maxFcAge;
Undocumented in source.
GarbageEntry
class GarbageEntry
Undocumented in source.
dispose
void dispose()
Undocumented in source. Be warned that the author may not have intended to support it.
prepare
void prepare()
Undocumented in source. Be warned that the author may not have intended to support it.
timeElapsed
Duration timeElapsed()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareDevice
void prepareDevice()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareSync
void prepareSync()
Undocumented in source. Be warned that the author may not have intended to support it.
prepareSwapchain
void prepareSwapchain(Swapchain former)
Undocumented in source. Be warned that the author may not have intended to support it.
prepareRenderPass
void prepareRenderPass()
Undocumented in source. Be warned that the author may not have intended to support it.
FrameData
class FrameData

Data that is duplicated for every frame in the swapchain This typically include framebuffer and command pool.

makeFrameData
FrameData makeFrameData(ImageBase swcColor, CommandBuffer tempBuf)

Instantiate FrameData implementation for the given swapchain color image. tempBuf is a helper that can be used to transfer data, change images layout... it is submitted and waited for shortly after FrameData is built.

prepareFramebuffers
void prepareFramebuffers()
Undocumented in source. Be warned that the author may not have intended to support it.
recordCmds
Submission[] recordCmds(FrameData frameData)

Record buffer implementation for the current frame. Returns the submissions for the graphics queue the first submission that renders to the swapchain image must wait for imageAvailableSem the last submission must signal renderingFinishSem

simpleSubmission
Submission[] simpleSubmission(PrimaryCommandBuffer[] cmdBufs)

build a submission for the simplest cases with one submission

render
void render()
Undocumented in source. Be warned that the author may not have intended to support it.
rebuildSwapchain
void rebuildSwapchain()
Undocumented in source. Be warned that the author may not have intended to support it.
frameTick
void frameTick()
Undocumented in source. Be warned that the author may not have intended to support it.
gc
void gc(IAtomicRefCounted resource, Fence fence)
Undocumented in source. Be warned that the author may not have intended to support it.
collectGarbage
void collectGarbage()
Undocumented in source. Be warned that the author may not have intended to support it.
findSupportedFormat
Format findSupportedFormat(Format[] candidates, ImageTiling tiling, FormatFeatures features)

Find a format supported by the device for the given tiling and features

findDepthFormat
Format findDepthFormat()

Find a supported depth format

findStencilFormat
Format findStencilFormat()

Find a supported stencil format

findMemType
uint findMemType(MemoryRequirements mr, MemProps props)

Return the index of a memory type supporting all of props, or uint.max if none was found.

createBuffer
Buffer createBuffer(size_t dataSize, BufferUsage usage, MemProps props)

Create a buffer for usage, bind memory of dataSize with memProps Return null if no memory type can be found

createDynamicBuffer
Buffer createDynamicBuffer(size_t dataSize, BufferUsage usage)

Create a buffer, binds memory to it, and leave content undefined The buffer will be host visible and host coherent such as content can be updated without staging buffer

createStaticBuffer
Buffer createStaticBuffer(const(void)[] data, BufferUsage usage)
Buffer createStaticBuffer(const(T)[] data, BufferUsage usage)
Buffer createStaticBuffer(T data, BufferUsage usage)

Create a buffer, and bind it with memory filled with data. The bound memory will be deviceLocal, without guarantee to be host visible.

bindImageMemory
bool bindImageMemory(Image img, MemProps props)
Undocumented in source. Be warned that the author may not have intended to support it.
createTextureImage
Image createTextureImage(const(void)[] data, ImageInfo info)

create an image to be used as texture

createDepthImage
Image createDepthImage(uint width, uint height)

Create an image for depth attachment usage

createStencilImage
Image createStencilImage(uint width, uint height)

Create an image for stencil attachment usage

recordImageLayoutBarrier
void recordImageLayoutBarrier(CommandBuffer cmdBuf, ImageBase img, Trans!ImageLayout layout)
Undocumented in source. Be warned that the author may not have intended to support it.
copyBuffer
void copyBuffer(Buffer srcBuf, Buffer dstBuf, size_t size, CommandBuffer cmdBuf)

copy the content of one buffer to another srcBuf and dstBuf must support transferSrc and transferDst respectively.

copyBufferToImage
void copyBufferToImage(Buffer srcBuf, Image dstImg, CommandBuffer cmdBuf)

copy the content of one buffer to an image. the image layout must be transferDstOptimal buffer the call

RaiiCmdBuf
class RaiiCmdBuf

Utility command buffer for a one time submission that automatically submit when disposed. Generally used for transfer operations, or image layout change.

Meta