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.
7 // ImageIndex.h: A helper struct for indexing into an Image array
9 #ifndef LIBGLESV2_IMAGE_INDEX_H_
10 #define LIBGLESV2_IMAGE_INDEX_H_
23 ImageIndex(const ImageIndex &other);
24 ImageIndex &operator=(const ImageIndex &other);
26 bool hasLayer() const { return layerIndex != ENTIRE_LEVEL; }
28 static ImageIndex Make2D(GLint mipIndex);
29 static ImageIndex MakeCube(GLenum target, GLint mipIndex);
30 static ImageIndex Make2DArray(GLint mipIndex, GLint layerIndex);
31 static ImageIndex Make3D(GLint mipIndex, GLint layerIndex = ENTIRE_LEVEL);
33 static const GLint ENTIRE_LEVEL = static_cast<GLint>(-1);
36 ImageIndex(GLenum typeIn, GLint mipIndexIn, GLint layerIndexIn);
41 #endif // LIBGLESV2_IMAGE_INDEX_H_