mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 21:42:31 +02:00
Whitespace changes
This commit is contained in:
parent
19144e492c
commit
fe550aa69f
2 changed files with 22 additions and 22 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 <typename T>
|
||||
template <typename T>
|
||||
Size append(const T& t) {
|
||||
return append(sizeof(t), reinterpret_cast<const Byte*>(&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 <typename T> Iterator<T> begin() { return Iterator<T>(&edit<T>(0), _stride); }
|
||||
template <typename T> Iterator<T> end() { return Iterator<T>(&edit<T>(getNum<T>()), _stride); }
|
||||
#else
|
||||
#else
|
||||
template <typename T> Iterator<const T> begin() const { return Iterator<const T>(&get<T>(), _stride); }
|
||||
template <typename T> Iterator<const T> end() const {
|
||||
// reimplement get<T> without bounds checking
|
||||
|
@ -378,7 +378,7 @@ public:
|
|||
return *(reinterpret_cast<T*> (_buffer->editData() + elementOffset));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class T> class StructBuffer : public gpu::BufferView {
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue