Overte C++ Documentation
Resource.h
1
//
2
// Resource.h
3
// libraries/gpu/src/gpu
4
//
5
// Created by Sam Gateau on 10/8/2014.
6
// Copyright 2014 High Fidelity, Inc.
7
//
8
// Distributed under the Apache License, Version 2.0.
9
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10
//
11
#ifndef hifi_gpu_Resource_h
12
#define hifi_gpu_Resource_h
13
14
#include "Forward.h"
15
16
namespace
gpu {
17
18
class
Resource
{
19
public
:
20
using
Size = gpu::Size;
21
static
const
Size NOT_ALLOCATED = INVALID_SIZE;
22
23
// The size in bytes of data stored in the resource
24
virtual
Size getSize()
const
= 0;
25
26
enum
Type {
27
BUFFER = 0,
28
TEXTURE_1D,
29
TEXTURE_2D,
30
TEXTURE_3D,
31
TEXTURE_CUBE,
32
TEXTURE_1D_ARRAY,
33
TEXTURE_2D_ARRAY,
34
TEXTURE_3D_ARRAY,
35
TEXTURE_CUBE_ARRAY,
36
};
37
38
protected
:
39
Resource
();
40
virtual
~
Resource
();
41
};
// Resource
42
43
}
44
45
46
// FIXME Compatibility with headers that rely on Resource.h for the buffer and buffer view definitions
47
#include "Buffer.h"
48
49
50
#endif
Resource
Base class for resources.
Definition:
ResourceCache.h:409
libraries
gpu
src
gpu
Resource.h
Generated by
1.9.1