4 #include <bias_config.h>
5 #include <Base/Common/W32Compat.hh>
7 #ifndef BIAS_HAVE_OPENGL
8 # error Please recompile BIAS with USE_OPENGL to use ImgObjGL
9 #endif // BIAS_HAVE_OPENGL
19 #include <Base/Image/ImageBase.hh>
20 #include <Base/Image/Image.hh>
22 #define IMGOBJ_DEFAULT_MIPMAPPED false
23 #define IMGOBJ_IMMEDIATE_COPY_DEFAULT true
43 const unsigned int & widthBrutto,
44 const unsigned int & heightBrutto,
45 const GLenum & target=GL_TEXTURE_2D
52 static void InitGlew();
58 void DeleteGLTexture();
62 bool IsTexture2D()
const;
65 bool IsRectangleTexture()
const;
68 bool IsCubemap()
const;
76 const bool & forcePow2tex=
true,
77 const bool & flipY=
true,
78 const bool ImmediateCopyData=IMGOBJ_IMMEDIATE_COPY_DEFAULT );
80 void CreateGLCubemap(
const std::vector< BIAS::ImageBase * > cm,
81 const bool ImmediateCopyData=IMGOBJ_IMMEDIATE_COPY_DEFAULT,
82 const bool mipmapped=IMGOBJ_DEFAULT_MIPMAPPED );
86 const std::string & cm0PosX,
87 const std::string & cm1NegX,
88 const std::string & cm2PosY,
89 const std::string & cm3NegY,
90 const std::string & cm4PosZ,
91 const std::string & cm5NegZ,
92 const bool ImmediateCopyData=IMGOBJ_IMMEDIATE_COPY_DEFAULT,
93 const bool mipmapped=IMGOBJ_DEFAULT_MIPMAPPED );
97 const std::vector< std::string > cmFilenames,
98 const bool ImmediateCopyData=IMGOBJ_IMMEDIATE_COPY_DEFAULT,
99 const bool mipmapped=IMGOBJ_DEFAULT_MIPMAPPED );
104 void CreateGLCubemapEmpty(
const unsigned int w,
const unsigned int h,
105 GLint gpu_internalFmt=GL_RGBA,
106 const bool & mipmapped=
false);
110 void SetTargetPOW2();
112 void SetTargetRECT();
113 void SetTargetCUBE();
117 const unsigned int & ByteDepth );
121 const unsigned int & channelcount );
124 static GLint GetGLInternalFormat(
127 const unsigned int & channelcount,
128 const unsigned int & ByteDepth,
129 const unsigned int & BitDepth );
EColorModel
These are the most often used color models.
BIAS::ImageBase * p_valueImage
unsigned int heightBrutto
bool p_valueImage_SelfAllocated
data holder describing OpenGL texture objects in addition to its unique texID.
This is the base class for images in BIAS.