Ignore:
Timestamp:
05/12/14 16:49:24 (11 years ago)
Author:
epyon
Message:
  • polygon_mode added to context and gl context implementation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gl/gl_context.cc

    r198 r233  
    171171}
    172172
     173void gl_context::apply_polygon_mode( const polygon_mode& mode )
     174{
     175        if ( m_render_state.polygon_mode.fill != mode.fill )
     176        {
     177                glPolygonMode( GL_FRONT_AND_BACK, polygon_mode_fill_to_enum( mode.fill ) );
     178                m_render_state.polygon_mode.fill = mode.fill;
     179        }
     180}
     181
     182
    173183void gl_context::apply_depth_range( const depth_range& range )
    174184{
     
    316326                state.color_mask.blue, state.color_mask.alpha
    317327        );
     328        glPolygonMode( GL_FRONT_AND_BACK, polygon_mode_fill_to_enum( state.polygon_mode.fill ) );
    318329}
    319330
     
    347358        apply_color_mask( state.color_mask );
    348359        apply_depth_mask( state.depth_mask );
     360        apply_polygon_mode( state.polygon_mode );
    349361}
    350362
Note: See TracChangeset for help on using the changeset viewer.