59 #ifndef GL_FORMATINFO_HH 60 #define GL_FORMATINFO_HH 66 #include <ACG/GL/gl.hh> 87 int channelSize(
int i = 0)
const {assert(i >= 0 && i < channelCount_);
return channelBits_[i] >> 3;}
90 int channelBits(
int i)
const {assert(i >= 0 && i < channelCount_);
return channelBits_[i];}
93 int channelCount()
const {
return channelCount_;}
96 int elemSize()
const {
return bpp_ >> 3;}
99 int bpp()
const {
return bpp_;}
102 GLenum internalFormat()
const {
return internalFormat_;}
105 GLenum format()
const {
return format_;}
108 GLenum type()
const {
return type_;}
111 bool isNormalized()
const {
return normalized_;}
121 bool isFloat()
const {
return baseType_ == FloatingPt;}
122 bool isUint()
const {
return baseType_ == UnsignedInt;}
123 bool isInt()
const {
return baseType_ == SignedInt;}
125 bool isValid()
const {
return bpp_ != 0;}
127 BaseType baseType()
const {
return baseType_;}
130 const char* sizedFormatString()
const {
return sizedName_;}
133 GLFormatInfo( GLenum _intfmt, GLenum _fmt, GLenum _type,
int _r,
int _g,
int _b,
int _a, BaseType _bt,
bool _nrm);
134 static void registerFmt(GLenum _intfmt, GLenum _fmt, GLenum _type,
int _r,
int _g,
int _b,
int _a, BaseType _bt,
bool _nrm);
136 GLenum internalFormat_,
153 static std::map<GLenum, GLFormatInfo> formatMap_;
160 #endif // GL_FORMATINFO_HH defined
Namespace providing different geometric functions concerning angles.