Ignore:
Timestamp:
10/03/16 17:45:46 (9 years ago)
Author:
epyon
Message:
  • ecs updates
  • animation updates
  • ragdoll manager
  • lua has own random engine
  • several minor fixes
  • particle engine/particle group
  • shitload of other stuff
  • bullet world
File:
1 edited

Legend:

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

    r514 r520  
    8484                fgcolor = fg.get_argb32();
    8585                bgcolor = bg.get_argb32();
    86                 gylph   = uint32( ch );
    87                 NV_LOG_INFO( uint32(
    88                         ( fgcolor & uint32( 0x00FF0000 ) ) >> 16 ), "-", uint32( ( fgcolor & uint32( 0x0000FF00 ) ) >> 8 ),"-" , uint32( fgcolor & uint32( 0x000000FF ) ) );
     86                gylph   = uint32( uint8(ch) );
    8987        }
    9088};
     
    139137        m_dc.p = m_context->create_program( nv_gfx_terminal_vs, nv_gfx_terminal_fs );
    140138
    141         m_data->buffer = m_context->create_buffer( nv::UNIFORM_BUFFER, nv::DYNAMIC_DRAW, tsize.x * tsize.y * sizeof( gfx_terminal_uniform_block ), m_data->data );
     139        m_data->buffer = m_context->create_buffer( nv::UNIFORM_BUFFER, nv::STREAM_DRAW, tsize.x * tsize.y * sizeof( gfx_terminal_uniform_block ), m_data->data );
    142140        m_context->bind( m_data->buffer, 7 );
    143141        m_context->get_device()->set_opt_uniform( m_dc.p, "term_size", vec2( tsize ) );
     
    151149void gfx_terminal::update()
    152150{
    153         m_context->bind( m_data->buffer, 7 );
    154         m_context->update( m_data->buffer, m_data->data, 0, m_data->size.x * m_data->size.y * sizeof( gfx_terminal_uniform_block ) );
    155         m_update_needed = false;
     151        if ( m_update_needed )
     152        {
     153                m_context->bind( m_data->buffer, 7 );
     154                m_context->update( m_data->buffer, m_data->data, 0, m_data->size.x * m_data->size.y * sizeof( gfx_terminal_uniform_block ) );
     155                m_update_needed = false;
     156        }
    156157}
    157158
Note: See TracChangeset for help on using the changeset viewer.