Commit 4f991329 authored by Mikhail Karpenko's avatar Mikhail Karpenko
Browse files

Merge branch 'master' into teardrops

parents c5973eb8 7eaceffd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ install_manifest.txt
Documentation/doxygen
Documentation/development/doxygen
*.bak
.*.swp
*.~*
common/pcb_plot_params_keywords.cpp
include/pcb_plot_params_lexer.h
pcbnew/specctra_keywords.cpp
+5 −3
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList ) :
    m_ZBottom = 0.0;
    m_ZTop = 0.0;

    m_lightPos = S3D_VERTEX(0.0f, 0.0f, 50.0f);
    m_lightPos = S3D_VERTEX(0.0f, 0.0f, 30.0f);

    // Clear all gl list identifiers:
    for( int ii = GL_ID_BEGIN; ii < GL_ID_END; ii++ )
@@ -496,7 +496,7 @@ void EDA_3D_CANVAS::DisplayStatus()
    msg.Printf( wxT( "dy %3.2f" ), m_draw3dOffset.y );
    Parent()->SetStatusText( msg, 2 );

    msg.Printf( wxT( "View: %3.1f" ), 45 * GetPrm3DVisu().m_Zoom );
    msg.Printf( _( "Zoom: %3.1f" ), 45 * GetPrm3DVisu().m_Zoom );
    Parent()->SetStatusText( msg, 3 );
}

@@ -591,7 +591,7 @@ void EDA_3D_CANVAS::SetLights()
    light_color[3] = 1.0;

    // Light above the xy plane
    light_color[0] = light_color[1] = light_color[2] = 0.2;
    light_color[0] = light_color[1] = light_color[2] = 0.0;
    glLightfv( GL_LIGHT0, GL_AMBIENT, light_color );

    light_color[0] = light_color[1] = light_color[2] = 1.0;
@@ -605,6 +605,8 @@ void EDA_3D_CANVAS::SetLights()
    light_color[0] = light_color[1] = light_color[2] = 0.2;
    glLightModelfv( GL_LIGHT_MODEL_AMBIENT, light_color );

    glLightModeli( GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE );

    glEnable( GL_LIGHT0 );      // White spot on Z axis ( top )
    glEnable( GL_LIGHTING );
}
+26 −15
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@
class BOARD_DESIGN_SETTINGS;
class EDA_3D_FRAME;
class CPOLYGONS_LIST;
class REPORTER;

class VIA;
class D_PAD;
@@ -80,7 +81,8 @@ class EDA_3D_CANVAS : public wxGLCanvas
{
private:
    bool            m_init;
    bool            m_reportWarnings;       ///< true to report all wranings when build the 3D scene false to report errors only
    bool            m_reportWarnings;       ///< true to report all warnings when building the 3D scene
                                            ///< false to report errors only
    GLuint          m_glLists[GL_ID_END];   ///< GL lists
    wxGLContext*    m_glRC;
    wxRealPoint     m_draw3dOffset;         ///< offset to draw the 3D mesh.
@@ -148,11 +150,11 @@ public:
     * Function CreateDrawGL_List
     * Prepares the parameters of the OpenGL draw list
     * creates the OpenGL draw list items (board, grid ...)
     * @param aErrorMessages = a wxString which will filled with error messages,
     * @param aErrorMessages = a REPORTER which will filled with error messages,
     * if any
     * @param aShowWarnings = true to show all messages, false to show errors only
     * @param aActivity = a REPORTER to display activity state
     */
    void   CreateDrawGL_List( wxString* aErrorMessages, bool aShowWarnings );
    void   CreateDrawGL_List( REPORTER* aErrorMessages, REPORTER* aActivity );
    void   InitGL();

    void ReportWarnings( bool aReport ) { m_reportWarnings = aReport; }
@@ -231,24 +233,25 @@ private:
     * Populates the OpenGL GL_ID_BOARD draw list with board items only on copper layers.
     * 3D footprint shapes, tech layers and aux layers are not on this list
     * Fills aErrorMessages with error messages created by some calculation function
     * display activity state
     * @param aBoardList =
     * @param aBodyOnlyList =
     * @param aErrorMessages = a wxString to add error and warning messages
     * @param aErrorMessages = a REPORTER to add error and warning messages
     * created by the build process (can be NULL)
     * @param aShowWarnings = true to show all messages, false to show errors only
     * @param aActivity = a REPORTER to display activity state
     */
    void   buildBoard3DView( GLuint aBoardList, GLuint aBodyOnlyList,
                             wxString* aErrorMessages, bool aShowWarnings );
                             REPORTER* aErrorMessages, REPORTER* aActivity );

    /**
     * Function buildTechLayers3DView
     * Called by CreateDrawGL_List()
     * Populates the OpenGL GL_ID_TECH_LAYERS draw list with items on tech layers
     * @param aErrorMessages = a wxString to add error and warning messages
     * @param aErrorMessages = a REPORTER to add error and warning messages
     * created by the build process (can be NULL)
     * @param aShowWarnings = true to show all messages, false to show errors only
     * @param aActivity = a REPORTER to display activity state
     */
    void   buildTechLayers3DView( wxString* aErrorMessages, bool aShowWarnings );
    void   buildTechLayers3DView( REPORTER* aErrorMessages, REPORTER* aActivity );

    /**
     * Function buildShadowList
@@ -263,17 +266,25 @@ private:
     * draw lists with 3D footprint shapes
     * @param aOpaqueList is the gl list for non transparent items
     * @param aTransparentList is the gl list for non transparent items,
     * @param aErrorMessages = a REPORTER to add error and warning messages
     * created by the build process (can be NULL)
     * @param aActivity = a REPORTER to display activity state
     * which need to be drawn after all other items
     */
    void   buildFootprintShape3DList( GLuint aOpaqueList,
                                      GLuint aTransparentList );
                                      GLuint aTransparentList,
                                      REPORTER* aErrorMessages, REPORTER* aActivity );
    /**
     * Function buildBoard3DAuxLayers
     * Called by CreateDrawGL_List()
     * Fills the OpenGL GL_ID_AUX_LAYERS draw list
     * with items on aux layers only
     * @param aErrorMessages = a REPORTER to add error and warning messages
     * created by the build process (can be NULL)
     * @param aActivity = a REPORTER to display activity state
     * which need to be drawn after all other items
     */
    void   buildBoard3DAuxLayers();
    void   buildBoard3DAuxLayers( REPORTER* aErrorMessages, REPORTER* aActivity );

    void   draw3DGrid( double aGriSizeMM );
    void   draw3DAxis();
@@ -329,11 +340,11 @@ private:
     * function generateFakeShadowsTextures
     * creates shadows of the board an footprints
     * for aesthetical purpose
     * @param aErrorMessages = a wxString to add error and warning messages
     * @param aErrorMessages = a REPORTER to add error and warning messages
     * created by the build process (can be NULL)
     * @param aShowWarnings = true to show all messages, false to show errors only
     * @param aActivity = a REPORTER to display activity state
     */
    void   generateFakeShadowsTextures( wxString* aErrorMessages, bool aShowWarnings );
    void   generateFakeShadowsTextures( REPORTER* aErrorMessages, REPORTER* aActivity );

    DECLARE_EVENT_TABLE()
};
+3 −3
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ S3D_MASTER:: ~S3D_MASTER()
    {
        nextmat = m_Materials->Next();
        delete m_Materials;
        m_Materials = 0;
        m_Materials = NULL;
    }
}

+175 −57

File changed.

Preview size limit exceeded, changes collapsed.

Loading