Unofficial OpenGL Software Development Kit: glimg::ImageSet Class Reference

Unofficial OpenGL Software Development Kit 0.5.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members | Public Member Functions | Friends
glimg::ImageSet Class Reference
ImageSet

`#include <ImageSet.h>`

##

Represents a set of images that can be stored in a texture object.

This class represents the full range of possible image layouts with regard to texture objects. All images in the ImageSet use the same format.

The images in an ImageSet are named by a triple of numbers: mipmap level, array index, and face index. The maximum number of each of these is queriable. The size of the ImageSet is the size of all images from mipmap level 0. Each mipmap will have the same number of array indices and faces.

Faces represent the faces of a cubemap. So for non-cubemap textures, GetFaceCount will return 1. The order of the faces in the cubemap is the same as the order of the faces for ARB_texture_cube_map_array extension. That is, the order of the GL_TEXTURE_CUBE_MAP_* enumerators.

Array indices represent images that go into an array texture. Array-cubemap textures are arranged in memory as specified in the ARB_texture_cube_map_array extension.

This object uses reference semantics. Every copy of it will refer to the same image data.

## Public Member Functions

Dimensions | GetDimensions () const
| Returns the dimensionality of the base mipmap image.
int | GetMipmapCount () const
| Returns the number of mipmap levels the image set contains. More...
int | GetArrayCount () const
| Returns the number of array images this image set has. More...
int | GetFaceCount () const
| Returns the number of faces in the image set. More...
ImageFormat | GetFormat () const
| Retrieves the image format that describes all images in this ImageSet.
SingleImage | GetImage (int mipmapLevel, int arrayIx=0, int faceIx=0) const
| Retrieves the image at the given mipmap level, array index, and face index. More...
const void * | GetImageArray (int mipmapLevel) const
| Retrieves a pointer to the full array data for the entire mipmap level. More...

## Friends

void | CreateTexture (unsigned int textureName, const ImageSet *pImage, unsigned int forceConvertBits)
| As CreateTexture(const ImageSet *, unsigned int), but with a texture object provided by the user. More...

## Member Function Documentation

int glimg::ImageSet::GetArrayCount | ( |  | ) | const

Returns the number of array images this image set has.

This function will return the number of array images in the image set. The minimum is 1.

This API makes no distinction between an array of length 1 and a non-array texture. If such a distinction needs to be made, it should be made in the uploading of the image's data, not in the ImageSet.

int glimg::ImageSet::GetFaceCount | ( |  | ) | const

Returns the number of faces in the image set.

Returns
  The number of faces in the image set. It will be 1 for regular images, and 6 for cubemaps and cubemap arrays.

SingleImage glimg::ImageSet::GetImage | ( | int | mipmapLevel,
|  | int | arrayIx = `0`,
|  | int | faceIx = `0`
| ) |  | const

Retrieves the image at the given mipmap level, array index, and face index.

Returns
  A reference to the image. As long as this object or a SingleImage that references this object exists, the image data will continue to exist.

const void* glimg::ImageSet::GetImageArray | ( | int | mipmapLevel | ) | const

Retrieves a pointer to the full array data for the entire mipmap level.

This data is formatted explicitly for use with array textures and cubemap-array textures.

Returns
  A pointer to the image data. DO NOT DELETE THIS POINTER. Also, do not use this pointer after this object is destroyed.

int glimg::ImageSet::GetMipmapCount | ( |  | ) | const

Returns the number of mipmap levels the image set contains.

Returns
  The number of mipmap levels in the image set. The minimum is 1.

## Friends And Related Function Documentation

void CreateTexture | ( | unsigned int | textureName,
|  | const ImageSet * | pImage,
|  | unsigned int | forceConvertBits
| ) |  |

friend

As CreateTexture(const ImageSet *, unsigned int), but with a texture object provided by the user.

The given texture object must not have been used at all. You cannot even have bound it to the OpenGL context once. It should be fresh from `glGenTextures`.

Exceptions

  ... | Everything that CreateTexture(const ImageSet *, unsigned int) throws.

The documentation for this class was generated from the following file:

- C:/Projects/distro/glsdk_0_5_1/glimg/include/glimg/ImageSet.h