Index: trunk/src/gl/gl_context.cc
===================================================================
--- trunk/src/gl/gl_context.cc	(revision 477)
+++ trunk/src/gl/gl_context.cc	(revision 485)
@@ -354,17 +354,17 @@
 }
 
-void nv::gl_context::update( buffer b, uint32 index, const void* data, size_t offset, size_t size )
-{
-	const gl_buffer_info* info = static_cast<const gl_buffer_info*>( m_device->get_buffer_info( b ) );
-	if ( info )
-	{
-		GLenum glenum = buffer_type_to_enum( info->type );
-		if ( size == 0 )
-			glBindBufferBase( glenum, index, info->glid );
-		else
-			glBindBufferRange( glenum, index, info->glid, offset, size );
-		glBufferSubData( glenum, GLintptr( offset ), GLsizeiptr( size ), data );
-	}
-}
+// void nv::gl_context::update( buffer b, uint32 index, const void* data, size_t offset, size_t size )
+// {
+// 	const gl_buffer_info* info = static_cast<const gl_buffer_info*>( m_device->get_buffer_info( b ) );
+// 	if ( info )
+// 	{
+// 		GLenum glenum = buffer_type_to_enum( info->type );
+// 		if ( size == 0 )
+// 			glBindBufferBase( glenum, index, info->glid );
+// 		else
+// 			glBindBufferRange( glenum, index, info->glid, offset, size );
+// 		glBufferSubData( glenum, GLintptr( offset ), GLsizeiptr( size ), data );
+// 	}
+// }
 
 void gl_context::update( buffer b, const void* data, nv::size_t offset, nv::size_t size )
Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 477)
+++ trunk/src/gl/gl_device.cc	(revision 485)
@@ -340,6 +340,30 @@
 }
 
+bool nv::gl_device::bind_block( program p, const string_view& name, uint32 index )
+{
+	const gl_program_info* info = m_programs.get( p );
+	if ( info )
+	{
+		int id = get_block_location( p, name, false );
+		if ( id < 0 ) return false;
+		glUniformBlockBinding( info->glid, unsigned( id ), index );
+		return true;
+	}
+	return false;
+}
+
 int nv::gl_device::get_block_location( program p, const string_view& name, bool fatal /*= true */ ) const
 {
+	const gl_program_info* info = m_programs.get( p );
+	if ( info )
+	{
+		int result = glGetUniformBlockIndex( info->glid, name.data() );
+		if ( result >= 0 ) return result;
+		if ( fatal )
+		{
+			NV_LOG_CRITICAL( "gl_device : block '", name, "' not found in program!" );
+			NV_ABORT( "gl_device : block not found!" );
+		}
+	}
 	return -1;
 }
