Ignore:
Timestamp:
08/18/14 23:25:46 (11 years ago)
Author:
epyon
Message:
  • cleanup of context and device interfaces
  • create_vertex_array moved to context (as it's context bound)
  • added partial framebuffer functions to context
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gfx/debug_draw.cc

    r303 r313  
    2828        "}\n";
    2929
    30 nv::debug_data::debug_data( device* a_device )
    31         : m_device( a_device ), m_program(), m_va()
     30nv::debug_data::debug_data( context* a_context )
     31        : m_context( a_context ), m_program(), m_va()
    3232{
    33         m_program = m_device->create_program( nv_debug_draw_vertex_shader, nv_debug_draw_fragment_shader );
     33        m_program = m_context->get_device()->create_program( nv_debug_draw_vertex_shader, nv_debug_draw_fragment_shader );
    3434}
    3535
    3636void nv::debug_data::update()
    3737{
    38         m_device->release( m_va );
    39         m_va = m_device->create_vertex_array( m_data, nv::STATIC_DRAW );
     38        m_context->release( m_va );
     39        m_va = m_context->create_vertex_array( m_data, nv::STATIC_DRAW );
    4040}
    4141
     
    7575nv::debug_data::~debug_data()
    7676{
    77         m_device->release( m_va );
    78         m_device->release( m_program );
     77        m_context->release( m_va );
     78        m_context->get_device()->release( m_program );
    7979}
Note: See TracChangeset for help on using the changeset viewer.