50 #ifndef GL_FORMATINFO_HH 51 #define GL_FORMATINFO_HH 57 #include <ACG/GL/acg_glew.hh> 58 #include <ACG/GL/gl.hh> 79 int channelSize(
int i = 0)
const {assert(i >= 0 && i < channelCount_);
return channelBits_[i] >> 3;}
82 int channelBits(
int i)
const {assert(i >= 0 && i < channelCount_);
return channelBits_[i];}
85 int channelCount()
const {
return channelCount_;}
88 int elemSize()
const {
return bpp_ >> 3;}
91 int bpp()
const {
return bpp_;}
94 GLenum internalFormat()
const {
return internalFormat_;}
97 GLenum format()
const {
return format_;}
100 GLenum type()
const {
return type_;}
103 bool isNormalized()
const {
return normalized_;}
113 bool isFloat()
const {
return baseType_ == FloatingPt;}
114 bool isUint()
const {
return baseType_ == UnsignedInt;}
115 bool isInt()
const {
return baseType_ == SignedInt;}
117 bool isValid()
const {
return bpp_ != 0;}
119 BaseType baseType()
const {
return baseType_;}
122 const char* sizedFormatString()
const {
return sizedName_;}
125 GLFormatInfo( GLenum _intfmt, GLenum _fmt, GLenum _type,
int _r,
int _g,
int _b,
int _a, BaseType _bt,
bool _nrm);
126 static void registerFmt(GLenum _intfmt, GLenum _fmt, GLenum _type,
int _r,
int _g,
int _b,
int _a, BaseType _bt,
bool _nrm);
128 GLenum internalFormat_,
145 static std::map<GLenum, GLFormatInfo> formatMap_;
152 #endif // GL_FORMATINFO_HH defined
Namespace providing different geometric functions concerning angles.