CmGLGpuBuffer.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include "CmGLGpuBuffer.h"
  2. #include "CmDebug.h"
  3. namespace CamelotEngine
  4. {
  5. GLGpuBuffer::GLGpuBuffer(UINT32 elementCount, UINT32 elementSize, GpuBufferType type, GpuBufferUsage usage, bool randomGpuWrite, bool useCounter)
  6. : GpuBuffer(elementCount, elementSize, type, usage, randomGpuWrite, useCounter)
  7. {
  8. LOGWRN("Generic buffers are not supported in OpenGL. Creating a dummy buffer. All operations on it will either be no-op or return a nullptr.");
  9. }
  10. GLGpuBuffer::~GLGpuBuffer()
  11. {
  12. clearBufferViews();
  13. }
  14. void* GLGpuBuffer::lock(UINT32 offset, UINT32 length, GpuLockOptions options)
  15. {
  16. return nullptr;
  17. }
  18. void GLGpuBuffer::unlock()
  19. {
  20. }
  21. void GLGpuBuffer::readData(UINT32 offset, UINT32 length, void* pDest)
  22. {
  23. }
  24. void GLGpuBuffer::writeData(UINT32 offset, UINT32 length, const void* pSource, bool discardWholeBuffer)
  25. {
  26. }
  27. void GLGpuBuffer::copyData(GpuBuffer& srcBuffer, UINT32 srcOffset,
  28. UINT32 dstOffset, UINT32 length, bool discardWholeBuffer)
  29. {
  30. }
  31. GpuBufferView* GLGpuBuffer::createView()
  32. {
  33. return nullptr;
  34. }
  35. void GLGpuBuffer::destroyView(GpuBufferView* view)
  36. {
  37. }
  38. }