Index: /trunk/nv/gl/gl_device.hh
===================================================================
--- /trunk/nv/gl/gl_device.hh	(revision 41)
+++ /trunk/nv/gl/gl_device.hh	(revision 42)
@@ -23,4 +23,5 @@
 		virtual window* create_window( uint16 width, uint16 height );
 		virtual program* create_program( const string& vs_source, const string& fs_source );
+		virtual vertex_buffer* create_vertex_buffer( buffer_hint hint, int size, void* source = nullptr );
 		virtual ~gl_device();
 	private:
Index: /trunk/nv/gl/gl_enum.hh
===================================================================
--- /trunk/nv/gl/gl_enum.hh	(revision 41)
+++ /trunk/nv/gl/gl_enum.hh	(revision 42)
@@ -15,4 +15,5 @@
 #include <nv/interface/clear_state.hh>
 #include <nv/interface/render_state.hh>
+#include <nv/interface/vertex_buffer.hh>
 #include <nv/types.hh>
 
@@ -28,4 +29,5 @@
 	unsigned int stencil_function_to_enum( stencil_test_face::function_type type );
 	unsigned int stencil_operation_to_enum( stencil_test_face::operation type );
+	unsigned int buffer_hint_to_enum( buffer_hint hint );
 
 	unsigned int type_to_gl_enum( type type );
Index: /trunk/nv/gl/gl_vertex_buffer.hh
===================================================================
--- /trunk/nv/gl/gl_vertex_buffer.hh	(revision 42)
+++ /trunk/nv/gl/gl_vertex_buffer.hh	(revision 42)
@@ -0,0 +1,35 @@
+// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
+// http://chaosforge.org/
+//
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+/**
+ * @file gl_vertex_buffer.hh
+ * @author Kornel Kisielewicz epyon@chaosforge.org
+ * @brief Vertex buffer implementation
+ */
+
+#ifndef NV_GL_VERTEX_BUFFER_HH
+#define NV_GL_VERTEX_BUFFER_HH
+
+#include <nv/interface/vertex_buffer.hh>
+#include <nv/gl/gl_names.hh>
+
+namespace nv
+{
+
+	class gl_vertex_buffer : public vertex_buffer
+	{
+	public:
+		gl_vertex_buffer( buffer_hint hint, int size, void* data = nullptr );
+		virtual void assign( void* data );
+		virtual void bind();
+		virtual void unbind();
+		virtual bool is_valid() const;
+	private:
+		gl_buffer_name m_name;
+	};
+
+} // namespace nv
+
+#endif // NV_GL_VERTEX_BUFFER_HH
Index: /trunk/nv/interface/device.hh
===================================================================
--- /trunk/nv/interface/device.hh	(revision 41)
+++ /trunk/nv/interface/device.hh	(revision 42)
@@ -15,4 +15,5 @@
 #include <nv/common.hh>
 #include <nv/string.hh>
+#include <nv/interface/vertex_buffer.hh>
 
 namespace nv
@@ -26,4 +27,5 @@
 		virtual window* create_window( uint16 width, uint16 height ) = 0;
 		virtual program* create_program( const string& vs_source, const string& fs_source ) = 0;
+		virtual vertex_buffer* create_vertex_buffer( buffer_hint hint, int size, void* source = nullptr ) = 0;
 	};
 
