28 lines
822 B
C
28 lines
822 B
C
#pragma once
|
|||
|
|
|
||
|
|
|
||
|
|
SwapChain swapChain;
|
||
|
|
|
||
|
|
using DepthBufferData = MipChain<sizeof(float), SwapChain::Lcd::Width, SwapChain::Lcd::Height, 0>;
|
||
|
|
alignas(32) DepthBufferData depthBufferData;
|
||
|
|
|
||
|
|
static TextureDescription depthBufferDesc() {
|
||
|
|
TextureDescription desc;
|
||
|
|
desc.Width = DepthBufferData::Width;
|
||
|
|
desc.Height = DepthBufferData::Height;
|
||
|
|
desc.BytesPerPixel = DepthBufferData::BytesPerPixel;
|
||
|
|
desc.MipCount = DepthBufferData::MipsCount;
|
||
|
|
return desc;
|
||
|
|
}
|
||
|
|
|
||
|
|
//StaticTexture<DepthBufferData*> colorBuffer(&colorBufferData, colorBufferDesc());
|
||
|
|
StaticTexture<DepthBufferData*> depthBuffer(&depthBufferData, depthBufferDesc());
|
||
|
|
|
||
|
|
BlockRasterizer rasterizer;
|
||
|
|
|
||
|
|
|
||
|
|
static_buffer<Vertex, CubeGenerator<Vertex, indices_t>::VertexCount> cubeVb;
|
||
|
|
static_buffer<indices_t, CubeGenerator<Vertex, indices_t>::IndexCount> cubeIb;
|
||
|
|
Mesh<1> cube;
|
||
|
|
|