1 // 2 // Copyright 2014 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 7 // BufferImpl.h: Defines the abstract rx::BufferImpl class. 8 9 #ifndef LIBGLESV2_RENDERER_BUFFERIMPL_H_ 10 #define LIBGLESV2_RENDERER_BUFFERIMPL_H_ 11 12 #include "common/angleutils.h" 13 #include "libGLESv2/Buffer.h" 14 15 namespace rx 16 { 17 18 class BufferImpl 19 { 20 public: 21 virtual ~BufferImpl() { } 22 23 virtual gl::Error setData(const void* data, size_t size, GLenum usage) = 0; 24 virtual void *getData() = 0; 25 virtual gl::Error setSubData(const void* data, size_t size, size_t offset) = 0; 26 virtual gl::Error copySubData(BufferImpl* source, GLintptr sourceOffset, GLintptr destOffset, GLsizeiptr size) = 0; 27 virtual gl::Error map(size_t offset, size_t length, GLbitfield access, GLvoid **mapPtr) = 0; 28 virtual gl::Error unmap() = 0; 29 virtual void markTransformFeedbackUsage() = 0; 30 }; 31 32 } 33 34 #endif // LIBGLESV2_RENDERER_BUFFERIMPL_H_ 35