Browse Source

eeschema-gal: added EnableDepthTest() feature in GAL

pull/13/head
Tomasz Wlostowski 7 years ago
committed by Jeff Young
parent
commit
f82f310dd5
  1. 5
      common/gal/cairo/cairo_gal.cpp
  2. 10
      common/gal/opengl/opengl_gal.cpp
  3. 2
      include/gal/cairo/cairo_gal.h
  4. 2
      include/gal/graphics_abstraction_layer.h
  5. 2
      include/gal/opengl/opengl_gal.h

5
common/gal/cairo/cairo_gal.cpp

@ -1199,3 +1199,8 @@ unsigned int CAIRO_GAL::getNewGroupNumber()
return groupCounter++;
}
void CAIRO_GAL::EnableDepthTest( bool aEnabled )
{
}

10
common/gal/opengl/opengl_gal.cpp

@ -2065,3 +2065,13 @@ static void InitTesselatorCallbacks( GLUtesselator* aTesselator )
gluTessCallback( aTesselator, GLU_TESS_EDGE_FLAG, ( void (CALLBACK*)() )EdgeCallback );
gluTessCallback( aTesselator, GLU_TESS_ERROR, ( void (CALLBACK*)() )ErrorCallback );
}
void OPENGL_GAL::EnableDepthTest( bool aEnabled )
{
if( aEnabled )
glEnable( GL_DEPTH_TEST );
else
{
glDisable( GL_DEPTH_TEST );
}
}

2
include/gal/cairo/cairo_gal.h

@ -278,6 +278,8 @@ public:
paintListener = aPaintListener;
}
virtual void EnableDepthTest( bool aEnabled = false ) override;
protected:
virtual void drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) override;

2
include/gal/graphics_abstraction_layer.h

@ -988,6 +988,8 @@ public:
depthStack.pop();
}
virtual void EnableDepthTest( bool aEnabled = false ) {};
static const double METRIC_UNIT_LENGTH;
protected:

2
include/gal/opengl/opengl_gal.h

@ -276,6 +276,8 @@ public:
paintListener = aPaintListener;
}
virtual void EnableDepthTest( bool aEnabled = false ) override;
///< Parameters passed to the GLU tesselator
typedef struct
{

Loading…
Cancel
Save