CmGLGpuBuffer.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. }
  13. void* GLGpuBuffer::lock(UINT32 offset, UINT32 length, GpuLockOptions options)
  14. {
  15. return nullptr;
  16. }
  17. void GLGpuBuffer::unlock()
  18. {
  19. }
  20. void GLGpuBuffer::readData(UINT32 offset, UINT32 length, void* pDest)
  21. {
  22. }
  23. void GLGpuBuffer::writeData(UINT32 offset, UINT32 length, const void* pSource, bool discardWholeBuffer)
  24. {
  25. }
  26. void GLGpuBuffer::copyData(GpuBuffer& srcBuffer, UINT32 srcOffset,
  27. UINT32 dstOffset, UINT32 length, bool discardWholeBuffer)
  28. {
  29. }
  30. GpuBufferView* GLGpuBuffer::createView()
  31. {
  32. return nullptr;
  33. }
  34. void GLGpuBuffer::destroyView(GpuBufferView* view)
  35. {
  36. }
  37. void GLGpuBuffer::destroy_internal()
  38. {
  39. GpuBuffer::destroy_internal();
  40. }
  41. }