0022337: V3d_View::Print crashes in OCCT 6.5.0
[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>
10#include <OpenGl_tgl.hxx>
11
12int EXPORT
13call_togl_inquireplane ()
14{
15 GLint maxplanes = 0;
16 if( GET_GL_CONTEXT() ) {
17#ifdef GER61454
18 glGetIntegerv( GL_MAX_CLIP_PLANES, &maxplanes);
19 maxplanes -= 2; /* NOTE the 2 first planes are reserved for ZClipping */
20 if( maxplanes < 0 )
21 maxplanes = 0;
22 call_facilities_list.MaxPlanes = maxplanes;
23#endif
24 }
25#ifdef DEBUG
26 printf(" @@@ call_togl_inquireplane. GL_MAX_CLIP_PLANES is %d\n",maxplanes);
27#endif
28 return maxplanes;
29}