Ignore:
Timestamp:
08/25/15 18:47:28 (10 years ago)
Author:
epyon
Message:
  • camera/device/uniform - modelview_inv added
  • image_data/context/texture/device/enum - DEPTH format support added
File:
1 edited

Legend:

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

    r406 r462  
    121121                glBindFramebuffer( GL_FRAMEBUFFER, info->glid );
    122122                unsigned gl_type = texture_type_to_enum( tinfo->type );
    123 
    124123                if ( tinfo )
    125124                {
     
    141140        {
    142141                glBindFramebuffer( GL_FRAMEBUFFER, info->glid );
    143                 if ( info->depth_rb_glid ) glDeleteRenderbuffers( 1, &(info->depth_rb_glid) );
     142                if ( info->depth_rb_glid )
     143                        glDeleteRenderbuffers( 1, &(info->depth_rb_glid) );
    144144                glGenRenderbuffers( 1, &(info->depth_rb_glid) );
    145145                glBindRenderbuffer( GL_RENDERBUFFER, info->depth_rb_glid );
     
    165165bool nv::gl_context::check( framebuffer_slot ft )
    166166{
     167        glDrawBuffer( 0 );
     168        glReadBuffer( 0 );
    167169        if ( is_gl_extension_loaded( GL_EXT_FRAMEBUFFER_OBJECT ) && is_gl_extension_loaded( GL_EXT_FRAMEBUFFER_BLIT ) )
    168170        {
     
    185187                NV_LOG_ERROR( "gl_context::check : Framebuffer extensions not loaded!" );
    186188        }
     189        glDrawBuffer( GL_BACK );
     190        glReadBuffer( GL_BACK );
    187191        return false;
    188192}
     
    592596                if ( m_render_state.culling.face != cull.face )
    593597                {
    594                         glCullFace( culling_face_type_to_enum(cull.face) );
     598                        glCullFace( culling_face_type_to_enum( cull.face ) );
    595599                        m_render_state.culling.face = cull.face;
    596600                }
    597 
    598                 if ( m_render_state.culling.order != cull.order )
    599                 {
    600                         glFrontFace( culling_order_type_to_enum( cull.order ) );
    601                         m_render_state.culling.order = cull.order;
    602                 }
     601        }
     602
     603        if ( m_render_state.culling.order != cull.order )
     604        {
     605                glFrontFace( culling_order_type_to_enum( cull.order ) );
     606                m_render_state.culling.order = cull.order;
    603607        }
    604608}
     
    688692        load_gl_extensions( GL_EXT_FRAMEBUFFER_BLIT | GL_EXT_FRAMEBUFFER_OBJECT );
    689693        force_apply_render_state( m_render_state );
     694
    690695}
    691696
Note: See TracChangeset for help on using the changeset viewer.