Index: /trunk/nv/interface/vertex_buffer.hh
===================================================================
--- /trunk/nv/interface/vertex_buffer.hh	(revision 42)
+++ /trunk/nv/interface/vertex_buffer.hh	(revision 42)
@@ -0,0 +1,44 @@
+// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
+// http://chaosforge.org/
+//
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+/**
+ * @file vertex_buffer.hh
+ * @author Kornel Kisielewicz epyon@chaosforge.org
+ * @brief Vertex buffer class
+ */
+
+#ifndef NV_VERTEX_BUFFER_HH
+#define NV_VERTEX_BUFFER_HH
+
+#include <nv/common.hh>
+
+namespace nv
+{
+
+	enum buffer_hint
+	{
+		STATIC_DRAW,
+		STREAM_DRAW,
+		DYNAMIC_DRAW
+	};
+
+	class vertex_buffer
+	{
+	public:
+		vertex_buffer( buffer_hint hint, int size ) { m_size = size; m_hint = hint; }
+		virtual void assign( void* data ) = 0;
+		virtual void bind() = 0;
+		virtual void unbind() = 0;
+		virtual bool is_valid() const = 0;
+		int get_size() const { return m_size; };
+		buffer_hint get_hint() const { return m_hint; };
+	protected:
+		int         m_size;
+		buffer_hint m_hint;
+	};
+
+} // namespace nv
+
+#endif // NV_VERTEX_BUFFER_HH
Index: /trunk/src/gl/gl_device.cc
===================================================================
--- /trunk/src/gl/gl_device.cc	(revision 41)
+++ /trunk/src/gl/gl_device.cc	(revision 42)
@@ -7,4 +7,5 @@
 #include "nv/gl/gl_window.hh"
 #include "nv/gl/gl_program.hh"
+#include "nv/gl/gl_vertex_buffer.hh"
 #include "nv/logging.hh"
 #include "nv/lib/sdl12.hh"
@@ -50,4 +51,8 @@
 }
 
+vertex_buffer* gl_device::create_vertex_buffer( buffer_hint hint, int size, void* source /*= nullptr */ )
+{
+	return new gl_vertex_buffer( hint, size, source );
+}
 
 gl_device::~gl_device()
@@ -55,2 +60,3 @@
 	SDL_Quit();
 }
+
Index: /trunk/src/gl/gl_enum.cc
===================================================================
--- /trunk/src/gl/gl_enum.cc	(revision 41)
+++ /trunk/src/gl/gl_enum.cc	(revision 42)
@@ -123,4 +123,15 @@
 }
 
+unsigned int nv::buffer_hint_to_enum( buffer_hint hint )
+{
+	switch( hint )
+	{
+	case STATIC_DRAW   : return GL_STATIC_DRAW;
+	case STREAM_DRAW   : return GL_STREAM_DRAW;
+	case DYNAMIC_DRAW  : return GL_DYNAMIC_DRAW;
+	default : return 0; // TODO: throw!
+	}
+}
+
 unsigned int nv::type_to_gl_enum( type type )
 {
Index: /trunk/src/gl/gl_vertex_buffer.cc
===================================================================
--- /trunk/src/gl/gl_vertex_buffer.cc	(revision 42)
+++ /trunk/src/gl/gl_vertex_buffer.cc	(revision 42)
@@ -0,0 +1,41 @@
+// Copyright (C) 2012-2013 Kornel Kisielewicz
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+
+#include "nv/gl/gl_vertex_buffer.hh"
+
+#include "nv/lib/gl.hh"
+#include "nv/gl/gl_enum.hh"
+
+using namespace nv;
+
+gl_vertex_buffer::gl_vertex_buffer( buffer_hint hint, int size, void* data ) 
+	: vertex_buffer( hint, size ), m_name()
+{
+	if (data)
+	{
+		assign( data );
+	}
+}
+
+void gl_vertex_buffer::assign( void* data )
+{
+	glBindBuffer( GL_ARRAY_BUFFER, m_name.get_value() );
+	glBufferData( GL_ARRAY_BUFFER, m_size, data, buffer_hint_to_enum( m_hint ) );
+	glBindBuffer( GL_ARRAY_BUFFER, 0);
+}
+
+void gl_vertex_buffer::bind()
+{
+	glBindBuffer( GL_ARRAY_BUFFER, m_name.get_value() );
+}
+
+void gl_vertex_buffer::unbind()
+{
+	glBindBuffer( GL_ARRAY_BUFFER, 0 );
+}
+
+bool gl_vertex_buffer::is_valid() const
+{
+	return m_name.is_valid();
+}
