Subversion Repository Public Repository

Divide-Framework

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

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

Diff revisions: vs.
  @@ -40,12 +40,12 @@
40 40 class AtomicCounter : public RingBuffer
41 41 {
42 42 public:
43 - AtomicCounter(U32 sizeFactor, const char* name);
43 + AtomicCounter(GFXDevice& context, U32 sizeFactor, const char* name);
44 44 ~AtomicCounter();
45 45 glGenericBuffer* _buffer;
46 46 };
47 47
48 - AtomicCounter::AtomicCounter(U32 sizeFactor, const char* name)
48 + AtomicCounter::AtomicCounter(GFXDevice& context, U32 sizeFactor, const char* name)
49 49 : RingBuffer(sizeFactor)
50 50 {
51 51 BufferParams params;
  @@ -57,7 +57,7 @@
57 57 params._ringSizeFactor = sizeFactor;
58 58 params._data = NULL;
59 59
60 - _buffer = MemoryManager_NEW glGenericBuffer(params);
60 + _buffer = MemoryManager_NEW glGenericBuffer(context, params);
61 61 }
62 62
63 63 AtomicCounter::~AtomicCounter()
  @@ -82,7 +82,7 @@
82 82 implParams._initialData = descriptor._initialData;
83 83 implParams._target = _unbound ? GL_SHADER_STORAGE_BUFFER : GL_UNIFORM_BUFFER;
84 84
85 - _buffer = MemoryManager_NEW glBufferImpl(implParams);
85 + _buffer = MemoryManager_NEW glBufferImpl(context, implParams);
86 86 }
87 87
88 88 glUniformBuffer::~glUniformBuffer()
  @@ -155,7 +155,7 @@
155 155
156 156 void glUniformBuffer::addAtomicCounter(U32 sizeFactor) {
157 157 stringImpl name = Util::StringFormat("DVD_ATOMIC_BUFFER_%d_%d", getGUID(), _atomicCounters.size());
158 - _atomicCounters.emplace_back(MemoryManager_NEW AtomicCounter(std::max(sizeFactor, 1u), name.c_str()));
158 + _atomicCounters.emplace_back(MemoryManager_NEW AtomicCounter(_context, std::max(sizeFactor, 1u), name.c_str()));
159 159 }
160 160
161 161 U32 glUniformBuffer::getAtomicCounter(U32 counterIndex) {