Ignore:
Timestamp:
08/07/14 10:29:34 (11 years ago)
Author:
epyon
Message:
  • removed gl_names - too much bloat for too little gain
File:
1 edited

Legend:

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

    r299 r300  
    1616void gl_context::bind( texture2d* texture, texture_slot slot )
    1717{
    18         GLuint id = static_cast< gl_texture2d* >( texture )->m_name.get_value();
     18        GLuint id = static_cast< gl_texture2d* >( texture )->glid;
    1919        glActiveTexture( GL_TEXTURE0 + static_cast< GLenum >( slot ) );
    2020        glBindTexture( GL_TEXTURE_2D, id );
     
    2424{
    2525        gl_program* glp = static_cast< gl_program* >( p );
    26         glUseProgram( glp->m_name.get_value() );
     26        glUseProgram( glp->glid );
    2727        glp->update_uniforms();
    2828}
     
    3030void nv::gl_context::bind( vertex_buffer* b )
    3131{
    32         GLuint id = static_cast< gl_vertex_buffer* >( b )->m_name.get_value();
     32        GLuint id = static_cast< gl_vertex_buffer* >( b )->glid;
    3333        glBindBuffer( GL_ARRAY_BUFFER, id );
    3434}
     
    3636void nv::gl_context::bind( index_buffer* b )
    3737{
    38         GLuint id = static_cast< gl_index_buffer* >( b )->m_name.get_value();
     38        GLuint id = static_cast< gl_index_buffer* >( b )->glid;
    3939        glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, id );
    4040}
     
    9696void gl_context::update( texture2d* texture, void* data )
    9797{
    98         GLuint id = static_cast< gl_texture2d* >( texture )->m_name.get_value();
     98        GLuint id = static_cast< gl_texture2d* >( texture )->glid;
    9999        image_format format = texture->get_format();
    100100        ivec2        size   = texture->get_size();
Note: See TracChangeset for help on using the changeset viewer.