0022819: Redesign of OpenGl driver Additional integration
[occt.git] / src / OpenGl / OpenGl_togl_inquireplane.cxx
CommitLineData
7fd59977 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>
7fd59977 10
11int EXPORT
12call_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;
7fd59977 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}