myZClip(myDefaultZClip),
myExtra(myDefaultExtra),
myFog(myDefaultFog),
+ myTrihedron(NULL),
+ myGraduatedTrihedron(NULL),
myVisualization(AContext.Visualization),
myIntShadingMethod(TEL_SM_GOURAUD),
myAntiAliasing(Standard_False),
myTransPers(&myDefaultTransPers),
- myIsTransPers(Standard_False)
+ myIsTransPers(Standard_False)
{
// Initialize matrices
memcpy(myOrientationMatrix,myDefaultMatrix,sizeof(Tmatrix3));
{
OpenGl_Element::Destroy (theCtx, myTrihedron);
OpenGl_Element::Destroy (theCtx, myGraduatedTrihedron);
+
if (!myTextureEnv.IsNull())
{
theCtx->DelayedRelease (myTextureEnv);
myTextureEnv = new OpenGl_Texture (theTexture->GetParams());
Handle(Image_PixMap) anImage = theTexture->GetImage();
- myTextureEnv->Init (theCtx, *anImage.operator->(), theTexture->Type());
+ if( !anImage.IsNull())
+ myTextureEnv->Init (theCtx, *anImage.operator->(), theTexture->Type());
}
/*----------------------------------------------------------------------*/
for ( ; i < nb_lights; i++, alight++ )
{
OpenGl_Light rep;
+ memset(&rep,0,sizeof(rep));
switch( alight->LightType )
{
/*----------------------------------------------------------------------*/
-//call_togl_setplane
-void OpenGl_View::SetClippingPlanes (const CALL_DEF_VIEWCONTEXT &AContext)
-{
- // clear clipping planes information
- myClippingPlanes.Clear();
- // update information
- int i = 0;
- for (; i < AContext.NbActivePlane; i++)
- {
- const CALL_DEF_PLANE &aCPlane = AContext.ActivePlane[i];
- if ( aCPlane.Active && aCPlane.PlaneId > 0 )
- {
- OPENGL_CLIP_REP aPlane;
- aPlane.equation[0] = aCPlane.CoefA;
- aPlane.equation[1] = aCPlane.CoefB;
- aPlane.equation[2] = aCPlane.CoefC;
- aPlane.equation[3] = aCPlane.CoefD;
- myClippingPlanes.Append( aPlane );
- }
- }
-}
-
-/*----------------------------------------------------------------------*/
-
//call_togl_setvisualisation
void OpenGl_View::SetVisualisation (const CALL_DEF_VIEWCONTEXT &AContext)
{