GteStructuredBuffer.cpp
Go to the documentation of this file.
1 // David Eberly, Geometric Tools, Redmond WA 98052
2 // Copyright (c) 1998-2017
3 // Distributed under the Boost Software License, Version 1.0.
4 // http://www.boost.org/LICENSE_1_0.txt
5 // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6 // File Version: 3.0.0 (2016/06/19)
7 
8 #include <GTEnginePCH.h>
10 using namespace gte;
11 
12 
13 StructuredBuffer::StructuredBuffer(unsigned int numElements,
14  size_t elementSize, bool createStorage)
15  :
16  Buffer(numElements, elementSize, createStorage),
17  mCounterType(CT_NONE),
18  mKeepInternalCount(false)
19 {
21 }
22 
23 StructuredBuffer::CounterType StructuredBuffer::GetCounterType() const
24 {
25  return mCounterType;
26 }
27 
29 {
31  mUsage = SHADER_OUTPUT;
32 }
33 
35 {
36  mCounterType = CT_COUNTER;
37  mUsage = SHADER_OUTPUT;
38 }
39 
41 {
42  return mKeepInternalCount;
43 }
44 
45 void StructuredBuffer::SetKeepInternalCount(bool keepInternalCount)
46 {
47  if (mCounterType != CT_NONE)
48  {
49  mKeepInternalCount = keepInternalCount;
50  }
51 }
52 
CounterType GetCounterType() const
CT_APPEND_CONSUME
GraphicsObjectType mType
void SetKeepInternalCount(bool keepInternalCount)
bool GetKeepInternalCount() const
StructuredBuffer(unsigned int numElements, size_t elementSize, bool createStorage=true)
GT_STRUCTURED_BUFFER


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:01