Unofficial OpenGL Software Development Kit  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members | Public Member Functions | Public Attributes
glimg::UncheckedImageFormat Struct Reference

#include <ImageFormat.h>

Represents a potentially valid image format.

This struct stores the component information and other data that defines an image format. Not all combinations are valid image formats; there are functions to test validity. All of the APIs explicitly use ImageFormat instead of this type; that class's constructors will thrown an InvalidFormatException if the combination of values is not valid. So you are strongly encouraged to use that class directly.

Public Member Functions

std::string ValidateFormatText () const
 Determines if the values set into this ImageFormat are valid. More...
 
bool ValidateFormat () const
 As ValidateFormatText, only returns true if valid and false otherwise.
 

Public Attributes

PixelDataType eType
 The type of pixel data.
 
PixelComponents eFormat
 The components stored by a pixel.
 
ComponentOrder eOrder
 The order of the components of the pixel.
 
Bitdepth eBitdepth
 The bitdepth of each pixel component.
 
int lineAlignment
 The byte alignment of a horizontal line of pixel data.
 

Member Function Documentation

std::string glimg::UncheckedImageFormat::ValidateFormatText ( ) const

Determines if the values set into this ImageFormat are valid.

The ImageFormat object has no constructor, and therefore you could conceivably use any combination of parameters. However, there are specific constraints imposed on ImageFormat enumerators. If these constraints fail, then an error results.

For details on the specifics of validation, see Image Format Validation Rules.

Returns
An empty string if the ImageFormat is valid, and an error message if it is not.

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