-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBuffer.cpp
More file actions
46 lines (38 loc) · 1 KB
/
Buffer.cpp
File metadata and controls
46 lines (38 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "EngineCommon.h"
#include "Buffer.h"
#include <IFileSys.h>
X_NAMESPACE_BEGIN(render)
namespace shader
{
Buffer::Buffer(const char* pName, int16_t bindPoint, int16_t bindCount, BufferType::Enum type) :
name_(pName),
bindPoint_(bindPoint),
bindCount_(bindCount),
type_(type)
{
}
Buffer::Buffer(core::string& name, int16_t bindPoint, int16_t bindCount, BufferType::Enum type) :
name_(name),
bindPoint_(bindPoint),
bindCount_(bindCount),
type_(type)
{
}
bool Buffer::SSave(core::XFile* pFile) const
{
pFile->writeString(name_);
pFile->writeObj(bindPoint_);
pFile->writeObj(bindCount_);
pFile->writeObj(type_);
return true;
}
bool Buffer::SLoad(core::XFile* pFile)
{
pFile->readString(name_);
pFile->readObj(bindPoint_);
pFile->readObj(bindCount_);
pFile->readObj(type_);
return true;
}
} // namespace shader
X_NAMESPACE_END