Main Page
Namespaces
Classes
Files
File List
File Members
src
Graphics
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
>
9
#include <
Graphics/GteStructuredBuffer.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
{
20
mType
=
GT_STRUCTURED_BUFFER
;
21
}
22
23
StructuredBuffer::CounterType
StructuredBuffer::GetCounterType
()
const
24
{
25
return
mCounterType
;
26
}
27
28
void
StructuredBuffer::MakeAppendConsume
()
29
{
30
mCounterType
=
CT_APPEND_CONSUME
;
31
mUsage
= SHADER_OUTPUT;
32
}
33
34
void
StructuredBuffer::MakeCounter
()
35
{
36
mCounterType
= CT_COUNTER;
37
mUsage
= SHADER_OUTPUT;
38
}
39
40
bool
StructuredBuffer::GetKeepInternalCount
()
const
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
GteStructuredBuffer.h
gte::Resource::mUsage
Usage mUsage
Definition:
GteResource.h:97
gte::StructuredBuffer::mCounterType
CounterType mCounterType
Definition:
GteStructuredBuffer.h:54
gte::StructuredBuffer::GetCounterType
CounterType GetCounterType() const
Definition:
GteStructuredBuffer.cpp:23
CT_APPEND_CONSUME
CT_APPEND_CONSUME
Definition:
GteStructuredBuffer.h:24
gte::StructuredBuffer::MakeAppendConsume
void MakeAppendConsume()
Definition:
GteStructuredBuffer.cpp:28
GTEnginePCH.h
gte::GraphicsObject::mType
GraphicsObjectType mType
Definition:
GteGraphicsObject.h:156
gte::StructuredBuffer::SetKeepInternalCount
void SetKeepInternalCount(bool keepInternalCount)
Definition:
GteStructuredBuffer.cpp:45
gte::StructuredBuffer::GetKeepInternalCount
bool GetKeepInternalCount() const
Definition:
GteStructuredBuffer.cpp:40
gte
Definition:
GLX/GteWICFileIO.h:16
gte::StructuredBuffer::StructuredBuffer
StructuredBuffer(unsigned int numElements, size_t elementSize, bool createStorage=true)
Definition:
GteStructuredBuffer.cpp:13
GT_STRUCTURED_BUFFER
GT_STRUCTURED_BUFFER
Definition:
GteGraphicsObject.h:79
gte::Buffer
Definition:
GteBuffer.h:16
gte::StructuredBuffer::mKeepInternalCount
bool mKeepInternalCount
Definition:
GteStructuredBuffer.h:55
CT_NONE
CT_NONE
Definition:
GteStructuredBuffer.h:24
gte::StructuredBuffer::MakeCounter
void MakeCounter()
Definition:
GteStructuredBuffer.cpp:34
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:01