0022819: Redesign of OpenGl driver
[occt.git] / src / OpenGl / OpenGl_togl_inquireplane.cxx
1 #define GER61454  /*GG 14-09-99 Activates the model clipping planes
2 // GG 110800  UNDER LINUX and MESA 3.2, nothing can be done until
3 //    gl context is open first.
4 */
5 #ifdef DEBUG
6 #include <stdio.h>
7 #endif
8
9 #include <OpenGl_tgl_all.hxx>
10
11 int EXPORT
12 call_togl_inquireplane ()
13 {
14   GLint maxplanes = 0;
15   if( GET_GL_CONTEXT() ) {
16 #ifdef GER61454
17     glGetIntegerv( GL_MAX_CLIP_PLANES, &maxplanes);
18     maxplanes -= 2;   /* NOTE the 2 first planes are reserved for ZClipping */
19     if( maxplanes < 0 ) 
20       maxplanes = 0;
21 #endif
22   }
23 #ifdef DEBUG
24   printf(" @@@ call_togl_inquireplane. GL_MAX_CLIP_PLANES is %d\n",maxplanes);
25 #endif
26   return maxplanes;
27 }