Diligent Engine API Reference: D:/GitHub/DiligentEngine/DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h Source File

Diligent Engine API Reference

DeviceContext.h
1 /* Copyright 2015-2018 Egor Yusov
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
12 *
13 * In no event and under no legal theory, whether in tort (including negligence),
14 * contract, or otherwise, unless required by applicable law (such as deliberate
15 * and grossly negligent acts) or agreed to in writing, shall any Contributor be
16 * liable for any damages, including any direct, indirect, special, incidental,
17 * or consequential damages of any character arising as a result of this License or
18 * out of the use or inability to use the software (including but not limited to damages
19 * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
20 * all other commercial damages or losses), even if such Contributor has been advised
21 * of the possibility of such damages.
22 */
23
24 #pragma once
25
28
29 #include "Object.h"
30 #include "DeviceCaps.h"
31 #include "Constants.h"
32 #include "Buffer.h"
33 #include "InputLayout.h"
34 #include "Shader.h"
35 #include "Texture.h"
36 #include "Sampler.h"
37 #include "ResourceMapping.h"
38 #include "TextureView.h"
39 #include "BufferView.h"
40 #include "DepthStencilState.h"
41 #include "BlendState.h"
42 #include "PipelineState.h"
43 #include "CommandList.h"
44 #include "SwapChain.h"
45
46 namespace Diligent
47 {
48
49 // {DC92711B-A1BE-4319-B2BD-C662D1CC19E4}
50 static constexpr INTERFACE_ID IID_DeviceContext =
51 { 0xdc92711b, 0xa1be, 0x4319, { 0xb2, 0xbd, 0xc6, 0x62, 0xd1, 0xcc, 0x19, 0xe4 } };
52
54
56 enum PRIMITIVE_TOPOLOGY : Int32
57 {
59 PRIMITIVE_TOPOLOGY_UNDEFINED = 0,
60
63 PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,
64
67 PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP,
68
71 PRIMITIVE_TOPOLOGY_POINT_LIST,
72
75 PRIMITIVE_TOPOLOGY_LINE_LIST,
76
79 PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST,
80
83 PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST,
84
87 PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST,
88
91 PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST,
92
95 PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST,
96
99 PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST,
100
103 PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST,
104
107 PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST,
108
111 PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST,
112
115 PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST,
116
119 PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST,
120
123 PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST,
124
127 PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST,
128
131 PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST,
132
135 PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST,
136
139 PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST,
140
143 PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST,
144
147 PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST,
148
151 PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST,
152
155 PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST,
156
159 PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST,
160
163 PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST,
164
167 PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST,
168
171 PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST,
172
175 PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST,
176
179 PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST,
180
183 PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST,
184
187 PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST,
188
191 PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST,
192
195 PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST,
196
199 PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST,
200
203 PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST,
204
206 PRIMITIVE_TOPOLOGY_NUM_TOPOLOGIES
207 };
208
210
212 struct DrawAttribs
213 {
215 PRIMITIVE_TOPOLOGY Topology;
216 union
217 {
219 Uint32 NumVertices;
220
222 Uint32 NumIndices;
223 };
226 VALUE_TYPE IndexType;
227
229 Bool IsIndexed;
230
233 Uint32 NumInstances;
234
238 Bool IsIndirect;
239
242 Uint32 BaseVertex;
243
246 Uint32 IndirectDrawArgsOffset;
247
248 union
249 {
252 Uint32 StartVertexLocation;
253
256 Uint32 FirstIndexLocation;
257 };
260 Uint32 FirstInstanceLocation;
261
264 IBuffer *pIndirectDrawAttribs;
265
266
268
283 DrawAttribs() :
284 Topology(PRIMITIVE_TOPOLOGY_UNDEFINED),
285 NumVertices(0),
286 IndexType(VT_UNDEFINED),
287 IsIndexed(False),
288 NumInstances(1),
289 IsIndirect(False),
290 BaseVertex(0),
291 IndirectDrawArgsOffset(0),
292 StartVertexLocation(0),
293 FirstInstanceLocation(0),
294 pIndirectDrawAttribs(nullptr)
295 {}
296 };
297
299
301 enum CLEAR_DEPTH_STENCIL_FLAGS : Int32
302 {
303 CLEAR_DEPTH_FLAG = 0x01,
304 CLEAR_STENCIL_FLAG = 0x02
305 };
306
308
312 struct DispatchComputeAttribs
313 {
314 Uint32 ThreadGroupCountX;
315 Uint32 ThreadGroupCountY;
316 Uint32 ThreadGroupCountZ;
317
321 IBuffer *pIndirectDispatchAttribs;
322
325 Uint32 DispatchArgsByteOffset;
326
328
332 DispatchComputeAttribs( Uint32 GroupsX = 1, Uint32 GroupsY = 1, Uint32 GroupsZ = 1 ) :
333 ThreadGroupCountX( GroupsX ),
334 ThreadGroupCountY( GroupsY ),
335 ThreadGroupCountZ( GroupsZ ),
336 pIndirectDispatchAttribs(nullptr),
337 DispatchArgsByteOffset(0)
338 {}
339
341
345 DispatchComputeAttribs( IBuffer *pDispatchAttribs, Uint32 Offset = 0 ) :
346 ThreadGroupCountX( 0 ),
347 ThreadGroupCountY( 0 ),
348 ThreadGroupCountZ( 0 ),
349 pIndirectDispatchAttribs( pDispatchAttribs ),
350 DispatchArgsByteOffset( Offset )
351 {}
352 };
353
355 enum SET_VERTEX_BUFFERS_FLAGS : Int32
356 {
359 SET_VERTEX_BUFFERS_FLAG_RESET = 0x01
360 };
361
363 enum COMMIT_SHADER_RESOURCES_FLAG
364 {
366
369 COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES = 0x01
370 };
371
372
374
376 struct Viewport
377 {
379 Float32 TopLeftX;
380
385 Float32 TopLeftY;
386
388 Float32 Width;
389
391 Float32 Height;
392
394 Float32 MinDepth;
395
397 Float32 MaxDepth;
398
400 Viewport(Float32 _TopLeftX = 0, Float32 _TopLeftY = 0,
401 Float32 _Width = 0, Float32 _Height = 0,
402 Float32 _MinDepth = 0, Float32 _MaxDepth = 1 )
403 :
404 TopLeftX( _TopLeftX ),
405 TopLeftY( _TopLeftY ),
406 Width ( _Width ),
407 Height ( _Height ),
408 MinDepth( _MinDepth ),
409 MaxDepth( _MaxDepth )
410 {}
411 };
412
414
420 struct Rect
421 {
422 Int32 left;
423 Int32 top;
424 Int32 right;
425 Int32 bottom;
426
428 Rect( Int32 _left = 0, Int32 _top = 0, Int32 _right = 0, Int32 _bottom = 0 ) :
429 left ( _left ),
430 top ( _top ),
431 right ( _right ),
432 bottom( _bottom )
433 {}
434 };
435
436
438
443 class IDeviceContext : public IObject
444 {
445 public:
447 virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface ) = 0;
448
450
452 virtual void SetPipelineState(IPipelineState *pPipelineState) = 0;
453
454
461 virtual void TransitionShaderResources(IPipelineState *pPipelineState, IShaderResourceBinding *pShaderResourceBinding) = 0;
462
464
479 virtual void CommitShaderResources(IShaderResourceBinding *pShaderResourceBinding, Uint32 Flags) = 0;
480
482
484 virtual void SetStencilRef(Uint32 StencilRef) = 0;
485
486
493 virtual void SetBlendFactors(const float* pBlendFactors = nullptr) = 0;
494
495
497
503 // The vertex buffers must have been created with the Diligent::BIND_VERTEX_BUFFER flag.
520 virtual void SetVertexBuffers(Uint32 StartSlot,
521 Uint32 NumBuffersSet,
522 IBuffer **ppBuffers,
523 Uint32 *pStrides,
524 Uint32 *pOffsets,
525 Uint32 Flags) = 0;
526
528
531 virtual void InvalidateState() = 0;
532
533
535
543 virtual void SetIndexBuffer(IBuffer *pIndexBuffer, Uint32 ByteOffset) = 0;
544
545
547
563 virtual void SetViewports( Uint32 NumViewports, const Viewport *pViewports, Uint32 RTWidth, Uint32 RTHeight ) = 0;
564
566
578 virtual void SetScissorRects( Uint32 NumRects, const Rect *pRects, Uint32 RTWidth, Uint32 RTHeight ) = 0;
579
582
599 virtual void SetRenderTargets( Uint32 NumRenderTargets, ITextureView *ppRenderTargets[], ITextureView *pDepthStencil ) = 0;
600
602
604 virtual void Draw(DrawAttribs &DrawAttribs) = 0;
605
607
610 virtual void DispatchCompute( const DispatchComputeAttribs &DispatchAttrs ) = 0;
611
613
621 virtual void ClearDepthStencil( ITextureView *pView, Uint32 ClearFlags = CLEAR_DEPTH_FLAG, float fDepth = 1.f, Uint8 Stencil = 0 ) = 0;
622
624
631 virtual void ClearRenderTarget( ITextureView *pView, const float *RGBA = nullptr ) = 0;
632
634
636 virtual void FinishCommandList( ICommandList **ppCommandList) = 0;
637
639
642 virtual void ExecuteCommandList( ICommandList *pCommandList) = 0;
643
645 virtual void Flush() = 0;
646
648
662 virtual void SetSwapChain( ISwapChain *pSwapChain) = 0;
663 };
664
665 }
Diligent::PRIMITIVE_TOPOLOGY_POINT_LIST
Interpret the vertex data as a list of points. D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_POINTLIST. OpenGL counterpart: GL_POINTS.
Definition: DeviceContext.h:71
Diligent::IDeviceContext::SetIndexBuffer
virtual void SetIndexBuffer(IBuffer *pIndexBuffer, Uint32 ByteOffset)=0
Binds an index buffer to the pipeline.
Diligent::IDeviceContext::SetScissorRects
virtual void SetScissorRects(Uint32 NumRects, const Rect *pRects, Uint32 RTWidth, Uint32 RTHeight)=0
Sets active scissor rects.
Diligent::IDeviceContext::SetStencilRef
virtual void SetStencilRef(Uint32 StencilRef)=0
Sets the stencil reference value.
Diligent::PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 20 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:155
Diligent::IDeviceContext::Draw
virtual void Draw(DrawAttribs &DrawAttribs)=0
Executes a draw command.
Diligent::DrawAttribs::FirstInstanceLocation
Uint32 FirstInstanceLocation
For instanced rendering, LOCATION (or INDEX, but NOT the byte offset) in the vertex buffer to start r...
Definition: DeviceContext.h:260
Diligent::Rect::Rect
Rect(Int32 _left=0, Int32 _top=0, Int32 _right=0, Int32 _bottom=0)
Initializes the structure.
Definition: DeviceContext.h:428
Diligent::PRIMITIVE_TOPOLOGY
PRIMITIVE_TOPOLOGY
Input primitive topology.
Definition: DeviceContext.h:56
Diligent::PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 11 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:119
Diligent::DrawAttribs::BaseVertex
Uint32 BaseVertex
For indexed rendering, a constant which is added to each index before accessing the vertex buffer...
Definition: DeviceContext.h:242
Diligent::VT_UNDEFINED
Undefined type.
Definition: GraphicsTypes.h:41
Diligent::CLEAR_DEPTH_STENCIL_FLAGS
CLEAR_DEPTH_STENCIL_FLAGS
Defines which parts of the depth-stencil buffer to clear.
Definition: DeviceContext.h:301
Diligent
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34
Diligent::Viewport::TopLeftX
Float32 TopLeftX
X coordinate of the left boundary of the viewport.
Definition: DeviceContext.h:379
Diligent::IDeviceContext::SetRenderTargets
virtual void SetRenderTargets(Uint32 NumRenderTargets, ITextureView *ppRenderTargets[], ITextureView *pDepthStencil)=0
Binds one or more render targets and the depth-stencil buffer to the pipeline. It also sets the viewp...
Diligent::PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 16 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:139
Diligent::IDeviceContext::DispatchCompute
virtual void DispatchCompute(const DispatchComputeAttribs &DispatchAttrs)=0
Executes a dispatch compute command.
Diligent::IDeviceContext::SetPipelineState
virtual void SetPipelineState(IPipelineState *pPipelineState)=0
Sets the pipeline state.
Diligent::PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of five control point patches. D3D counterpart: D3D_PRIMITIVE_TO...
Definition: DeviceContext.h:95
Diligent::IDeviceContext::QueryInterface
virtual void QueryInterface(const Diligent::INTERFACE_ID &IID, IObject **ppInterface)=0
Queries the specific interface, see IObject::QueryInterface() for details.
Diligent::PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 15 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:135
Diligent::PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of nine control point patches. D3D counterpart: D3D_PRIMITIVE_TO...
Definition: DeviceContext.h:111
Diligent::PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 32 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:203
Diligent::DrawAttribs::pIndirectDrawAttribs
IBuffer * pIndirectDrawAttribs
For indirect rendering, pointer to the buffer, from which draw attributes will be read...
Definition: DeviceContext.h:264
Diligent::IDeviceContext::Flush
virtual void Flush()=0
Flushes the command buffer.
Diligent::Viewport
Describes the viewport.
Definition: DeviceContext.h:376
Diligent::Rect::bottom
Int32 bottom
Y coordinate of the bottom boundary of the viewport.
Definition: DeviceContext.h:425
Diligent::SET_VERTEX_BUFFERS_FLAGS
SET_VERTEX_BUFFERS_FLAGS
Defines allowed flags for IDeviceContext::SetVertexBuffers() function.
Definition: DeviceContext.h:355
Diligent::Viewport::MinDepth
Float32 MinDepth
Minimum depth of the viewport. Ranges between 0 and 1.
Definition: DeviceContext.h:394
Diligent::DrawAttribs::DrawAttribs
DrawAttribs()
Initializes the structure members with default values.
Definition: DeviceContext.h:283
Diligent::Viewport::Viewport
Viewport(Float32 _TopLeftX=0, Float32 _TopLeftY=0, Float32 _Width=0, Float32 _Height=0, Float32 _MinDepth=0, Float32 _MaxDepth=1)
Initializes the structure.
Definition: DeviceContext.h:400
Diligent::PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of four control point patches. D3D counterpart: D3D_PRIMITIVE_TO...
Definition: DeviceContext.h:91
Diligent::PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 30 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:195
Diligent::IShaderResourceBinding
Shader resource binding interface.
Definition: ShaderResourceBinding.h:40
Diligent::PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 22 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:163
Diligent::Viewport::Width
Float32 Width
Viewport width.
Definition: DeviceContext.h:388
Diligent::PRIMITIVE_TOPOLOGY_UNDEFINED
Undefined topology.
Definition: DeviceContext.h:59
Diligent::DrawAttribs::IsIndirect
Bool IsIndirect
Indicates if indirect draw call will be performed. If set to True, pIndirectDrawAttribs must contain ...
Definition: DeviceContext.h:238
Diligent::Rect::right
Int32 right
X coordinate of the right boundary of the viewport.
Definition: DeviceContext.h:424
Diligent::PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 24 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:171
Diligent::DispatchComputeAttribs
Describes dispatch command arguments.
Definition: DeviceContext.h:312
Diligent::DispatchComputeAttribs::DispatchComputeAttribs
DispatchComputeAttribs(Uint32 GroupsX=1, Uint32 GroupsY=1, Uint32 GroupsZ=1)
Initializes the structure to perform non-indirect dispatch command.
Definition: DeviceContext.h:332
Diligent::PRIMITIVE_TOPOLOGY_LINE_LIST
Interpret the vertex data as a list of lines. D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_LINELIST. OpenGL counterpart: GL_LINES.
Definition: DeviceContext.h:75
Diligent::PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 19 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:151
Diligent::IDeviceContext::TransitionShaderResources
virtual void TransitionShaderResources(IPipelineState *pPipelineState, IShaderResourceBinding *pShaderResourceBinding)=0
Transitions shader resources to the require states.
Diligent::PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of eight control point patches. D3D counterpart: D3D_PRIMITIVE_T...
Definition: DeviceContext.h:107
Diligent::PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of ten control point patches. D3D counterpart: D3D_PRIMITIVE_TOP...
Definition: DeviceContext.h:115
Diligent::DispatchComputeAttribs::DispatchComputeAttribs
DispatchComputeAttribs(IBuffer *pDispatchAttribs, Uint32 Offset=0)
Initializes the structure to perform indirect dispatch command.
Definition: DeviceContext.h:345
Diligent::PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 28 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:187
Diligent::IBuffer
Buffer interface.
Definition: Buffer.h:200
Diligent::IDeviceContext::FinishCommandList
virtual void FinishCommandList(ICommandList **ppCommandList)=0
Finishes recording commands and generates a command list.
Diligent::DrawAttribs::IndexType
VALUE_TYPE IndexType
For an indexed draw call, type of elements in the index buffer. Allowed values: VT_UINT16 and VT_UINT...
Definition: DeviceContext.h:226
Diligent::IDeviceContext::SetBlendFactors
virtual void SetBlendFactors(const float *pBlendFactors=nullptr)=0
Diligent::DispatchComputeAttribs::DispatchArgsByteOffset
Uint32 DispatchArgsByteOffset
If pIndirectDispatchAttribs is not nullptr, indicates offset from the beginning of the buffer to the ...
Definition: DeviceContext.h:325
Diligent::IDeviceContext
Device context interface.
Definition: DeviceContext.h:443
Diligent::Rect::left
Int32 left
X coordinate of the left boundary of the viewport.
Definition: DeviceContext.h:422
Diligent::ISwapChain
Swap chain interface.
Definition: SwapChain.h:41
Diligent::Rect::top
Int32 top
Y coordinate of the top boundary of the viewport.
Definition: DeviceContext.h:423
Diligent::PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 21 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:159
Diligent::DrawAttribs::NumIndices
Uint32 NumIndices
For an indexed draw call, number of indices to draw.
Definition: DeviceContext.h:222
Diligent::IDeviceContext::InvalidateState
virtual void InvalidateState()=0
Invalidates the cached context state.
Diligent::PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of six control point patches. D3D counterpart: D3D_PRIMITIVE_TOP...
Definition: DeviceContext.h:99
Diligent::ITextureView
Texture view interface.
Definition: TextureView.h:163
Diligent::DrawAttribs::NumVertices
Uint32 NumVertices
For a non-indexed draw call, number of vertices to draw.
Definition: DeviceContext.h:219
Diligent::PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 17 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:143
Diligent::VALUE_TYPE
VALUE_TYPE
Value type.
Definition: GraphicsTypes.h:39
Diligent::ICommandList
Command list interface.
Definition: CommandList.h:42
Diligent::PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 25 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:175
Diligent::PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 12 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:123
Diligent::PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 13 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:127
Diligent::IPipelineState
Definition: PipelineState.h:209
Diligent::IDeviceContext::ExecuteCommandList
virtual void ExecuteCommandList(ICommandList *pCommandList)=0
Executes recorded commands in a command list.
Diligent::DrawAttribs::NumInstances
Uint32 NumInstances
Number of instances to draw. If more than one instance is specified, instanced draw call will be perf...
Definition: DeviceContext.h:233
Diligent::PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 26 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:179
Diligent::DispatchComputeAttribs::ThreadGroupCountY
Uint32 ThreadGroupCountY
Number of groups dispatched in Y direction.
Definition: DeviceContext.h:315
Diligent::PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 23 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:167
Diligent::DrawAttribs
Defines the draw command attributes.
Definition: DeviceContext.h:212
Diligent::IDeviceContext::CommitShaderResources
virtual void CommitShaderResources(IShaderResourceBinding *pShaderResourceBinding, Uint32 Flags)=0
Commits shader resources to the device context.
Diligent::COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES
Transition resources being committed.
Definition: DeviceContext.h:369
Diligent::CLEAR_STENCIL_FLAG
Clear stencil part of the buffer.
Definition: DeviceContext.h:304
Diligent::IDeviceContext::SetViewports
virtual void SetViewports(Uint32 NumViewports, const Viewport *pViewports, Uint32 RTWidth, Uint32 RTHeight)=0
Sets an array of viewports.
Diligent::IDeviceContext::SetVertexBuffers
virtual void SetVertexBuffers(Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32 *pStrides, Uint32 *pOffsets, Uint32 Flags)=0
Binds vertex buffers to the pipeline.
Diligent::Rect
Describes the rectangle.
Definition: DeviceContext.h:420
Diligent::Viewport::Height
Float32 Height
Viewport Height.
Definition: DeviceContext.h:391
Diligent::IDeviceContext::ClearDepthStencil
virtual void ClearDepthStencil(ITextureView *pView, Uint32 ClearFlags=CLEAR_DEPTH_FLAG, float fDepth=1.f, Uint8 Stencil=0)=0
Clears a depth-stencil view.
Diligent::PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 31 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:199
Diligent::CLEAR_DEPTH_FLAG
Clear depth part of the buffer.
Definition: DeviceContext.h:303
Diligent::PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of three control point patches. D3D counterpart: D3D_PRIMITIVE_T...
Definition: DeviceContext.h:87
Diligent::PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP
Interpret the vertex data as a triangle strip. D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP...
Definition: DeviceContext.h:67
Diligent::IDeviceContext::SetSwapChain
virtual void SetSwapChain(ISwapChain *pSwapChain)=0
Sets the swap chain in the device context.
Diligent::DispatchComputeAttribs::ThreadGroupCountX
Uint32 ThreadGroupCountX
Number of groups dispatched in X direction.
Definition: DeviceContext.h:314
Diligent::PRIMITIVE_TOPOLOGY_NUM_TOPOLOGIES
Helper value that stores the total number of topologies in the enumeration.
Definition: DeviceContext.h:206
Diligent::Viewport::TopLeftY
Float32 TopLeftY
Y coordinate of the top boundary of the viewport. When defining a viewport, DirectX convention is use...
Definition: DeviceContext.h:385
Diligent::SET_VERTEX_BUFFERS_FLAG_RESET
Reset the vertex buffers to only the buffers specified in this call. All buffers previously bound to ...
Definition: DeviceContext.h:359
Diligent::PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of one control point patches. D3D counterpart: D3D_PRIMITIVE_TOP...
Definition: DeviceContext.h:79
Diligent::COMMIT_SHADER_RESOURCES_FLAG
COMMIT_SHADER_RESOURCES_FLAG
Defines allowed flags for IDeviceContext::CommitShaderResources() function.
Definition: DeviceContext.h:363
Diligent::PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
Interpret the vertex data as a list of triangles. D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_TRIANGLELI...
Definition: DeviceContext.h:63
Diligent::PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 29 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:191
Diligent::PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of two control point patches. D3D counterpart: D3D_PRIMITIVE_TOP...
Definition: DeviceContext.h:83
Diligent::PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 14 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:131
Diligent::PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of seven control point patches. D3D counterpart: D3D_PRIMITIVE_T...
Definition: DeviceContext.h:103
Diligent::DrawAttribs::IndirectDrawArgsOffset
Uint32 IndirectDrawArgsOffset
For indirect rendering, offset from the beginning of the buffer to the location of draw command attri...
Definition: DeviceContext.h:246
Diligent::DispatchComputeAttribs::pIndirectDispatchAttribs
IBuffer * pIndirectDispatchAttribs
Pointer to the buffer containing dispatch arguments. If not nullptr, then indirect dispatch command i...
Definition: DeviceContext.h:321
Diligent::PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 18 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:147
Diligent::DrawAttribs::IsIndexed
Bool IsIndexed
Indicates if index buffer will be used to index input vertices.
Definition: DeviceContext.h:229
Diligent::DrawAttribs::StartVertexLocation
Uint32 StartVertexLocation
For non-indexed rendering, LOCATION (or INDEX, but NOT the byte offset) of the first vertex in the ve...
Definition: DeviceContext.h:252
Diligent::DispatchComputeAttribs::ThreadGroupCountZ
Uint32 ThreadGroupCountZ
Number of groups dispatched in Z direction.
Definition: DeviceContext.h:316
Diligent::PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 27 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: DeviceContext.h:183
Diligent::IDeviceContext::ClearRenderTarget
virtual void ClearRenderTarget(ITextureView *pView, const float *RGBA=nullptr)=0
Clears a render target view.
Diligent::Viewport::MaxDepth
Float32 MaxDepth
Maximum depth of the viewport. Ranges between 0 and 1.
Definition: DeviceContext.h:397
Diligent::DrawAttribs::Topology
PRIMITIVE_TOPOLOGY Topology
Input primitive topology, see Diligent::PRIMITIVE_TOPOLOGY.
Definition: DeviceContext.h:215
Diligent::DrawAttribs::FirstIndexLocation
Uint32 FirstIndexLocation
For indexed rendering, LOCATION (NOT the byte offset) of the first index in the index buffer to start...
Definition: DeviceContext.h:256