Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 893 vs 895 for /trunk/Source Code/Platform/Video/OpenGL/Buffers/ShaderBuffer/glUniformBuffer.cpp

Diff revisions: vs.
  @@ -36,6 +36,7 @@
36 36 return true;
37 37 }
38 38 };
39 +
39 40 class AtomicCounter : public RingBuffer
40 41 {
41 42 public:
  @@ -94,9 +95,9 @@
94 95 return _buffer->bufferID();
95 96 }
96 97
97 - void glUniformBuffer::getData(ptrdiff_t offsetElementCount,
98 - ptrdiff_t rangeElementCount,
99 - bufferPtr result) const {
98 + void glUniformBuffer::readData(ptrdiff_t offsetElementCount,
99 + ptrdiff_t rangeElementCount,
100 + bufferPtr result) const {
100 101
101 102 if (rangeElementCount > 0) {
102 103 ptrdiff_t range = rangeElementCount * _primitiveSize;
  @@ -112,9 +113,9 @@
112 113 }
113 114 }
114 115
115 - void glUniformBuffer::updateData(ptrdiff_t offsetElementCount,
116 - ptrdiff_t rangeElementCount,
117 - const bufferPtr data) {
116 + void glUniformBuffer::writeData(ptrdiff_t offsetElementCount,
117 + ptrdiff_t rangeElementCount,
118 + const bufferPtr data) {
118 119
119 120 if (rangeElementCount == 0) {
120 121 return;
  @@ -133,7 +134,7 @@
133 134
134 135 offset += queueWriteIndex() * _allignedBufferSize;
135 136
136 - _buffer->updateData(offset, range, data);
137 + _buffer->writeData(offset, range, data);
137 138 }
138 139
139 140 bool glUniformBuffer::bindRange(U32 bindIndex, U32 offsetElementCount, U32 rangeElementCount) {
  @@ -187,7 +188,7 @@
187 188 }
188 189 constexpr U32 defaultValue = 0;
189 190 AtomicCounter* counter = _atomicCounters.at(counterIndex);
190 - counter->_buffer->updateData(1, 0, counter->queueWriteIndex(), (bufferPtr)(&defaultValue));
191 + counter->_buffer->writeData(1, 0, counter->queueWriteIndex(), (bufferPtr)(&defaultValue));
191 192 }
192 193
193 194 void glUniformBuffer::printInfo(const ShaderProgram* shaderProgram,