Index: /trunk/nv/formats/md5_loader.hh
===================================================================
--- /trunk/nv/formats/md5_loader.hh	(revision 414)
+++ /trunk/nv/formats/md5_loader.hh	(revision 415)
@@ -84,5 +84,5 @@
 		void reset();
 		void build_frame_skeleton( mesh_node_data* nodes, uint32 index, const array_view<md5_joint_info>& joint_info, const array_view<transform>& base_frames, const array_view<float>& frame_data );
-		bool prepare_mesh( md5_vtx_pntiw* vtx_data, mesh_node_data* nodes, uint32 vtx_count, mesh_data* mdata, md5_weight* weights, md5_weight_info* weight_info );
+		bool prepare_mesh( mesh_node_data* nodes, uint32 vtx_count, mesh_data* mdata, md5_weight* weights, md5_weight_info* weight_info );
 	protected:
 		file_type m_type;
Index: /trunk/nv/gfx/animation.hh
===================================================================
--- /trunk/nv/gfx/animation.hh	(revision 414)
+++ /trunk/nv/gfx/animation.hh	(revision 415)
@@ -90,5 +90,5 @@
 		static uint32 get_raw( const raw_data_channel* channel, uint32 index, float* result )
 		{
-			if ( channel->element_count() == 0 ) return 0;
+			if ( channel->size() == 0 ) return 0;
 			uint32 keyfsize = channel->element_size() / 4;
 			const float* fdata = reinterpret_cast<const float*>( channel->raw_data() ) + keyfsize * index;
@@ -102,5 +102,5 @@
 		static uint32 interpolate_raw( const raw_data_channel* channel, float time, float* result )
 		{
-			if ( channel->element_count() == 0 ) return 0;
+			if ( channel->size() == 0 ) return 0;
 			uint32 keyfsize = channel->element_size() / 4;
 			uint32 keyfresult = keyfsize;
@@ -116,10 +116,10 @@
 				slot++;
 				keyfresult--;
-				if ( channel->element_count() == 1 )
+				if ( channel->size() == 1 )
 				{
 					raw_copy_n( fdata + 1, keyfresult, result );
 					return keyfresult;
 				}
-				for ( unsigned i = 1; i < channel->element_count(); i++ )
+				for ( unsigned i = 1; i < channel->size(); i++ )
 				{
 					if ( time < fdata[i * keyfsize] )
@@ -138,15 +138,15 @@
 			else
 			{
-				if ( channel->element_count() == 1 )
+				if ( channel->size() == 1 )
 				{
 					raw_copy_n( fdata, keyfresult, result );
 					return keyfresult;
 				}
-				index0 = glm::clamp<int>( int( time ), 0, int( channel->element_count() ) - 2 );
+				index0 = glm::clamp<int>( int( time ), 0, int( channel->size() ) - 2 );
 				index1 = index0 + 1;
 				factor = glm::clamp<float>( time - index0, 0.0f, 1.0f );
 			}
 			uint32 ret = 0;
-			for ( ; slot < channel->descriptor().slot_count(); ++slot )
+			for ( ; slot < channel->descriptor().size(); ++slot )
 			{
 				ret += nv::interpolate_raw(
@@ -187,5 +187,5 @@
 			NV_ASSERT( m_data, "Data is null!" );
 			const KEY* keys = m_data->data_cast<KEY>( );
-			uint32 count = m_data->element_count();
+			uint32 count = m_data->size();
 			if ( count == 0 ) return;
 			if ( count == 1 )
@@ -221,5 +221,5 @@
 			NV_ASSERT( m_data, "Data is null!" );
 			const KEY* keys = m_data->data_cast<KEY>( );
-			uint32 count = m_data->element_count();
+			uint32 count = m_data->size();
 			if ( count == 0 ) return;
 			if ( count == 1 ) 
@@ -278,7 +278,7 @@
 		size_t size() const { return 0; } // TODO: remove?
 		bool empty() const { 
-			return m_pchannel->element_count() == 0 
-				&& m_rchannel->element_count() == 0 
-				&& m_schannel->element_count() == 0; }
+			return m_pchannel->size() == 0
+				&& m_rchannel->size() == 0
+				&& m_schannel->size() == 0; }
 		virtual mat4 get_matrix( float time ) const
 		{
@@ -306,7 +306,7 @@
 		{
 			return 3 * sizeof( size_t ) 
-				+ m_pchannel->element_count() * sizeof( key_p )
-				+ m_rchannel->element_count() * sizeof( key_r )
-				+ m_schannel->element_count() * sizeof( key_s );
+				+ m_pchannel->size() * sizeof( key_p )
+				+ m_rchannel->size() * sizeof( key_r )
+				+ m_schannel->size() * sizeof( key_s );
 		}
 		~key_vectors_prs()
@@ -342,6 +342,6 @@
 			delete m_channel;
 		}
-		bool empty() const { return m_channel->element_count() == 0; }
-		size_t size() const { return m_channel->element_count(); }
+		bool empty() const { return m_channel->size() == 0; }
+		size_t size() const { return m_channel->size(); }
 		const transform& get( size_t index ) const { return m_channel->data_cast< key >()[ index ].tform; }
 		const transform* data() const { return &(m_channel->data_cast< key >()[0].tform); }
@@ -349,5 +349,5 @@
 		virtual uint32 raw_size() const 
 		{
-			return sizeof( size_t ) + m_channel->element_count() * sizeof( key );
+			return sizeof( size_t ) + m_channel->size() * sizeof( key );
 		}
 
Index: /trunk/nv/interface/context.hh
===================================================================
--- /trunk/nv/interface/context.hh	(revision 414)
+++ /trunk/nv/interface/context.hh	(revision 415)
@@ -304,5 +304,5 @@
 			{
 				const raw_data_channel* channel = channels[ch];
-				if ( channel->element_count() > 0 )
+				if ( channel->size() > 0 )
 				{
 					const data_descriptor& desc = channel->descriptor();
Index: /trunk/nv/interface/data_descriptor.hh
===================================================================
--- /trunk/nv/interface/data_descriptor.hh	(revision 414)
+++ /trunk/nv/interface/data_descriptor.hh	(revision 415)
@@ -222,7 +222,7 @@
 		bool operator==( const data_descriptor& rhs ) const
 		{
-			if ( m_size  != rhs.m_size )  return false;
-			if ( m_count != rhs.m_count ) return false;
-			for ( uint32 i = 0; i < m_count; ++i )
+			if ( m_element_size != rhs.m_element_size )  return false;
+			if ( m_size != rhs.m_size ) return false;
+			for ( uint32 i = 0; i < m_size; ++i )
 			{
 				if ( m_slots[i].etype  != rhs.m_slots[i].etype )  return false;
@@ -236,5 +236,5 @@
 		void initialize()
 		{
-			m_count = 0;
+			m_size = 0;
 			initialize_slot< Struct, slot::POSITION >();
 			initialize_slot< Struct, slot::TEXCOORD >();
@@ -250,9 +250,9 @@
 			initialize_slot< Struct, slot::SCALE >();
 			initialize_slot< Struct, slot::TFORM >();
-			m_size = sizeof( Struct );
-		}
-
-		uint32 element_size() const { return m_size; }
-		uint32 slot_count() const { return m_count; }
+			m_element_size = sizeof( Struct );
+		}
+
+		uint32 element_size() const { return m_element_size; }
+		uint32 size() const { return m_size; }
 
 		bool has_slot( slot vslot ) const
@@ -264,9 +264,9 @@
 
 		const_iterator begin() const { return &m_slots[0]; }
-		const_iterator end() const { return &m_slots[m_count]; }
+		const_iterator end() const { return &m_slots[m_size]; }
 
 		const data_descriptor_slot& operator []( uint32 i ) const
 		{
-			NV_ASSERT( i < m_count, "data_descriptor indexing failure!" );
+			NV_ASSERT( i < m_size, "data_descriptor indexing failure!" );
 			return m_slots[i];
 		}
@@ -274,9 +274,9 @@
 		void push_slot( datatype etype, slot vslot )
 		{
-			m_slots[m_count].etype  = etype;
-			m_slots[m_count].offset = m_size;
-			m_slots[m_count].vslot  = vslot;
-			m_size += get_datatype_info( etype ).size;
-			m_count++;
+			m_slots[m_size].etype  = etype;
+			m_slots[m_size].offset = m_element_size;
+			m_slots[m_size].vslot  = vslot;
+			m_element_size += get_datatype_info( etype ).size;
+			m_size++;
 		}
 
@@ -285,9 +285,9 @@
 			for ( const auto& dslot : desc )
 			{
-				m_slots[m_count].etype  = dslot.etype;
-				m_slots[m_count].offset = m_size;
-				m_slots[m_count].vslot  = dslot.vslot;
-				m_size += get_datatype_info( dslot.etype ).size;
-				m_count++;
+				m_slots[m_size].etype  = dslot.etype;
+				m_slots[m_size].offset = m_element_size;
+				m_slots[m_size].vslot  = dslot.vslot;
+				m_element_size += get_datatype_info( dslot.etype ).size;
+				m_size++;
 			}
 		}
@@ -304,6 +304,6 @@
 
 		data_descriptor_slot m_slots[uint16( slot::MAX_STORE )];
-		uint32               m_count = 0;
 		uint32               m_size = 0;
+		uint32               m_element_size = 0;
 
 		template < typename Struct, slot Slot >
@@ -311,10 +311,10 @@
 		{
 			typedef slot_info< Struct, Slot > sinfo;
-			m_slots[m_count].etype = sinfo::etype;
-			if ( m_slots[m_count].etype != datatype::NONE )
+			m_slots[m_size].etype = sinfo::etype;
+			if ( m_slots[m_size].etype != datatype::NONE )
 			{
-				m_slots[m_count].vslot  = Slot;
-				m_slots[m_count].offset = sinfo::offset;
-				m_count++;
+				m_slots[m_size].vslot  = Slot;
+				m_slots[m_size].offset = sinfo::offset;
+				m_size++;
 			}
 		}
@@ -323,5 +323,5 @@
 	struct raw_data_channel
 	{
-		raw_data_channel() : m_data( nullptr ), m_count( 0 ) {}
+		raw_data_channel() : m_data( nullptr ), m_size( 0 ) {}
 		~raw_data_channel()
 		{
@@ -331,6 +331,6 @@
 		const data_descriptor& descriptor() const { return m_desc;  }
 		uint32 element_size() const { return m_desc.element_size(); }
-		uint32 element_count() const { return m_count; }
-		uint32 raw_size() const { return m_count * m_desc.element_size(); }
+		uint32 size() const { return m_size; }
+		uint32 raw_size() const { return m_size * m_desc.element_size(); }
 		const uint8* raw_data() const { return m_data; }
 
@@ -345,22 +345,4 @@
 
 		template < typename Struct >
-		static raw_data_channel* create( uint32 count = 0 )
-		{
-			raw_data_channel* result = new raw_data_channel();
-			result->m_desc.initialize<Struct>();
-			result->m_count = count;
-			result->m_data = ( count > 0 ? ( new uint8[result->raw_size()] ) : nullptr );
-			return result;
-		}
-		static raw_data_channel* create( const data_descriptor& desc, uint32 count = 0 )
-		{
-			raw_data_channel* result = new raw_data_channel();
-			result->m_desc = desc;
-			result->m_count = count;
-			result->m_data = ( count > 0 ? ( new uint8[result->raw_size()] ) : nullptr );
-			return result;
-		}
-
-		template < typename Struct >
 		friend class data_channel_creator;
 		friend class raw_data_channel_creator;
@@ -369,5 +351,5 @@
 		uint8*          m_data;
 		data_descriptor m_desc;
-		uint32          m_count;
+		uint32          m_size;
 
 	};
@@ -378,5 +360,8 @@
 		raw_data_channel_creator( const data_descriptor& desc, uint32 size )
 		{
-			m_channel = raw_data_channel::create( desc, size );
+			m_channel = new raw_data_channel();
+			m_channel->m_desc = desc;
+			m_channel->m_size = size;
+			m_channel->m_data = ( size > 0 ? ( new uint8[m_channel->raw_size()] ) : nullptr );
 			m_owned   = true;
 		}
@@ -388,6 +373,6 @@
 
 		uint32 element_size() const { return m_channel->element_size(); }
-		uint32 size() const { return m_channel->element_count(); }
-		uint32 raw_size() const { return m_channel->element_count() * m_channel->element_size(); }
+		uint32 size() const { return m_channel->size(); }
+		uint32 raw_size() const { return m_channel->size() * m_channel->element_size(); }
 		uint8* raw_data() { return m_channel->m_data; }
 		const uint8* raw_data() const { return m_channel->m_data; }
@@ -428,5 +413,5 @@
 		const Struct& operator []( uint32 i ) const
 		{
-			NV_ASSERT( i < m_channel->m_count, "data_channel_creator indexing failure!" );
+			NV_ASSERT( i < m_channel->m_size, "data_channel_creator indexing failure!" );
 			return reinterpret_cast< const Struct* >( m_channel->m_data )[i];
 		}
@@ -434,5 +419,5 @@
 		Struct& operator []( uint32 i ) 
 		{
-			NV_ASSERT( i < m_channel->m_count, "data_channel_creator indexing failure!" );
+			NV_ASSERT( i < m_channel->m_size, "data_channel_creator indexing failure!" );
 			return reinterpret_cast<Struct*>( m_channel->m_data )[i];
 		}
Index: /trunk/nv/interface/interpolation_raw.hh
===================================================================
--- /trunk/nv/interface/interpolation_raw.hh	(revision 414)
+++ /trunk/nv/interface/interpolation_raw.hh	(revision 415)
@@ -59,5 +59,5 @@
 	inline mat4 extract_matrix_raw( const data_descriptor& desc, const float* data )
 	{
-		if ( desc.slot_count() == 1 )
+		if ( desc.size() == 1 )
 		{
 			switch ( desc[0].vslot )
@@ -100,5 +100,5 @@
 	inline transform extract_transform_raw( const data_descriptor& desc, const float* data )
 	{
-		if ( desc.slot_count() == 1 )
+		if ( desc.size() == 1 )
 		{
 			switch ( desc[0].vslot )
Index: /trunk/nv/interface/mesh_data.hh
===================================================================
--- /trunk/nv/interface/mesh_data.hh	(revision 414)
+++ /trunk/nv/interface/mesh_data.hh	(revision 415)
@@ -35,5 +35,5 @@
 			NV_ASSERT( channel, "nullptr passed to add_channel!" );
 			m_channels.push_back( channel );
-			if ( channel->element_count() > 0 && channel->descriptor()[0].vslot == slot::INDEX )
+			if ( channel->size() > 0 && channel->descriptor()[0].vslot == slot::INDEX )
 			{
 				NV_ASSERT( !m_index_channel, "second index channel!" );
@@ -68,8 +68,9 @@
 
 
+		// TODO: this should be "size"
 		size_t get_count() const 
 		{
-			if ( m_index_channel ) return m_index_channel->element_count();
-			if ( m_channels.size() > 0 ) return m_channels[0]->element_count();
+			if ( m_index_channel ) return m_index_channel->size();
+			if ( m_channels.size() > 0 ) return m_channels[0]->size();
 			return 0;
 		}
@@ -77,5 +78,5 @@
 		size_t get_count( size_t channel ) const 
 		{
-			if ( m_channels.size() > channel ) return m_channels[channel]->element_count();
+			if ( m_channels.size() > channel ) return m_channels[channel]->size();
 			return 0;
 		}
Index: /trunk/src/formats/assimp_loader.cc
===================================================================
--- /trunk/src/formats/assimp_loader.cc	(revision 414)
+++ /trunk/src/formats/assimp_loader.cc	(revision 415)
@@ -117,30 +117,31 @@
 
 	bool skinned = mesh->mNumBones > 0;
-	raw_data_channel* channel = nullptr;
+
+	data_descriptor desc;
 	if ( skinned )
-		channel = raw_data_channel::create< assimp_skinned_vtx >( mesh->mNumVertices );
+		desc.initialize< assimp_skinned_vtx >();
 	else
-		channel = raw_data_channel::create< assimp_plain_vtx >( mesh->mNumVertices );
-	uint8* cdata = const_cast< uint8*>( channel->raw_data() );
-
-	data->add_channel( channel );
+		desc.initialize< assimp_plain_vtx >();
+	raw_data_channel_creator channel( desc, mesh->mNumVertices );
+	uint8* cdata = channel.raw_data();
+
 	if ( mesh->mTangents && mesh->mBitangents )
-	for (unsigned int i=0; i<mesh->mNumVertices; i++)
-	{
-		vec3 v = assimp_vec3_cast( mesh->mVertices[ i ] );
-		vec3 n = glm::normalize( assimp_vec3_cast( mesh->mNormals[ i ] ) );
-		vec3 t = glm::normalize( assimp_vec3_cast( mesh->mTangents[ i ] ) );
-		vec3 b = glm::normalize( assimp_vec3_cast( mesh->mBitangents[ i ] ) );
-		vec2 s = assimp_st_cast( mesh->mTextureCoords[ 0 ][ i ] );
-
-		glm::vec3 t_i = glm::normalize (t - n * glm::dot (n, t));
-		float det = (glm::dot (glm::cross (n, t), b));
-		det = (det < 0.0f ? -1.0f : 1.0f );
-		nv::vec4 vt ( t_i[0], t_i[1], t_i[2], det );
-		if ( skinned )
-			reinterpret_cast< assimp_skinned_vtx* >( cdata )[i] = assimp_skinned_vtx( v, s, n, vt );
-		else
-			reinterpret_cast< assimp_plain_vtx* >( cdata )[i] = assimp_plain_vtx( v, s, n, vt );
-	}
+		for ( unsigned int i = 0; i < mesh->mNumVertices; i++ )
+		{
+			vec3 v = assimp_vec3_cast( mesh->mVertices[i] );
+			vec3 n = glm::normalize( assimp_vec3_cast( mesh->mNormals[i] ) );
+			vec3 t = glm::normalize( assimp_vec3_cast( mesh->mTangents[i] ) );
+			vec3 b = glm::normalize( assimp_vec3_cast( mesh->mBitangents[i] ) );
+			vec2 s = assimp_st_cast( mesh->mTextureCoords[0][i] );
+
+			glm::vec3 t_i = glm::normalize( t - n * glm::dot( n, t ) );
+			float det = ( glm::dot( glm::cross( n, t ), b ) );
+			det = ( det < 0.0f ? -1.0f : 1.0f );
+			nv::vec4 vt( t_i[0], t_i[1], t_i[2], det );
+			if ( skinned )
+				reinterpret_cast<assimp_skinned_vtx*>( cdata )[i] = assimp_skinned_vtx( v, s, n, vt );
+			else
+				reinterpret_cast<assimp_plain_vtx*>( cdata )[i] = assimp_plain_vtx( v, s, n, vt );
+		}
 
 	if ( skinned )
@@ -179,4 +180,5 @@
 		}
 	}
+	data->add_channel( channel.release() );
 	data->add_channel( ichannel.release() );
 }
Index: /trunk/src/formats/md5_loader.cc
===================================================================
--- /trunk/src/formats/md5_loader.cc	(revision 414)
+++ /trunk/src/formats/md5_loader.cc	(revision 415)
@@ -137,5 +137,4 @@
 			assert( m_type == MESH );
 			mesh_data* mesh = new mesh_data("md5_mesh");
-			raw_data_channel* ch_pntiw = nullptr;
 
 			uint32 num_verts   = 0;
@@ -160,7 +159,7 @@
 					md5_vtx_t* tdata = nullptr;
 					{
-						data_channel_creator<md5_vtx_pnt> ch_pnt( num_verts );
-						data_channel_creator<md5_vtx_t>   ch_t( num_verts );
-						ch_pntiw = raw_data_channel::create<md5_vtx_pntiw>( num_verts );
+						data_channel_creator<md5_vtx_pnt>   ch_pnt( num_verts );
+						data_channel_creator<md5_vtx_t>     ch_t( num_verts );
+						data_channel_creator<md5_vtx_pntiw> ch_pntiw( num_verts );
 						tdata = ch_t.data();
 						mesh->add_channel( ch_pnt.release() );
@@ -168,5 +167,5 @@
 						// TODO: hack to prevent rendering
 						//ch_pntiw->m_count = 0;
-						mesh->add_channel( ch_pntiw );
+						mesh->add_channel( ch_pntiw.release() );
 					}
 					weight_info.resize( num_verts );
@@ -236,5 +235,5 @@
 			}
 
-			prepare_mesh( reinterpret_cast< md5_vtx_pntiw* >( const_cast< uint8* >( ch_pntiw->raw_data() ) ), nodes, weight_info.size(), mesh, weights.data(), weight_info.data() );
+			prepare_mesh( nodes, weight_info.size(), mesh, weights.data(), weight_info.data() );
 
 			m_meshes[ num_meshes ] = mesh;
@@ -258,5 +257,6 @@
 				nodes[i].target_id = -1;
 				nodes[i].data      = new key_data;
-				nodes[i].data->add_channel( raw_data_channel::create< md5_key_t >( num_frames ) );
+				data_channel_creator< md5_key_t > fc( num_frames );
+				nodes[i].data->add_channel( fc.release() );
 				next_line( sstream ); 
 			}
@@ -335,9 +335,11 @@
 }
 
-bool md5_loader::prepare_mesh( md5_vtx_pntiw* vtx_data, mesh_node_data* nodes, uint32 vtx_count, mesh_data* mdata, md5_weight* weights, md5_weight_info* weight_info )
+bool md5_loader::prepare_mesh( mesh_node_data* nodes, uint32 vtx_count, mesh_data* mdata, md5_weight* weights, md5_weight_info* weight_info )
 {
 	assert( m_type == MESH );
-	data_channel_creator< md5_vtx_pnt > pnt( const_cast< raw_data_channel* >( mdata->get_channel< md5_vtx_pnt >() ) );
-	md5_vtx_pnt* vtcs       = pnt.data(); 
+	data_channel_creator< md5_vtx_pnt >   pnt  ( const_cast< raw_data_channel* >( mdata->get_channel< md5_vtx_pnt >() ) );
+	data_channel_creator< md5_vtx_pntiw > pntiw( const_cast< raw_data_channel* >( mdata->get_channel< md5_vtx_pntiw >() ) );
+	md5_vtx_pntiw* vtx_data = pntiw.data();
+	md5_vtx_pnt* vtcs = pnt.data();
 
 	for ( uint32 i = 0; i < vtx_count; ++i )
@@ -488,5 +490,5 @@
 			const transform* ptv = reinterpret_cast< const transform* >( pjoint.data->get_channel(0)->raw_data() );
 			transform ptr;
-			if ( pjoint.data->get_channel(0)->element_count() > index ) ptr = ptv[ index ];
+			if ( pjoint.data->get_channel(0)->size() > index ) ptr = ptv[ index ];
 			vec3 rot_pos = ptr.get_orientation() * pos;
 
Index: /trunk/src/formats/nmd_loader.cc
===================================================================
--- /trunk/src/formats/nmd_loader.cc	(revision 414)
+++ /trunk/src/formats/nmd_loader.cc	(revision 415)
@@ -189,7 +189,7 @@
 		nmd_stream_header sheader;
 		sheader.format = chan->descriptor();
-		sheader.count  = chan->element_count();
+		sheader.count  = chan->size();
 		stream_out.write( &sheader, sizeof( sheader ), 1 );
-		stream_out.write( chan->raw_data(), chan->element_size(), chan->element_count() );
+		stream_out.write( chan->raw_data(), chan->element_size(), chan->size() );
 	}
 }
@@ -257,7 +257,7 @@
 			nmd_stream_header cheader;
 			cheader.format    = channel->descriptor();
-			cheader.count     = channel->element_count();
+			cheader.count     = channel->size();
 			stream_out.write( &cheader, sizeof( cheader ), 1 );
-			stream_out.write( channel->raw_data(), channel->element_size(), channel->element_count() );
+			stream_out.write( channel->raw_data(), channel->element_size(), channel->size() );
 		}
 	}
Index: /trunk/src/gfx/keyframed_mesh.cc
===================================================================
--- /trunk/src/gfx/keyframed_mesh.cc	(revision 414)
+++ /trunk/src/gfx/keyframed_mesh.cc	(revision 415)
@@ -23,6 +23,6 @@
 	, m_active( false )
 {
-	m_index_count  = m_mesh_data->get_index_channel()->element_count();
-	m_vertex_count = m_mesh_data->get_channel<vertex_t>()->element_count();
+	m_index_count  = m_mesh_data->get_index_channel()->size();
+	m_vertex_count = m_mesh_data->get_channel<vertex_t>()->size();
 	m_vchannel     = m_mesh_data->get_channel<vertex_pnt>();
 	m_vsize        = sizeof( vertex_pnt );
@@ -34,5 +34,5 @@
 		m_vsize        = sizeof( vertex_pn );
 	}
-	m_frame_count  = m_vchannel->element_count() / m_vertex_count;
+	m_frame_count  = m_vchannel->size() / m_vertex_count;
 	m_pbuffer      = buffer();
 }
Index: /trunk/src/gfx/mesh_creator.cc
===================================================================
--- /trunk/src/gfx/mesh_creator.cc	(revision 414)
+++ /trunk/src/gfx/mesh_creator.cc	(revision 415)
@@ -19,6 +19,6 @@
 		key_data* keys   = m_data->m_nodes[i].data;
 		key_data* pkeys  = ( parent_id != -1 ? m_data->m_nodes[parent_id].data : nullptr );
-		size_t count     = ( keys ? keys->get_channel(0)->element_count() : 0 );
-		size_t pcount    = ( pkeys ? pkeys->get_channel(0)->element_count() : 0 );
+		size_t count     = ( keys ? keys->get_channel(0)->size() : 0 );
+		size_t pcount    = ( pkeys ? pkeys->get_channel(0)->size() : 0 );
 		max_frames = nv::max<uint32>( count, max_frames );
 		if ( pkeys && pkeys->get_channel_count() > 0 && keys && keys->get_channel_count() > 0 )
@@ -58,5 +58,5 @@
 			size_t chan_count = old_keys->get_channel_count();
 			if ( chan_count == 1 
-				&& old_keys->get_channel(0)->descriptor().slot_count() == 1 
+				&& old_keys->get_channel(0)->descriptor().size() == 1
 				&& old_keys->get_channel(0)->descriptor()[0].etype == TRANSFORM ) continue;
 
@@ -64,5 +64,5 @@
 			for ( size_t c = 0; c < chan_count; ++c )
 			{
-				max_keys = nv::max( max_keys, old_keys->get_channel(c)->element_count() );
+				max_keys = nv::max( max_keys, old_keys->get_channel(c)->size() );
 			}
 
@@ -78,5 +78,5 @@
 				for ( uint16 c = 0; c < chan_count; ++c )
 				{
-					size_t idx = nv::min( old_keys->get_channel(c)->element_count() - 1, n );
+					size_t idx = nv::min( old_keys->get_channel(c)->size() - 1, n );
 					pkey += old_keys->get_raw( old_keys->get_channel(c), idx, pkey );
 				}
@@ -242,6 +242,6 @@
 	if ( !p_channel || !n_channel || !t_channel ) return;
 
-	if ( p_channel->element_count() != n_channel->element_count() 
-		|| p_channel->element_count() % t_channel->element_count() != 0 
+	if ( p_channel->size() != n_channel->size()
+		|| p_channel->size() % t_channel->size() != 0
 		|| ( i_type != UINT && i_type != USHORT && i_type != NONE ) )
 	{
@@ -249,10 +249,10 @@
 	}
 
-	data_channel_creator< vertex_g > g_channel( p_channel->element_count() );
+	data_channel_creator< vertex_g > g_channel( p_channel->size() );
 	vec4* tangents              = &( g_channel.data()[0].tangent );
-	vec3* tangents2             = new vec3[ p_channel->element_count() ];
-	uint32 tri_count = i_channel ? i_channel->element_count() / 3 : t_channel->element_count() / 3;
-	uint32 vtx_count = p_channel->element_count();
-	uint32 sets      = p_channel->element_count() / t_channel->element_count();
+	vec3* tangents2             = new vec3[ p_channel->size() ];
+	uint32 tri_count = i_channel ? i_channel->size() / 3 : t_channel->size() / 3;
+	uint32 vtx_count = p_channel->size();
+	uint32 sets      = p_channel->size() / t_channel->size();
 
 	for ( unsigned int i = 0; i < tri_count; ++i )
@@ -292,7 +292,7 @@
 		for ( uint32 set = 0; set < sets; ++set )
 		{
-			uint32 nti0 = t_channel->element_count() * set + ti0;
-			uint32 nti1 = t_channel->element_count() * set + ti1;
-			uint32 nti2 = t_channel->element_count() * set + ti2;
+			uint32 nti0 = t_channel->size() * set + ti0;
+			uint32 nti1 = t_channel->size() * set + ti1;
+			uint32 nti2 = t_channel->size() * set + ti2;
 			const vec3& v1 = *reinterpret_cast<const vec3*>(p_channel->raw_data() + p_channel->element_size()*nti0 + p_offset );
 			const vec3& v2 = *reinterpret_cast<const vec3*>(p_channel->raw_data() + p_channel->element_size()*nti1 + p_offset );
@@ -337,10 +337,10 @@
 nv::raw_data_channel* nv::mesh_data_creator::merge_channels( raw_data_channel* a, raw_data_channel* b )
 {
-	NV_ASSERT( a->element_count() == b->element_count(), "merge_channel - bad channels!" );
+	NV_ASSERT( a->size() == b->size(), "merge_channel - bad channels!" );
 	data_descriptor desc  = a->descriptor();
 	desc.append( b->descriptor() );
 
-	raw_data_channel_creator result( desc, a->element_count() );
-	for ( uint32 i = 0; i < a->element_count(); ++i )
+	raw_data_channel_creator result( desc, a->size() );
+	for ( uint32 i = 0; i < a->size(); ++i )
 	{
 		raw_copy_n( a->raw_data() + i * a->element_size(), a->element_size(), result.raw_data() + i*desc.element_size() );
@@ -354,20 +354,20 @@
 {
 	if ( a->descriptor() != b->descriptor() ) return nullptr;
-	if ( a->element_count() % frame_count != 0 ) return nullptr;
-	if ( b->element_count() % frame_count != 0 ) return nullptr;
+	if ( a->size() % frame_count != 0 ) return nullptr;
+	if ( b->size() % frame_count != 0 ) return nullptr;
 	size_t vtx_size = a->element_size();
 
-	raw_data_channel_creator result( a->descriptor(), a->element_count() + b->element_count() );
+	raw_data_channel_creator result( a->descriptor(), a->size() + b->size() );
 
 	if ( frame_count == 1 )
 	{
-		size_t a_size = vtx_size * a->element_count();
+		size_t a_size = vtx_size * a->size();
 		raw_copy_n( a->raw_data(), a_size, result.raw_data() );
-		raw_copy_n( b->raw_data(), vtx_size * b->element_count(), result.raw_data() + a_size );
+		raw_copy_n( b->raw_data(), vtx_size * b->size(), result.raw_data() + a_size );
 	}
 	else
 	{
-		size_t frame_size_a = ( a->element_count() / frame_count ) * vtx_size;
-		size_t frame_size_b = ( b->element_count() / frame_count ) * vtx_size;
+		size_t frame_size_a = ( a->size() / frame_count ) * vtx_size;
+		size_t frame_size_b = ( b->size() / frame_count ) * vtx_size;
 		size_t pos_a = 0;
 		size_t pos_b = 0;
@@ -406,8 +406,8 @@
 	int och_ti = other->get_channel_index( slot::TEXCOORD );
 	if ( ch_pi == -1 || ch_ti == -1 ) return;
-	size_t size   = m_data->m_channels[ unsigned(ch_ti) ]->element_count();
-	size_t osize  =  other->m_channels[ unsigned(och_ti) ]->element_count();
-	size_t count  = m_data->m_channels[ unsigned(ch_pi) ]->element_count();
-	size_t ocount =  other->m_channels[ unsigned(och_pi) ]->element_count();
+	size_t size   = m_data->m_channels[ unsigned(ch_ti) ]->size();
+	size_t osize  =  other->m_channels[ unsigned(och_ti) ]->size();
+	size_t count  = m_data->m_channels[ unsigned(ch_pi) ]->size();
+	size_t ocount =  other->m_channels[ unsigned(och_pi) ]->size();
 	if ( count % size != 0 || ocount % osize != 0 ) return;
 	if ( count / size != ocount / osize ) return;
@@ -416,6 +416,6 @@
 	{
 		raw_data_channel* old = m_data->m_channels[c];
-		bool old_is_index = old->element_count() > 0 && old->descriptor()[0].vslot == slot::INDEX;
-		size_t frame_count = ( old_is_index ? 1 : old->element_count() / size );
+		bool old_is_index = old->size() > 0 && old->descriptor()[0].vslot == slot::INDEX;
+		size_t frame_count = ( old_is_index ? 1 : old->size() / size );
 		m_data->m_channels[c] = append_channels( old, other->m_channels[c], frame_count );
 		NV_ASSERT( m_data->m_channels[c], "Merge problem!" );
@@ -429,5 +429,5 @@
 					raw_data_channel_creator ic( m_data->m_channels[c] );
 					uint16* indexes = reinterpret_cast<uint16*>( ic.raw_data() );
-					for ( uint16 i = uint16( old->element_count() ); i < ic.size(); ++i )
+					for ( uint16 i = uint16( old->size() ); i < ic.size(); ++i )
 						indexes[i] += uint16( size );
 
@@ -438,5 +438,5 @@
 					raw_data_channel_creator ic( m_data->m_channels[c] );
 					uint32* indexes = reinterpret_cast<uint32*>( ic.raw_data() );
-					for ( uint32 i = old->element_count(); i < ic.size(); ++i )
+					for ( uint32 i = old->size(); i < ic.size(); ++i )
 						indexes[i] += size;
 				}
Index: /trunk/src/gfx/skeletal_mesh.cc
===================================================================
--- /trunk/src/gfx/skeletal_mesh.cc	(revision 414)
+++ /trunk/src/gfx/skeletal_mesh.cc	(revision 415)
@@ -17,5 +17,5 @@
 	const raw_data_channel* pntiw_chan = a_mesh_data->get_channel<md5_vtx_pntiw>();
 
-	m_pntdata.assign( pnt_chan->data_cast< md5_vtx_pnt >(), pnt_chan->element_count() );
+	m_pntdata.assign( pnt_chan->data_cast< md5_vtx_pnt >(), pnt_chan->size() );
 	m_bone_offset.resize( bones->get_count() );
 	m_transform.resize( bones->get_count() );
@@ -34,5 +34,5 @@
 	{
 		const raw_data_channel* channel = channels[ch];
-		if ( channel->element_count() > 0 && channel != pntiw_chan )
+		if ( channel->size() > 0 && channel != pntiw_chan )
 		{
 			const data_descriptor& desc = channel->descriptor();
