commit ad65836d6f3cc3226432a1c8ebd40f9bbc6e50c4 parent e84f4c90b0ee0a50896577521e0d78a42fd8bb05 Author: Michael Savage <mikejsavage@gmail.com> Date: Fri May 19 23:55:10 +0300 renderer_new_vb/ib( array ) helpers Diffstat:
renderer.h | | | 14 | ++++++++++++++ |
diff --git a/renderer.h b/renderer.h @@ -209,6 +209,20 @@ void renderer_draw_mesh( const Mesh & mesh, const RenderState & state ); void renderer_delete_mesh( const Mesh & mesh ); /* + * renderer_new_*( array ) helpers + */ + +template< typename T > +VB renderer_new_vb( const array< T > data, BufferUsage usage = BUFFERUSAGE_STATIC ) { + return renderer_new_vb( data.ptr(), data.num_bytes(), usage ); +} + +template< typename T > +VB renderer_new_ib( const array< T > data, BufferUsage usage = BUFFERUSAGE_STATIC ) { + return renderer_new_ib( data.ptr(), data.num_bytes(), usage ); +} + +/* * cheesy renderer_ub_data helper */