Changeset 300 for trunk/src/gl/gl_context.cc
- Timestamp:
- 08/07/14 10:29:34 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gl/gl_context.cc
r299 r300 16 16 void gl_context::bind( texture2d* texture, texture_slot slot ) 17 17 { 18 GLuint id = static_cast< gl_texture2d* >( texture )-> m_name.get_value();18 GLuint id = static_cast< gl_texture2d* >( texture )->glid; 19 19 glActiveTexture( GL_TEXTURE0 + static_cast< GLenum >( slot ) ); 20 20 glBindTexture( GL_TEXTURE_2D, id ); … … 24 24 { 25 25 gl_program* glp = static_cast< gl_program* >( p ); 26 glUseProgram( glp-> m_name.get_value());26 glUseProgram( glp->glid ); 27 27 glp->update_uniforms(); 28 28 } … … 30 30 void nv::gl_context::bind( vertex_buffer* b ) 31 31 { 32 GLuint id = static_cast< gl_vertex_buffer* >( b )-> m_name.get_value();32 GLuint id = static_cast< gl_vertex_buffer* >( b )->glid; 33 33 glBindBuffer( GL_ARRAY_BUFFER, id ); 34 34 } … … 36 36 void nv::gl_context::bind( index_buffer* b ) 37 37 { 38 GLuint id = static_cast< gl_index_buffer* >( b )-> m_name.get_value();38 GLuint id = static_cast< gl_index_buffer* >( b )->glid; 39 39 glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, id ); 40 40 } … … 96 96 void gl_context::update( texture2d* texture, void* data ) 97 97 { 98 GLuint id = static_cast< gl_texture2d* >( texture )-> m_name.get_value();98 GLuint id = static_cast< gl_texture2d* >( texture )->glid; 99 99 image_format format = texture->get_format(); 100 100 ivec2 size = texture->get_size();
Note: See TracChangeset
for help on using the changeset viewer.