Commit 28511cf4 authored by Maciej Suminski's avatar Maciej Suminski
Browse files

Introducing shaders.

Shader's parameters are stored in VBO_ITEM. Changed VBO_ITEM data structure. Added UseShader() function for selecting shader for a given VBO_ITEM.
Added one main vertex & fragment shader program to be used for with all kinds of items (type of shader is selected using attributes that are stored in VBO). Currently available shaders are: at-least-1px-width line, filled circle and stroked circle.
Removed unnecessary param (aDepthOffset) from a few functions (OPENGL_GAL::drawSemiCircle(), OPENGL_GAL::drawLineCap()). Removed function OPENGL_GAL::DrawRoundedSegment(). Changed some asserts to debug info or error log.
parent ad5d10a8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -58,9 +58,9 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
    wxStandardPaths paths;
    wxFileName executableFile( paths.GetExecutablePath() );
    m_galShaderPath = std::string( ( executableFile.GetPath() +
                                   wxT( "/../../common/gal/opengl/shader/" ) ).mb_str() );
                                   wxT( "/../../common/gal/opengl/" ) ).mb_str() );

    SwitchBackend( aGalType, false );
    SwitchBackend( aGalType, true );
    SetBackgroundStyle( wxBG_STYLE_CUSTOM );

    // Initial display settings
Loading