Skip to content

Commit d4ec559

Browse files
committed
- add docs for texture
1 parent 491d419 commit d4ec559

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

docs/v2.pmfx_doc

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -327,20 +327,33 @@ raster_states: {
327327
}
328328

329329
/// specify a texture or render target.. spec is still work in progress, but here is a current example
330-
texture: {
331-
main_colour: {
332-
ratio: {
333-
window: "main_window",
334-
scale: 1.0
335-
}
336-
format: RGBA8n
337-
usage: [ShaderResource, RenderTarget]
338-
samples: 8
339-
}
340-
main_depth(main_colour): {
341-
format: D24nS8u
342-
usage: [ShaderResource, DepthStencil]
343-
}
330+
textures: {
331+
/// specify texture format
332+
/// type: enum [gfx::Format]
333+
format: RGBA8n,
334+
/// width of texture in pixels
335+
/// type: int
336+
width: 1,
337+
/// height of texture in pixels
338+
/// type: int
339+
height: 1,
340+
/// depth of texture in pixels / slices
341+
/// type: int
342+
depth: 1,
343+
/// depth of texture in pixels / slices for texture arrays
344+
/// type: int
345+
array_layers: 1,
346+
/// number of mip levels in the mip chain
347+
/// type: int
348+
mip_levels: 1,
349+
/// number of samples for msaa
350+
/// type: int
351+
samples: 1,
352+
/// signify this texture is a cubemap
353+
cubemap: False,
354+
/// indicate how this texture will be used
355+
/// type: enum [RenderTarget, DepthStencil, DepthStencilReadOnly, UnorderedAccess, ShaderResource]
356+
usage: ShaderResource
344357
}
345358

346359
/// specify a view (a render pass into a render target)

0 commit comments

Comments
 (0)