1 #ifndef __GeometryGL_hh__
2 #define __GeometryGL_hh__
8 #include <bias_config.h>
10 #ifndef BIAS_HAVE_OPENGL
11 # error Please recompile BIAS with USE_OPENGL to use this lib.
12 #endif // BIAS_HAVE_OPENGL
19 #include <Base/Math/Vector3.hh>
20 #include <Geometry/PMatrix.hh>
22 #include <Gui/ImgObjGL.hh>
23 #include <Gui/RenderModeGL.hh>
25 #ifdef BIAS_HAVE_FONTGL
26 # include <Utils/DrawTextGL.hh>
27 #endif // BIAS_HAVE_FONTGL
31 # define VISIBLEALPHA 0.0
35 #define MAX_GL_DISPLIST_ID 1000
36 #define MAX_GL_TEXOBJ_ID 1000
67 static void DisplayClear(
const GLbitfield & mask=CLEAR_DEFAULT_MASK );
73 static void DisplayCoordCross(
const float & size=1.0f,
74 const float & linewidth=1.0f );
76 #ifdef BIAS_HAVE_FONTGL
78 static void DisplayCoordCrossAxesLabel(
const float & size,
80 const std::string & LabelX=std::string(
"x"),
81 const std::string & LabelY=std::string(
"y"),
82 const std::string & LabelZ=std::string(
"z") );
85 static void DisplayCoordCross(
const float & size,
86 const float & linewidth,
88 const std::string & LabelX=std::string(
"x"),
89 const std::string & LabelY=std::string(
"y"),
90 const std::string & LabelZ=std::string(
"z") );
94 static void DisplayCameraInternalParams(
97 const unsigned int & width,
98 const unsigned int & height,
101 const float & zFar );
110 static void GetInfoGL(std::ostream & os);
112 static void GetInfoGLenvironment(std::ostream & os);
113 static void GetInfoGLTexID(
const GLint
id,
int & foundTextures, std::ostream & os,
const bool & noOutputIfInvalid=
true);
114 static void GetInfoGLTexObjects(std::ostream & os);
115 static void GetInfoGLDisplayLists(std::ostream & os);
116 static void GetInfoGLmatrices(std::ostream & os);
117 static void GetInfoGLWriteMasks(std::ostream & os);
120 static std::string GetName(
const GLint flag,
121 const bool withNumericDisplay=
true,
122 const bool numerixHexFormat=
true);
125 ,
const unsigned int & width
126 ,
const unsigned int & height
127 ,
const unsigned int & corner
128 ,
const double & scale );
131 ,
const unsigned int & h
132 ,
const unsigned int & corner
137 ,
const unsigned int & w
138 ,
const unsigned int & h
139 ,
const double & scale
140 ,
const float & linewidth=1.0f );
143 static void DisplaySimpleAnimation(
const double & time);
146 static void DisplaySceneExampleSimple();
150 ,
const unsigned int & w
151 ,
const unsigned int & h
153 ,
const int & texTarget
154 ,
const double & scale
164 ,
const unsigned int w
165 ,
const unsigned int h
166 ,
const bool & useRECTcoord=
false );
169 const bool & additionalFlipY );
171 static void DisplayQuadTexCoord2DFull(
const BIAS::ImgObjGL & texobj,
172 const bool & additionalFlipY);
176 static void CreateSampleDisplayListScene(
int & dplistID);
179 static void DisplayCallsSampleDisplayListScene(
const double & curTime);
182 static void FillCubemap(
BIAS::ImgObjGL & im,
const bool & mipmapColorChange=
false);
data holder describing OpenGL texture objects in addition to its unique texID.
GLRenderMode describes mode for rendering.
describes a projective 3D -> 2D mapping in homogenous coordinates
Reusable Geometry an drawing functions for OpenGL.
Draw text to OpenGL as 2D bitmap font.