diff --git a/libraries/gpu/src/gpu/Batch.h b/libraries/gpu/src/gpu/Batch.h index be04f08e41..893dbba81c 100644 --- a/libraries/gpu/src/gpu/Batch.h +++ b/libraries/gpu/src/gpu/Batch.h @@ -30,11 +30,11 @@ class QDebug; #define BATCH_PREALLOCATE_MIN 128 namespace gpu { -// The named batch data provides a mechanism for accumulating data into buffers over the course -// of many independent calls. For instance, two objects in the scene might both want to render +// The named batch data provides a mechanism for accumulating data into buffers over the course +// of many independent calls. For instance, two objects in the scene might both want to render // a simple box, but are otherwise unaware of each other. The common code that they call to render -// the box can create buffers to store the rendering parameters for each box and register a function -// that will be called with the accumulated buffer data when the batch commands are finally +// the box can create buffers to store the rendering parameters for each box and register a function +// that will be called with the accumulated buffer data when the batch commands are finally // executed against the backend @@ -100,15 +100,15 @@ public: void clear(); // Batches may need to override the context level stereo settings - // if they're performing framebuffer copy operations, like the + // if they're performing framebuffer copy operations, like the // deferred lighting resolution mechanism void enableStereo(bool enable = true); bool isStereoEnabled() const; - // Stereo batches will pre-translate the view matrix, but this isn't - // appropriate for skyboxes or other things intended to be drawn at - // infinite distance, so provide a mechanism to render in stereo - // without the pre-translation of the view. + // Stereo batches will pre-translate the view matrix, but this isn't + // appropriate for skyboxes or other things intended to be drawn at + // infinite distance, so provide a mechanism to render in stereo + // without the pre-translation of the view. void enableSkybox(bool enable = true); bool isSkyboxEnabled() const; @@ -147,7 +147,7 @@ public: // Indirect buffer is used by the multiDrawXXXIndirect calls // The indirect buffer contains the command descriptions to execute multiple drawcalls in a single call void setIndirectBuffer(const BufferPointer& buffer, Offset offset = 0, Offset stride = 0); - + // multi command desctription for multiDrawIndexedIndirect class DrawIndirectCommand { public: @@ -248,7 +248,7 @@ public: void popProfileRange(); // TODO: As long as we have gl calls explicitely issued from interface - // code, we need to be able to record and batch these calls. THe long + // code, we need to be able to record and batch these calls. THe long // term strategy is to get rid of any GL calls in favor of the HIFI GPU API // For now, instead of calling the raw gl Call, use the equivalent call on the batch so the call is beeing recorded // THe implementation of these functions is in GLBackend.cpp @@ -348,7 +348,7 @@ public: COMMAND_stopNamedCall, // TODO: As long as we have gl calls explicitely issued from interface - // code, we need to be able to record and batch these calls. THe long + // code, we need to be able to record and batch these calls. THe long // term strategy is to get rid of any GL calls in favor of the HIFI GPU API COMMAND_glUniform1i, COMMAND_glUniform1f, @@ -377,7 +377,7 @@ public: union { #if (QT_POINTER_SIZE == 8) size_t _size; -#endif +#endif int32 _int; uint32 _uint; float _float; @@ -385,7 +385,7 @@ public: }; #if (QT_POINTER_SIZE == 8) Param(size_t val) : _size(val) {} -#endif +#endif Param(int32 val) : _int(val) {} Param(uint32 val) : _uint(val) {} Param(float val) : _float(val) {} @@ -569,7 +569,7 @@ private: #else -#define PROFILE_RANGE_BATCH(batch, name) +#define PROFILE_RANGE_BATCH(batch, name) #endif diff --git a/libraries/gpu/src/gpu/Buffer.h b/libraries/gpu/src/gpu/Buffer.h index 49eed80b54..666feb9a98 100644 --- a/libraries/gpu/src/gpu/Buffer.h +++ b/libraries/gpu/src/gpu/Buffer.h @@ -60,7 +60,7 @@ public: Size getNumTypedElements() const { return getSize() / sizeof(T); }; const Byte* getData() const { return getSysmem().readData(); } - + // Resize the buffer // Keep previous data [0 to min(pSize, mSize)] Size resize(Size pSize); @@ -95,7 +95,7 @@ public: // \return the number of bytes copied Size append(Size size, const Byte* data); - template + template Size append(const T& t) { return append(sizeof(t), reinterpret_cast(&t)); } @@ -110,10 +110,10 @@ public: const GPUObjectPointer gpuObject {}; - + // Access the sysmem object, limited to ourselves and GPUObject derived classes const Sysmem& getSysmem() const { return _sysmem; } - + bool isDirty() const { return _pages(PageManager::DIRTY); } @@ -127,7 +127,7 @@ protected: // For use by the render thread to avoid the intermediate step of getUpdate/applyUpdate void flush() const; - // FIXME don't maintain a second buffer continuously. We should be able to apply updates + // FIXME don't maintain a second buffer continuously. We should be able to apply updates // directly to the GL object and discard _renderSysmem and _renderPages mutable PageManager _renderPages; mutable Sysmem _renderSysmem; @@ -292,7 +292,7 @@ public: // Direct memory access to the buffer contents is incompatible with the paging memory scheme template Iterator begin() { return Iterator(&edit(0), _stride); } template Iterator end() { return Iterator(&edit(getNum()), _stride); } -#else +#else template Iterator begin() const { return Iterator(&get(), _stride); } template Iterator end() const { // reimplement get without bounds checking @@ -378,7 +378,7 @@ public: return *(reinterpret_cast (_buffer->editData() + elementOffset)); } }; - + template class StructBuffer : public gpu::BufferView { public: