summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.h
blob: 82ae577e23de655fe6d0fdb663d7bb9e94e76183 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

// BufferStorage9.h Defines the BufferStorage9 class.

#ifndef LIBGLESV2_RENDERER_BUFFERSTORAGE9_H_
#define LIBGLESV2_RENDERER_BUFFERSTORAGE9_H_

#include "libGLESv2/renderer/BufferStorage.h"

namespace rx
{

class BufferStorage9 : public BufferStorage
{
  public:
    BufferStorage9();
    virtual ~BufferStorage9();

    static BufferStorage9 *makeBufferStorage9(BufferStorage *bufferStorage);

    virtual void *getData();
    virtual void setData(const void* data, unsigned int size, unsigned int offset, unsigned int target = 0);
    virtual void clear();
    virtual unsigned int getSize() const;
    virtual bool supportsDirectBinding() const;

  private:
    DISALLOW_COPY_AND_ASSIGN(BufferStorage9);

    void *mMemory;
    unsigned int mAllocatedSize;

    unsigned int mSize;
};

}

#endif // LIBGLESV2_RENDERER_BUFFERSTORAGE9_H_