Index: trunk/nv.lua
===================================================================
--- trunk/nv.lua	(revision 120)
+++ trunk/nv.lua	(revision 121)
@@ -12,5 +12,31 @@
 		includedirs { os.getenv("GLM_PATH") }
 	configuration "gmake"
-		buildoptions "-std=c++0x"
+		if _ACTION == "gmake-clang" then
+			buildoptions { 
+				"-std=c++11",
+				"-Weverything",
+				-- obviously we don't care about C++98 compatibility
+				"-Wno-c++98-compat", 
+				-- obviously we don't care about C++98 compatibility
+				"-Wno-c++98-compat-pedantic",
+				-- an evil one has to embrace
+				"-Wno-float-equal",
+				-- padding is a non-issue at the moment
+				"-Wno-padded",
+				-- we don't want to list all 128 keys of the key
+				-- enum each time, right?
+				"-Wno-switch-enum",
+				-- yes, we need exit time destructors for libraries
+				"-Wno-exit-time-destructors",
+				-- same here
+				"-Wno-global-constructors",
+				-- no reasonable way to fix this with abstract 
+				-- interfaces.
+				"-Wno-weak-vtables"
+			}
+		else
+			buildoptions { "-std=c++0x" }
+		end
+
 	configuration "vs*"
 		defines { "_SECURE_SCL=0", "_CRT_SECURE_NO_WARNINGS=1" }
Index: trunk/nv/common.hh
===================================================================
--- trunk/nv/common.hh	(revision 120)
+++ trunk/nv/common.hh	(revision 121)
@@ -128,4 +128,13 @@
 } 
 
+// MSVC and GCC is too stupid to notice fully covered enums, clang 
+// is picky about it
+#if NV_COMPILER == NV_CLANG
+#define NV_RETURN_COVERED_DEFAULT( value ) 
+#else
+#define NV_RETURN_COVERED_DEFAULT( value ) default : return value
+#endif
+
+
 namespace nv
 {
Index: trunk/nv/gfx/cached_buffer.hh
===================================================================
--- trunk/nv/gfx/cached_buffer.hh	(revision 120)
+++ trunk/nv/gfx/cached_buffer.hh	(revision 121)
@@ -12,4 +12,5 @@
 
 #include <nv/common.hh>
+#include <nv/math.hh>
 #include <nv/interface/vertex_buffer.hh>
 
@@ -109,6 +110,6 @@
 			if ( !m_full_update && resized )
 			{
-				m_data.erase( m_data.begin() + offset, m_data.end() );
-				m_min = glm::min<int>( m_min, offset );
+				m_data.erase( m_data.begin() + (int)offset, m_data.end() );
+				m_min = nv::min<size_t>( m_min, offset );
 				m_full_update = true;
 			}
@@ -120,7 +121,7 @@
 			else if ( updated )
 			{
-				std::copy( bv.cbegin(), bv.cend(), m_data.begin() + offset );
-				m_min = glm::min<size_t>( m_min, offset );
-				m_max = glm::max<size_t>( m_max, offset + bv.size() );
+				std::copy( bv.cbegin(), bv.cend(), m_data.begin() + (int)offset );
+				m_min = nv::min<size_t>( m_min, offset );
+				m_max = nv::max<size_t>( m_max, offset + bv.size() );
 			}
 			return m_full_update;
@@ -166,6 +167,6 @@
 			{
 				m_buffer->bind();
-				int offset = m_min * value_type_size;
-				int size   = (m_max-m_min) * value_type_size;
+				size_t offset = m_min * value_type_size;
+				size_t size   = (m_max-m_min) * value_type_size;
 				m_buffer->update( m_data.data() + m_min, offset, size );
 				m_buffer->unbind();
@@ -177,10 +178,10 @@
 		}
 
-		int get_max_size() const
+		size_t get_max_size() const
 		{ 
 			return m_buffer->get_size() / value_type_size;
 		}
 
-		int get_size() const
+		size_t get_size() const
 		{ 
 			return m_data.size(); 
@@ -197,5 +198,5 @@
 		}
 	private:
-		void create_buffer( int size )
+		void create_buffer( size_t size )
 		{
 			delete m_buffer;
Index: trunk/nv/gfx/image.hh
===================================================================
--- trunk/nv/gfx/image.hh	(revision 120)
+++ trunk/nv/gfx/image.hh	(revision 121)
@@ -9,6 +9,6 @@
 
 #include <nv/common.hh>
+#include <nv/math.hh>
 #include <nv/interface/image_data.hh>
-#include <glm/glm.hpp>
 
 namespace nv
@@ -19,9 +19,9 @@
 	struct region
 	{
-		glm::ivec2 pos;
-		glm::ivec2 size;
+		ivec2 pos;
+		ivec2 size;
 
 		region() : pos(0,0), size(0,0) {}
-		region( glm::ivec2 pos, glm::ivec2 size ) : pos(pos), size(size) {}
+		region( ivec2 apos, ivec2 asize ) : pos(apos), size(asize) {}
 	};
 
@@ -42,5 +42,5 @@
 		 * @arg[in] depth :  Depth of the image.
 		 */
-		image( glm::ivec2 size, size_t depth );
+		image( ivec2 size, size_t depth );
 		/**
 		 * Constructor
@@ -61,5 +61,5 @@
 		 * 	reversed or not.
 		 */
-		image( glm::ivec2 size, size_t depth, const uint8 * data, bool reversed = false );
+		image( ivec2 size, size_t depth, const uint8 * data, bool reversed = false );
 		/**
 		 * Fills the image with a given value.
@@ -75,5 +75,5 @@
 		 * @arg[in] stride : 
 		 */
-		void set_region( region r, const uint8 * data, size_t stride = 0 );
+		void set_region( region r, const uint8 * data, int stride = 0 );
 		/**
 		 * Default destructor. Deallocates data.
@@ -91,5 +91,5 @@
 		 * @return Returns the size of the image as a vector.
 		 */
-		const glm::ivec2 get_size() const { return m_size; }
+		ivec2 get_size() const { return m_size; }
 		/**
 		 * Getter for depth.
@@ -97,12 +97,9 @@
 		 * @return Returns depth of the image.
 		 */
-		const size_t get_depth() const { return m_depth; }
+		size_t get_depth() const { return m_depth; }
 	protected:
-		/** Defines the size of the image as a vector. */
-		glm::ivec2 m_size;
-		/** Deefines the depth of the image. */
-		size_t     m_depth;
-		/** Holder for data. */
-		uint8*     m_data;
+		ivec2  m_size;  //!< Defines the size of the image as a vector.
+		size_t m_depth; //!< Defines the depth of the image
+		uint8* m_data;  //!< Holder for data
 	};
 
Index: trunk/nv/gfx/texture_atlas.hh
===================================================================
--- trunk/nv/gfx/texture_atlas.hh	(revision 120)
+++ trunk/nv/gfx/texture_atlas.hh	(revision 121)
@@ -9,6 +9,6 @@
 
 #include <nv/common.hh>
+#include <nv/math.hh>
 #include <nv/gfx/image.hh>
-#include <glm/glm.hpp>
 #include <vector>
 
@@ -19,14 +19,14 @@
 	{
 	public:
-		texture_atlas( glm::ivec2 size, size_t depth );
-		region get_region( glm::ivec2 size );
+		texture_atlas( ivec2 size, size_t depth );
+		region get_region( ivec2 size );
 		void clear();
-		const size_t get_used() const { return m_used; }
+		size_t get_used() const { return m_used; }
 	protected:
-		int fit( size_t index, glm::ivec2 size );
+		int fit( size_t index, ivec2 size );
 		void merge();
 	private:
 		size_t  m_used;
-		std::vector<glm::ivec3> m_nodes;
+		std::vector<ivec3> m_nodes;
 	};
 
Index: trunk/nv/gfx/texture_font.hh
===================================================================
--- trunk/nv/gfx/texture_font.hh	(revision 120)
+++ trunk/nv/gfx/texture_font.hh	(revision 121)
@@ -10,7 +10,7 @@
 #include <nv/common.hh>
 #include <string>
+#include <unordered_map>
+#include <nv/math.hh>
 #include <nv/gfx/texture_atlas.hh>
-#include <glm/glm.hpp>
-#include <unordered_map>
 
 namespace nv
@@ -18,11 +18,11 @@
 	struct texture_glyph
 	{
-		uint16 charcode; ///< Character code value.
-		glm::ivec2 size; ///< Width and height of the glyph.
-		glm::ivec2 offset; ///< Offset of the glyph's position from the base line.
-		glm::vec2 advance; ///< Cursor advance distance.
-		glm::vec2 tl; ///< Top-left of the glyph's bounding box.
-		glm::vec2 br; ///< Bottom-right of the glyph's bounding box.
-		std::unordered_map< uint16, float > kerning; ///< Kerning space between other characters.
+		uint16 charcode;//!< Character code value.
+		ivec2  size;    //!< Width and height of the glyph.
+		ivec2  offset;  //!< Offset of the glyph's position from the base line.
+		vec2   advance; //!< Cursor advance distance.
+		vec2   tl;      //!< Top-left of the glyph's bounding box.
+		vec2   br;      //!< Bottom-right of the glyph's bounding box.
+		std::unordered_map< uint16, float > kerning; //!< Kerning space between other characters.
 
 		/**
@@ -34,8 +34,8 @@
 		 *Gets the kerning space between this character and the requested character.
 		 *
-		 *@param charcode The character to get the spacing for.
+		 *@param other The character to get the spacing for.
 		 *@returns The amount of space for kerning.
 		 */
-		float get_kerning( const uint16 charcode ); 
+		float get_kerning( const uint16 other ); 
 	};
 
@@ -46,21 +46,23 @@
 			const texture_glyph* get_glyph( uint16 charcode ) const;
 			bool load_glyphs( const std::string& codes );
+			float get_size() const { return m_size; }
 			~texture_font();
 		private:
 			void generate_kerning();
 		private:
-			std::unordered_map< uint16, texture_glyph > m_glyphs; ///< Hash table of glyphs for this font.
-			texture_atlas* m_atlas; ///< Atlas Image object for this font.
-			std::string m_filename; ///< Name of the file.
-			float m_size; ///< Font size.
-			float m_height; ///< Height of the font. (x-height?)
-			float m_linegap; ///< Amount of space between lines.
-			float m_ascender; ///< Height of ascender lines (lines extending above the glyph's x-height).
-			float m_descender; ///< Height of descender lines (lines extending below the glyph's x-height).
-			bool m_hinting; ///< Whether or not glyph hints are used.
-			bool m_filtering; ///< Whether or not glyphs are color filtered for LCD displays.
-			uint8 m_lcd_weights[5]; ///< Color filtering weights.
-			void* m_rlibrary; ///< Pointer to the library.
-			void* m_rface; ///< Pointer to the font face.
+			std::unordered_map< uint16, texture_glyph > m_glyphs; //!< Hash table of glyphs for this font.
+
+			texture_atlas* m_atlas; //!< Atlas Image object for this font.
+			std::string m_filename; //!< Name of the file.
+			float m_size;           //!< Font size.
+			float m_height;         //!< Height of the font. (x-height?)
+			float m_linegap;        //!< Amount of space between lines.
+			float m_ascender;       //!< Height of ascender lines (lines extending above the glyph's x-height).
+			float m_descender;      //!< Height of descender lines (lines extending below the glyph's x-height).
+			bool m_hinting;         //!< Whether or not glyph hints are used.
+			bool m_filtering;       //!< Whether or not glyphs are color filtered for LCD displays.
+			uint8 m_lcd_weights[5]; //!< Color filtering weights.
+			void* m_rlibrary;       //!< Pointer to the library.
+			void* m_rface;          //!< Pointer to the font face.
 	};
 }
Index: trunk/nv/gl/gl_context.hh
===================================================================
--- trunk/nv/gl/gl_context.hh	(revision 120)
+++ trunk/nv/gl/gl_context.hh	(revision 121)
@@ -23,5 +23,5 @@
 		virtual void clear( const clear_state& cs );
 		// temporary
-		virtual void draw( primitive prim, const render_state& rs, program* p, vertex_array* va, int count );
+		virtual void draw( primitive prim, const render_state& rs, program* p, vertex_array* va, size_t count );
 		virtual const ivec4& get_viewport();
 		virtual void set_viewport( const ivec4& viewport );
@@ -29,7 +29,7 @@
 	private:
 		void force_apply_render_state( const render_state& state );
-		void force_apply_stencil_face( int face, const stencil_test_face& stencil );
+		void force_apply_stencil_face( unsigned face, const stencil_test_face& stencil );
 		void apply_stencil_test( const stencil_test& stencil );
-		void apply_stencil_face( int face, stencil_test_face& stencil, const stencil_test_face& new_stencil );
+		void apply_stencil_face( unsigned face, stencil_test_face& stencil, const stencil_test_face& new_stencil );
 		void apply_scissor_test( const scissor_test& scissor );
 		void apply_depth_test( const depth_test& depth );
Index: trunk/nv/gl/gl_device.hh
===================================================================
--- trunk/nv/gl/gl_device.hh	(revision 120)
+++ trunk/nv/gl/gl_device.hh	(revision 121)
@@ -23,6 +23,6 @@
 		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 index_buffer* create_index_buffer( buffer_hint hint, int size, void* source = nullptr );
+		virtual vertex_buffer* create_vertex_buffer( buffer_hint hint, size_t size, void* source = nullptr );
+		virtual index_buffer* create_index_buffer( buffer_hint hint, size_t size, void* source = nullptr );
 		virtual vertex_array* create_vertex_array();
 		virtual image_data* create_image_data( const std::string& filename ); // temporary
Index: trunk/nv/gl/gl_names.hh
===================================================================
--- trunk/nv/gl/gl_names.hh	(revision 120)
+++ trunk/nv/gl/gl_names.hh	(revision 121)
@@ -21,6 +21,6 @@
 	{
 	public:
-		gl_name() : m_value( 0 ) {};
-		int get_value() const { return m_value; }
+		gl_name() : m_value( 0 ) {}
+		unsigned get_value() const { return m_value; }
 		bool is_valid() const { return m_value != 0; }
 	protected:
Index: trunk/nv/gl/gl_program.hh
===================================================================
--- trunk/nv/gl/gl_program.hh	(revision 120)
+++ trunk/nv/gl/gl_program.hh	(revision 121)
@@ -24,6 +24,6 @@
 	{
 	public:
-		explicit gl_shader( uint32 shader_type );
-		gl_shader( uint32 shader_type, const string& shader_code );
+		explicit gl_shader( uint32 sh_type );
+		gl_shader( uint32 sh_type, const string& shader_code );
 		~gl_shader();
 
Index: trunk/nv/gl/gl_texture2d.hh
===================================================================
--- trunk/nv/gl/gl_texture2d.hh	(revision 120)
+++ trunk/nv/gl/gl_texture2d.hh	(revision 121)
@@ -24,5 +24,5 @@
 		gl_texture2d( ivec2 size, image_format aformat, datatype adatatype, sampler asampler, void* data = nullptr );
 		virtual void assign( void* data );
-		virtual void bind( int slot = 0 );
+		virtual void bind( size_t slot = 0 );
 		virtual void unbind();
 		virtual bool is_valid() const;
Index: trunk/nv/gl/gl_vertex_buffer.hh
===================================================================
--- trunk/nv/gl/gl_vertex_buffer.hh	(revision 120)
+++ trunk/nv/gl/gl_vertex_buffer.hh	(revision 121)
@@ -22,6 +22,6 @@
 	{
 	public:
-		gl_vertex_buffer( buffer_hint hint, int size, void* data = nullptr );
-		virtual void update( void* data, int offset, int size );
+		gl_vertex_buffer( buffer_hint hint, size_t size, void* data = nullptr );
+		virtual void update( void* data, size_t offset, size_t size );
 		virtual void bind();
 		virtual void unbind();
@@ -34,6 +34,6 @@
 	{
 	public:
-		gl_index_buffer( buffer_hint hint, int size, void* data = nullptr );
-		virtual void update( void* data, int offset, int size );
+		gl_index_buffer( buffer_hint hint, size_t size, void* data = nullptr );
+		virtual void update( void* data, size_t offset, size_t size );
 		virtual void bind();
 		virtual void unbind();
Index: trunk/nv/gl/gl_window.hh
===================================================================
--- trunk/nv/gl/gl_window.hh	(revision 120)
+++ trunk/nv/gl/gl_window.hh	(revision 121)
@@ -30,5 +30,5 @@
 		virtual bool poll_event( io_event& event );
 		virtual context* get_context() { return m_context; }
-		virtual device* get_device() { return m_device; };
+		virtual device* get_device() { return m_device; }
 
 		virtual void swap_buffers();
Index: trunk/nv/gui/gui_style.hh
===================================================================
--- trunk/nv/gui/gui_style.hh	(revision 120)
+++ trunk/nv/gui/gui_style.hh	(revision 121)
@@ -36,5 +36,5 @@
 			bool resolve( element* e, const std::string& entry, int type );
 		protected:
-			lua::state m_lua; //< separate lua state for style calculation
+			lua::state m_lua; //!< separate lua state for style calculation
 		};
 
Index: trunk/nv/interface/clear_state.hh
===================================================================
--- trunk/nv/interface/clear_state.hh	(revision 120)
+++ trunk/nv/interface/clear_state.hh	(revision 121)
@@ -28,6 +28,6 @@
 
 		color_mask() : red( true ), green( true ), blue( true ), alpha( true ) {}
-		color_mask( bool red, bool green, bool blue, bool alpha )
-			: red( red ), green( green ), blue( blue ), alpha( alpha ) {}
+		color_mask( bool r, bool g, bool b, bool a )
+			: red( r ), green( g ), blue( b ), alpha( a ) {}
 
 		bool operator==(const color_mask& rhs) const
Index: trunk/nv/interface/context.hh
===================================================================
--- trunk/nv/interface/context.hh	(revision 120)
+++ trunk/nv/interface/context.hh	(revision 121)
@@ -37,8 +37,9 @@
 		virtual void clear( const clear_state& cs ) = 0;
 		// temporary
-		virtual void draw( primitive prim, const render_state& rs, program* p, vertex_array* va, int count ) = 0;
+		virtual void draw( primitive prim, const render_state& rs, program* p, vertex_array* va, size_t count ) = 0;
 		virtual void apply_render_state( const render_state& state ) = 0;
 		virtual const ivec4& get_viewport() = 0;
 		virtual void set_viewport( const ivec4& viewport ) = 0;
+		virtual ~context() {}
 	protected:
 		clear_state  m_clear_state;
Index: trunk/nv/interface/device.hh
===================================================================
--- trunk/nv/interface/device.hh	(revision 120)
+++ trunk/nv/interface/device.hh	(revision 121)
@@ -30,6 +30,6 @@
 		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;
-		virtual index_buffer* create_index_buffer( buffer_hint hint, int size, void* source = nullptr ) = 0;
+		virtual vertex_buffer* create_vertex_buffer( buffer_hint hint, size_t size, void* source = nullptr ) = 0;
+		virtual index_buffer* create_index_buffer( buffer_hint hint, size_t size, void* source = nullptr ) = 0;
 		virtual vertex_array* create_vertex_array() = 0;
 		virtual image_data* create_image_data( const std::string& filename ) = 0; // temporary
@@ -55,4 +55,5 @@
 			return result;
 		}
+		virtual ~device() {}
 	};
 
Index: trunk/nv/interface/image_data.hh
===================================================================
--- trunk/nv/interface/image_data.hh	(revision 120)
+++ trunk/nv/interface/image_data.hh	(revision 121)
@@ -15,6 +15,6 @@
 
 #include <nv/common.hh>
+#include <nv/math.hh>
 #include <algorithm>
-#include <glm/glm.hpp>
 
 namespace nv
@@ -23,8 +23,8 @@
 	{
 	public:
-		image_data( glm::ivec2 size, size_t depth, const uint8 * data ) 
+		image_data( ivec2 size, size_t depth, const uint8 * data ) 
 			: m_size( size ), m_depth( depth ), m_data( nullptr )
 		{ 
-			std::size_t bsize = m_size.x * m_size.y * m_depth;
+			std::size_t bsize = static_cast<std::size_t>(m_size.x * m_size.y) * m_depth;
 			m_data = new uint8[ bsize ]; 
 			std::copy( data, data + bsize, m_data );
@@ -32,11 +32,11 @@
 		uint8* release_data() { uint8* r = m_data; m_data = nullptr; return r; }
 		const uint8 * get_data()    const { return m_data; }
-		const glm::ivec2 get_size() const { return m_size; }
-		const size_t get_depth()    const { return m_depth; }
+		const ivec2 get_size() const { return m_size; }
+		size_t get_depth()    const { return m_depth; }
 		~image_data() {	if (m_data) delete[] m_data; }
 	private:
-		glm::ivec2 m_size;  //< Defines the size of the image as a vector
-		size_t     m_depth; //< Defines the depth of the image
-		uint8*     m_data;  //< Holder for data
+		ivec2  m_size;  //!< Defines the size of the image as a vector
+		size_t m_depth; //!< Defines the depth of the image
+		uint8* m_data;  //!< Holder for data
 	};
 }
Index: trunk/nv/interface/mesh.hh
===================================================================
--- trunk/nv/interface/mesh.hh	(revision 120)
+++ trunk/nv/interface/mesh.hh	(revision 121)
@@ -35,5 +35,5 @@
 		virtual size_t get_size() const = 0;
 		virtual void* get_data() const = 0;
-		virtual ~vertex_attribute_base() {};
+		virtual ~vertex_attribute_base() {}
 	private:
 		string m_name;
@@ -52,6 +52,6 @@
 		const list& get() const { return m_list; }
 		list& get() { return m_list; }
-		virtual datatype get_base_type() const { return type_to_enum<base_type>::type; };
-		virtual size_t get_components() const { return datatype_traits<T>::size; };
+		virtual datatype get_base_type() const { return type_to_enum<base_type>::type; }
+		virtual size_t get_components() const { return datatype_traits<T>::size; }
 		virtual size_t get_count() const { return m_list.size(); }
 		virtual size_t get_size() const { return m_list.size() * sizeof(T); }
@@ -67,6 +67,6 @@
 		typedef std::unordered_map< std::string, vertex_attribute_base* > map;
 
-		mesh( primitive p = TRIANGLES, culling::order_type c = culling::CCW ) 
-			: m_map(), m_indices(), m_primitive( p ), m_order( c ) {}
+		mesh( primitive p = TRIANGLES ) 
+			: m_map(), m_indices(), m_primitive( p ) {}
 		template <typename T>
 		vertex_attribute<T>* add_attribute( const string& attr ) 
@@ -126,6 +126,4 @@
 		vertex_attribute_base* m_indices;
 		primitive              m_primitive;
-		culling::order_type    m_order;
-
 	};
 
Index: trunk/nv/interface/texture2d.hh
===================================================================
--- trunk/nv/interface/texture2d.hh	(revision 120)
+++ trunk/nv/interface/texture2d.hh	(revision 121)
@@ -63,5 +63,5 @@
 			m_size( size ), m_format( aformat ), m_datatype( adatatype ), m_sampler( asampler ) {}
 		virtual void assign( void* data ) = 0;
-		virtual void bind( int slot = 0 ) = 0;
+		virtual void bind( size_t slot = 0 ) = 0;
 		virtual void unbind() = 0;
 		virtual bool is_valid() const = 0;
@@ -72,4 +72,5 @@
 		datatype get_datatype() const { return m_datatype; }
 		const sampler& get_sampler() const { return m_sampler; }
+		virtual ~texture2d() {}
 	protected:
 		ivec2        m_size;
Index: trunk/nv/interface/vertex_buffer.hh
===================================================================
--- trunk/nv/interface/vertex_buffer.hh	(revision 120)
+++ trunk/nv/interface/vertex_buffer.hh	(revision 121)
@@ -32,14 +32,14 @@
 	{
 	public:
-		buffer( buffer_hint hint, int size ) { m_size = size; m_hint = hint; }
-		virtual void update( void* data, int offset, int size ) = 0;
+		buffer( buffer_hint hint, size_t size ) { m_size = size; m_hint = hint; }
+		virtual void update( void* data, size_t offset, size_t size ) = 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; };
+		size_t get_size() const { return m_size; }
+		buffer_hint get_hint() const { return m_hint; }
         virtual ~buffer() {}
 	protected:
-		int         m_size;
+		size_t      m_size;
 		buffer_hint m_hint;
 	};
@@ -48,5 +48,5 @@
 	{
 	public:
-		vertex_buffer( buffer_hint hint, int size ) : buffer( hint, size ) {}
+		vertex_buffer( buffer_hint hint, size_t size ) : buffer( hint, size ) {}
 	};
 
@@ -54,5 +54,5 @@
 	{
 	public:
-		index_buffer( buffer_hint hint, int size ) : buffer( hint, size ) {}
+		index_buffer( buffer_hint hint, size_t size ) : buffer( hint, size ) {}
 	};
 
@@ -60,5 +60,5 @@
 	{
 	public:
-		vertex_buffer_attribute( vertex_buffer* buffer, datatype datatype, int components, int offset = 0, int stride = 0, bool owner = true )
+		vertex_buffer_attribute( vertex_buffer* buffer, datatype datatype, size_t components, size_t offset = 0, size_t stride = 0, bool owner = true )
 			: m_buffer( buffer ), m_datatype( datatype ), m_components( components ), m_offset( offset ), m_stride( stride ), m_owner( owner ) {}
 
@@ -66,7 +66,7 @@
 		void set_buffer( vertex_buffer* b, bool owner ) { if (m_owner) delete m_buffer; m_buffer = b; m_owner = owner; }
 		datatype get_datatype() const { return m_datatype; }
-		int get_components() const { return m_components; }
-		int get_offset() const { return m_offset; }
-		int get_stride() const { return m_stride; }
+		size_t get_components() const { return m_components; }
+		size_t get_offset() const { return m_offset; }
+		size_t get_stride() const { return m_stride; }
 
 		~vertex_buffer_attribute()
@@ -82,8 +82,8 @@
 		vertex_buffer* m_buffer;
 		datatype       m_datatype;
-		int  m_components;
-		int  m_offset;
-		int  m_stride;
-		bool m_owner;
+		size_t  m_components;
+		size_t  m_offset;
+		size_t  m_stride;
+		bool    m_owner;
 	};
 
@@ -94,9 +94,9 @@
 	public:
 		vertex_array() : m_map(), m_index( nullptr ), m_index_owner( false ), m_index_type(USHORT) {}
-		void add_vertex_buffer( int location, vertex_buffer* buffer, datatype datatype, int components, int offset = 0, int stride = 0, bool owner = true ) 
+		void add_vertex_buffer( int location, vertex_buffer* buffer, datatype datatype, size_t components, size_t offset = 0, size_t stride = 0, bool owner = true ) 
 		{
 			auto p = new vertex_buffer_attribute( buffer, datatype, components, offset, stride, owner );
 			m_map[ location ] = p;
-		};
+		}
 		void update_vertex_buffer( int location, vertex_buffer* b, bool owner ) 
 		{
@@ -106,5 +106,5 @@
 				i->second->set_buffer( b, owner );
 			}
-		};
+		}
 		void set_index_buffer( index_buffer* buffer, datatype datatype, bool owner ) 
 		{ 
@@ -123,5 +123,5 @@
 		virtual void bind() = 0;
 		virtual void unbind() = 0;
-		~vertex_array() { 
+		virtual ~vertex_array() { 
 			for ( vertex_buffer_attribute_map::iterator i = m_map.begin(); 	i != m_map.end(); ++i ) 
 			{
Index: trunk/nv/interface/window.hh
===================================================================
--- trunk/nv/interface/window.hh	(revision 120)
+++ trunk/nv/interface/window.hh	(revision 121)
@@ -33,5 +33,5 @@
 		virtual void swap_buffers() = 0;
 		virtual device* get_device() = 0;
-		virtual ~window() {};
+		virtual ~window() {}
 	};
 
Index: trunk/nv/lib/lua.hh
===================================================================
--- trunk/nv/lib/lua.hh	(revision 120)
+++ trunk/nv/lib/lua.hh	(revision 121)
@@ -32,4 +32,6 @@
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 ******************************************************************************/
+
+#include <nv/common.hh>
 
 #define NV_LUA_DYNAMIC
Index: trunk/nv/logger.hh
===================================================================
--- trunk/nv/logger.hh	(revision 120)
+++ trunk/nv/logger.hh	(revision 121)
@@ -43,5 +43,5 @@
 		 * Enforcement of virtual destructor.
 		 */
-		virtual ~log_sink() {};
+		virtual ~log_sink() {}
 	};
 
@@ -62,5 +62,5 @@
 		 * overriding cutoff.
 		 */
-		explicit logger( int llevel )
+		explicit logger( unsigned int llevel )
 		{
 			m_level = llevel;
Index: trunk/nv/logging.hh
===================================================================
--- trunk/nv/logging.hh	(revision 120)
+++ trunk/nv/logging.hh	(revision 121)
@@ -14,4 +14,5 @@
 #define NV_LOGGING_HH
 
+#include <nv/common.hh>
 #include <nv/singleton.hh>
 #include <sstream>
@@ -40,10 +41,11 @@
 		{
 			return m_level;
-		};
+		}
 		void set_level( unsigned int level )
 		{
 			m_level = level;
-		};
+		}
 		virtual void log( log_level level, const std::string& message ) = 0;
+		virtual ~logger_base() {}
 	protected:
 		unsigned int m_level;
Index: trunk/nv/lua/lua_glm.hh
===================================================================
--- trunk/nv/lua/lua_glm.hh	(revision 120)
+++ trunk/nv/lua/lua_glm.hh	(revision 121)
@@ -9,5 +9,5 @@
 #include <new>
 #include <nv/common.hh>
-#include <glm/glm.hpp>
+#include <nv/math.hh>
 #include <nv/lib/lua.hh>
 
@@ -41,10 +41,10 @@
 }
 
-template<> inline const char* nlua_metatable_name< glm::ivec2 >() { return "ivec2"; }
-template<> inline const char* nlua_metatable_name< glm::ivec3 >() { return "ivec3"; }
-template<> inline const char* nlua_metatable_name< glm::ivec4 >() { return "ivec4"; }
-template<> inline const char* nlua_metatable_name< glm::vec2  >() { return "vec2"; }
-template<> inline const char* nlua_metatable_name< glm::vec3  >() { return "vec3"; }
-template<> inline const char* nlua_metatable_name< glm::vec4  >() { return "vec4"; }
+template<> inline const char* nlua_metatable_name< nv::ivec2 >() { return "ivec2"; }
+template<> inline const char* nlua_metatable_name< nv::ivec3 >() { return "ivec3"; }
+template<> inline const char* nlua_metatable_name< nv::ivec4 >() { return "ivec4"; }
+template<> inline const char* nlua_metatable_name< nv::vec2  >() { return "vec2"; }
+template<> inline const char* nlua_metatable_name< nv::vec3  >() { return "vec3"; }
+template<> inline const char* nlua_metatable_name< nv::vec4  >() { return "vec4"; }
 
 #endif // NV_LUA_GLM_HH
Index: trunk/nv/lua/lua_raw.hh
===================================================================
--- trunk/nv/lua/lua_raw.hh	(revision 120)
+++ trunk/nv/lua/lua_raw.hh	(revision 121)
@@ -7,6 +7,6 @@
 #define NV_LUA_RAW_HH
 
+#include <nv/common.hh>
 #include <nv/lib/lua.hh>
-#include <nv/common.hh>
 #include <istream>
 #include <string>
Index: trunk/nv/lua/lua_state.hh
===================================================================
--- trunk/nv/lua/lua_state.hh	(revision 120)
+++ trunk/nv/lua/lua_state.hh	(revision 121)
@@ -29,6 +29,6 @@
 		{
 		public:
-			stack_guard( state* L );
-			stack_guard( state& L );
+			stack_guard( state* aL );
+			stack_guard( state& aL );
 			int get_level() const { return m_level; }
 			~stack_guard();
Index: trunk/nv/position.hh
===================================================================
--- trunk/nv/position.hh	(revision 120)
+++ trunk/nv/position.hh	(revision 121)
@@ -14,12 +14,12 @@
 #define NV_POSITION_HH
 
-#include <glm/glm.hpp>
 #include <nv/common.hh>
+#include <nv/math.hh>
 #include <utility>
 
 namespace nv
 {
-	typedef glm::ivec2 position;
-	typedef glm::ivec2 dimension;
+	typedef ivec2 position;
+	typedef ivec2 dimension;
 
 	struct rectangle
@@ -46,17 +46,17 @@
 		 *Creates a new rectangle given an upper-left and lower-right position.
 		 *
-		 *@param ul The position of the upper-left corner of the rectangle.
-		 *@param lr The position of the lower-right corner of the rectangle.
-		 */
-		rectangle( position ul, position lr ) : ul(ul), lr(lr) {}
+		 *@param aul The position of the upper-left corner of the rectangle.
+		 *@param alr The position of the lower-right corner of the rectangle.
+		 */
+		rectangle( position aul, position alr ) : ul(aul), lr(alr) {}
 		
 		/**
 		 *Creates a new rectangle given an upper-left position, width, and height.
 		 *
-		 *@param ul The position of the upper-left corner of the rectangle.
+		 *@param aul The position of the upper-left corner of the rectangle.
 		 *@param width The width of the rectangle.
 		 *@param height The height of the rectangle.
 		 */
-		rectangle( position ul, value_type width, value_type height ) : ul(ul), lr(ul + position(width,height)) {}
+		rectangle( position aul, value_type width, value_type height ) : ul(aul), lr(aul + position(width,height)) {}
         
         /**
@@ -269,7 +269,7 @@
 		{
 			if (r.contains(*this)) return false;
-			ul = glm::max( ul, r.ul );
-			lr = glm::min( lr, r.lr );
-			ul = glm::min( ul, lr );
+			ul = nv::max( ul, r.ul );
+			lr = nv::min( lr, r.lr );
+			ul = nv::min( ul, lr );
 			return true;
 		}
@@ -284,6 +284,6 @@
 		{
 			if ( r.get_width() < get_width() || r.get_height() < get_height() ) return false;
-			(*this) += glm::min( r.ul - ul, position() );
-			(*this) -= glm::min( lr - r.lr, position() );
+			(*this) += nv::min( r.ul - ul, position() );
+			(*this) -= nv::min( lr - r.lr, position() );
 			return true;
 		}
@@ -305,6 +305,6 @@
 		void include_point( position p )
 		{
-			lr = glm::max( lr, p );
-			ul = glm::min( ul, p );
+			lr = nv::max( lr, p );
+			ul = nv::min( ul, p );
 		}
 
Index: trunk/nv/resource.hh
===================================================================
--- trunk/nv/resource.hh	(revision 120)
+++ trunk/nv/resource.hh	(revision 121)
@@ -30,4 +30,5 @@
 		uid get_rid() const { return m_rid; }
 		uid get_size() const { return m_size; }
+		virtual ~resource() {}
 	private:
 		uint32 m_size;
Index: trunk/nv/time.hh
===================================================================
--- trunk/nv/time.hh	(revision 120)
+++ trunk/nv/time.hh	(revision 121)
@@ -24,10 +24,10 @@
 	 * @returns amount of ticks
 	 */
-	volatile uint64 get_ticks();
+	uint64 get_ticks();
 
 	/**
 	 * Performs an operating system sleep call.
 	 *
-	 * @param time time in milliseconds to sleep
+	 * @param ms time in milliseconds to sleep
 	 */
 	void sleep( uint32 ms );
Index: trunk/nv/types.hh
===================================================================
--- trunk/nv/types.hh	(revision 120)
+++ trunk/nv/types.hh	(revision 121)
@@ -6,6 +6,6 @@
 #define NV_TYPES_HH
 
-#include <glm/glm.hpp>
 #include <nv/common.hh>
+#include <nv/math.hh>
 #include <nv/object.hh>
 #include <type_traits>
@@ -44,52 +44,4 @@
 	};
 
-	template <typename T> 
-	struct datatype_traits 
-	{
-		typedef T type;
-		typedef T base_type;
-		static const size_t size = 1;
-	};
-
-	template <typename T> 
-	struct datatype_traits< glm::detail::tvec2<T> > 
-	{
-		typedef glm::detail::tvec2<T> type;
-		typedef typename type::value_type base_type;
-		static const size_t size = 2;
-	};
-
-	template <typename T> 
-	struct datatype_traits< glm::detail::tvec3<T> > 
-	{
-		typedef glm::detail::tvec3<T> type;
-		typedef typename type::value_type base_type;
-		static const size_t size = 3;
-	};
-
-	template <typename T> 
-	struct datatype_traits< glm::detail::tvec4<T> > 
-	{
-		typedef glm::detail::tvec4<T> type;
-		typedef typename type::value_type base_type;
-		static const size_t size = 4;
-	};
-
-	typedef glm::detail::tvec2<sint8> i8vec2;
-	typedef glm::detail::tvec3<sint8> i8vec3;
-	typedef glm::detail::tvec4<sint8> i8vec4;
-
-	typedef glm::vec2 vec2;
-	typedef glm::vec3 vec3;
-	typedef glm::vec4 vec4;
-
-	typedef glm::ivec2 ivec2;
-	typedef glm::ivec3 ivec3;
-	typedef glm::ivec4 ivec4;
-
-	typedef glm::mat2 mat2;
-	typedef glm::mat3 mat3;
-	typedef glm::mat4 mat4;
-
 	template < datatype EnumType > struct enum_to_type {};
 
@@ -177,25 +129,25 @@
 	enum type_flag
 	{
-		TF_POINTER      = 0x01, //< field is a pointer
-		TF_NOSERIALIZE  = 0x02, //< ignore during serialization
-		TF_INVISIBLE    = 0x04, //< field invisible to API
-		TF_READONLY     = 0x08, //< read only field
-		TF_SIMPLETYPE   = 0x10, //< raw binary I/O possible
+		TF_POINTER      = 0x01, //!< field is a pointer
+		TF_NOSERIALIZE  = 0x02, //!< ignore during serialization
+		TF_INVISIBLE    = 0x04, //!< field invisible to API
+		TF_READONLY     = 0x08, //!< read only field
+		TF_SIMPLETYPE   = 0x10, //!< raw binary I/O possible
 		TF_OWNED        = 0x20,
-		TF_CONTAINER    = 0x40, //< is a container
+		TF_CONTAINER    = 0x40, //!< is a container
 	};
 
 	struct type_field
 	{
-		std::string      name;      //< name of the field
-		std::string      type_name; //< name of the type of the field
-		const std::type_info* type_inf;  //< typeinfo for later retrieval of type
-		type_entry*      type;      //< pointer to field type
-		unsigned int     flags;     //< flags 
+		std::string      name;          //!< name of the field
+		std::string      type_name;     //!< name of the type of the field
+		const std::type_info* type_inf; //!< typeinfo for later retrieval of type
+		type_entry*      type;          //!< pointer to field type
+		unsigned int     flags;         //!< flags 
 		size_t           offset;
 
 		template< typename TOBJECT, typename TFIELD >
-		type_field( const char* name, TFIELD TOBJECT::*field, typename std::enable_if< is_container<TFIELD>::value, void* >::type = nullptr )
-		: name(name)
+		type_field( const char* aname, TFIELD TOBJECT::*field, typename std::enable_if< is_container<TFIELD>::value, void* >::type = nullptr )
+		: name(aname)
 			, type_name()
 			, type_inf( &typeid( typename std::remove_pointer<typename TFIELD::value_type>::type ) )
@@ -204,5 +156,5 @@
 			, offset( offset_of( field ) ) 
 		{
-			NV_LOG( LOG_INFO, name << "-" << offset);
+			NV_LOG( LOG_INFO, aname << "-" << offset);
 			flags = TF_CONTAINER |
 				( std::is_pointer<typename TFIELD::value_type>::value ? TF_POINTER : 0 ) |
@@ -211,6 +163,6 @@
 
 		template< typename TOBJECT, typename TFIELD >
-		type_field( const char* name, TFIELD TOBJECT::*field, typename std::enable_if< !is_container<TFIELD>::value, void* >::type = nullptr )
-		: name(name)
+		type_field( const char* aname, TFIELD TOBJECT::*field, typename std::enable_if< !is_container<TFIELD>::value, void* >::type = nullptr )
+		: name(aname)
 			, type_name()
 			, type_inf( &typeid( typename std::remove_pointer<TFIELD>::type ) )
@@ -219,5 +171,5 @@
 			, offset( offset_of( field ) )
 		{
-			NV_LOG( LOG_INFO, name << "-" << offset);
+			NV_LOG( LOG_INFO, aname << "-" << offset);
 			flags = 
 				( std::is_pointer<TFIELD>::value ? TF_POINTER : 0 ) |
@@ -236,5 +188,5 @@
 		std::string name;
 		int         value;
-		type_enum( const char* name, int value ) : name(name), value(value) {}
+		type_enum( const char* aname, int avalue ) : name(aname), value(avalue) {}
 	};
 
@@ -345,4 +297,5 @@
     {
         base_type = type_db->get_type( typeid(TYPE) );
+		return *this;
     }
     
Index: trunk/src/gfx/image.cc
===================================================================
--- trunk/src/gfx/image.cc	(revision 120)
+++ trunk/src/gfx/image.cc	(revision 121)
@@ -12,5 +12,5 @@
 	: m_size( size ), m_depth( depth ), m_data( nullptr )
 {
-	m_data = new uint8[ m_size.x * m_size.y * m_depth ];
+	m_data = new uint8[ static_cast<uint16>( m_size.x * m_size.y ) * m_depth ];
 }
 
@@ -25,10 +25,10 @@
 	: m_size( size ), m_depth( depth ), m_data( nullptr )
 {
-	std::size_t bsize = m_size.x * m_size.y * m_depth;
-	m_data = new uint8[ m_size.x * m_size.y * m_depth ];
+	sint32 bsize = m_size.x * m_size.y * static_cast<sint32>( m_depth );
+	m_data = new uint8[ bsize ];
 
 	if ( reversed )
 	{
-		std::size_t bline = m_size.x * m_depth;
+		sint32 bline = m_size.x * static_cast<sint32>( m_depth );
 		for( int i = 0; i < m_size.y; ++i )
 		{
@@ -45,13 +45,13 @@
 void image::fill( uint8 value )
 {
-	std::fill( m_data, m_data + m_size.x * m_size.y * m_depth, value );
+	std::fill( m_data, m_data + m_size.x * m_size.y * (int)m_depth, value );
 }
 
-void image::set_region( region r, const uint8 * data, size_t stride )
+void image::set_region( region r, const uint8 * data, int stride )
 {
-	if ( stride == 0 ) stride = r.size.x * m_depth;
+	if ( stride == 0 ) stride = r.size.x * static_cast<sint32>( m_depth );
 	
-	std::size_t bpos  = (r.pos.y*m_size.x + r.pos.x ) * m_depth;
-	std::size_t bline = m_size.x*m_depth;
+	sint32 bpos  = (r.pos.y*m_size.x + r.pos.x ) * static_cast<sint32>( m_depth );
+	sint32 bline = m_size.x*static_cast<sint32>( m_depth );
 
 	for( int i = 0; i < r.size.y; ++i )
Index: trunk/src/gfx/texture_atlas.cc
===================================================================
--- trunk/src/gfx/texture_atlas.cc	(revision 120)
+++ trunk/src/gfx/texture_atlas.cc	(revision 121)
@@ -37,5 +37,5 @@
 			{
 				best_height = y + size.y;
-				best_index = i;
+				best_index = static_cast<int>( i );
 				best_width = node.z;
 				r.pos.x = node.x;
@@ -52,5 +52,5 @@
 	m_nodes.insert( m_nodes.begin() + best_index, glm::ivec3( r.pos.x, r.pos.y + size.y, size.x ) );
 
-	for( size_t i = best_index+1; i < m_nodes.size(); ++i )
+	for( size_t i = static_cast<size_t>( best_index )+1; i < m_nodes.size(); ++i )
 	{
 		glm::ivec3 node = m_nodes[ i ];
@@ -65,5 +65,5 @@
 			if (m_nodes[ i ].z <= 0)
 			{
-				m_nodes.erase( m_nodes.begin() + i );
+				m_nodes.erase( m_nodes.begin() + static_cast<int>(i) );
 				--i;
 			}
@@ -79,5 +79,5 @@
 	}
 	merge();
-	m_used += size.x * size.y;
+	m_used += static_cast<uint16>(size.x * size.y);
 	return r;
 }
@@ -119,5 +119,5 @@
 		{
 			m_nodes[ i ].z += m_nodes[ i+1 ].z;
-            m_nodes.erase( m_nodes.begin()+i+1 );
+            m_nodes.erase( m_nodes.begin()+static_cast<int>(i+1) );
 			--i;
 		}
Index: trunk/src/gfx/texture_font.cc
===================================================================
--- trunk/src/gfx/texture_font.cc	(revision 120)
+++ trunk/src/gfx/texture_font.cc	(revision 121)
@@ -17,7 +17,7 @@
 }
 
-float texture_glyph::get_kerning( const uint16 charcode )
+float texture_glyph::get_kerning( const uint16 other )
 {
-	auto i = kerning.find( charcode );
+	auto i = kerning.find( other );
 	return i != kerning.end() ? i->second : 0.0f;
 }
@@ -118,6 +118,7 @@
 	} 
 
-	for ( char c : codes )
+	for ( char ch : codes )
 	{
+		uint16 c = static_cast<uint16>( ch );
 		FT_UInt glyph_index = FT_Get_Char_Index( face, c ); 
 		FT_Error error = FT_Load_Glyph( face, glyph_index, flags ); 
@@ -136,5 +137,5 @@
 		int ft_glyph_top    = slot->bitmap_top;
 		int ft_glyph_left   = slot->bitmap_left;
-		int reg_width       = ft_bitmap_width / (depth > 3 ? 3 : depth);
+		int reg_width       = ft_bitmap_width / (depth > 3 ? 3 : (int)depth);
 
 		glm::ivec2 gsize( reg_width + 1, ft_bitmap_rows + 1 ); 
Index: trunk/src/gl/gl_context.cc
===================================================================
--- trunk/src/gl/gl_context.cc	(revision 120)
+++ trunk/src/gl/gl_context.cc	(revision 121)
@@ -83,5 +83,5 @@
 }
 
-void gl_context::apply_stencil_face( int face, stencil_test_face& stencil, const stencil_test_face& new_stencil )
+void gl_context::apply_stencil_face( unsigned face, stencil_test_face& stencil, const stencil_test_face& new_stencil )
 {
 	if (( stencil.op_fail       != new_stencil.op_fail       ) ||
@@ -317,5 +317,5 @@
 }
 
-void gl_context::force_apply_stencil_face( int face, const stencil_test_face& stencil )
+void gl_context::force_apply_stencil_face( unsigned face, const stencil_test_face& stencil )
 {
 	glStencilOpSeparate( face,
@@ -356,5 +356,5 @@
 }
 
-void gl_context::draw( primitive prim, const render_state& rs, program* p, vertex_array* va, int count )
+void gl_context::draw( primitive prim, const render_state& rs, program* p, vertex_array* va, size_t count )
 {
 	apply_render_state( rs );
@@ -365,9 +365,9 @@
 		if ( va->has_index_buffer() )
 		{
-			glDrawElements( primitive_to_enum(prim), count, datatype_to_gl_enum( va->get_index_buffer_type() ), 0 );
+			glDrawElements( primitive_to_enum(prim), static_cast<GLsizei>( count ), datatype_to_gl_enum( va->get_index_buffer_type() ), 0 );
 		}
 		else
 		{
-			glDrawArrays( primitive_to_enum(prim), 0, count);
+			glDrawArrays( primitive_to_enum(prim), 0, static_cast<GLsizei>( count ) );
 		}
 		va->unbind();
Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 120)
+++ trunk/src/gl/gl_device.cc	(revision 121)
@@ -53,10 +53,10 @@
 }
 
-vertex_buffer* gl_device::create_vertex_buffer( buffer_hint hint, int size, void* source /*= nullptr */ )
+vertex_buffer* gl_device::create_vertex_buffer( buffer_hint hint, size_t size, void* source /*= nullptr */ )
 {
 	return new gl_vertex_buffer( hint, size, source );
 }
 
-index_buffer* gl_device::create_index_buffer( buffer_hint hint, int size, void* source /*= nullptr */ )
+index_buffer* gl_device::create_index_buffer( buffer_hint hint, size_t size, void* source /*= nullptr */ )
 {
 	return new gl_index_buffer( hint, size, source );
Index: trunk/src/gl/gl_enum.cc
===================================================================
--- trunk/src/gl/gl_enum.cc	(revision 120)
+++ trunk/src/gl/gl_enum.cc	(revision 121)
@@ -30,5 +30,5 @@
 	case depth_test::GREATER_OR_EQUAL : return GL_GEQUAL;
 	case depth_test::ALWAYS           : return GL_ALWAYS;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -53,5 +53,5 @@
 	case blending::ONE_MINUS_CONSTANT_ALPHA: return GL_ONE_MINUS_CONSTANT_ALPHA;
 	case blending::SRC_ALPHA_SATURATE      : return GL_SRC_ALPHA_SATURATE;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -66,5 +66,5 @@
 	case blending::MINIMUM          : return GL_MIN;
 	case blending::MAXIMUM          : return GL_MAX;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -77,5 +77,5 @@
 	case culling::BACK           : return GL_BACK;
 	case culling::FRONT_AND_BACK : return GL_FRONT_AND_BACK;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -87,5 +87,5 @@
 	case culling::CW   : return GL_CW;
 	case culling::CCW  : return GL_CCW;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -103,5 +103,5 @@
 	case stencil_test_face::GREATER_OR_EQUAL : return GL_GEQUAL;
 	case stencil_test_face::ALWAYS           : return GL_ALWAYS;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -119,5 +119,5 @@
 	case stencil_test_face::INCREMENT_WRAP   : return GL_INCR_WRAP;
 	case stencil_test_face::DECREMENT_WRAP   : return GL_DECR_WRAP;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -130,5 +130,5 @@
 	case STREAM_DRAW   : return GL_STREAM_DRAW;
 	case DYNAMIC_DRAW  : return GL_DYNAMIC_DRAW;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -140,5 +140,5 @@
 	case RGB  : return GL_RGB;
 	case RGBA : return GL_RGBA;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -154,5 +154,5 @@
 	case sampler::NEAREST_MIPMAP_LINEAR  : return GL_NEAREST_MIPMAP_LINEAR;
 	case sampler::LINEAR_MIPMAP_LINEAR   : return GL_LINEAR_MIPMAP_LINEAR;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -166,5 +166,5 @@
 	case sampler::MIRRORED_REPEAT : return GL_MIRRORED_REPEAT;
 	case sampler::REPEAT          : return GL_REPEAT;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -181,5 +181,5 @@
 	case TRIANGLE_STRIP : return GL_TRIANGLE_STRIP;
 	case TRIANGLE_FAN   : return GL_TRIANGLE_FAN;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
@@ -209,5 +209,5 @@
 	case BYTE_VECTOR_3  : return GL_INT_VEC3;
 	case BYTE_VECTOR_4  : return GL_INT_VEC4;
-	default : return 0; // TODO: throw!
+	NV_RETURN_COVERED_DEFAULT( 0 );
 	}
 }
Index: trunk/src/gl/gl_program.cc
===================================================================
--- trunk/src/gl/gl_program.cc	(revision 120)
+++ trunk/src/gl/gl_program.cc	(revision 121)
@@ -14,12 +14,12 @@
 using namespace nv;
 
-gl_shader::gl_shader( uint32 shader_type ) 
-	: object_id(0), shader_type( shader_type )
+gl_shader::gl_shader( uint32 sh_type ) 
+	: shader_type( sh_type ), object_id(0)
 {
 	// no op
 }
 
-gl_shader::gl_shader( uint32 shader_type, const string& shader_code )
-	: object_id(0), shader_type( shader_type )
+gl_shader::gl_shader( uint32 sh_type, const string& shader_code )
+	: shader_type( sh_type ), object_id(0)
 {
 	compile( shader_code );
@@ -140,5 +140,5 @@
 	glGetProgramiv( m_name.get_value(), GL_ACTIVE_ATTRIBUTES, &params );
 
-	for ( int i = 0; i < params; ++i )
+	for ( unsigned i = 0; i < (unsigned)params; ++i )
 	{
 		int attr_nlen;
@@ -149,5 +149,5 @@
 		glGetActiveAttrib( m_name.get_value(), i, 128, &attr_nlen, &attr_len, &attr_type, name_buffer );
 
-		string name( name_buffer, attr_nlen );
+		string name( name_buffer, size_t(attr_nlen) );
 
 		// skip built-ins
@@ -165,5 +165,5 @@
 	glGetProgramiv( m_name.get_value(), GL_ACTIVE_UNIFORMS, &params );
 
-	for ( int i = 0; i < params; ++i )
+	for ( unsigned i = 0; i < size_t(params); ++i )
 	{
 		int uni_nlen;
@@ -174,5 +174,5 @@
 		glGetActiveUniform( m_name.get_value(), i, 128, &uni_nlen, &uni_len, &uni_type, name_buffer );
 
-		string name( name_buffer, uni_nlen );
+		string name( name_buffer, size_t(uni_nlen) );
 
 		// skip built-ins
@@ -206,5 +206,5 @@
 			case FLOAT_MATRIX_3 : glUniformMatrix3fv( uloc, 1, GL_FALSE, glm::value_ptr(((uniform< enum_to_type< FLOAT_MATRIX_3 >::type >*)( ubase ))->get_value()) ); break;
 			case FLOAT_MATRIX_4 : glUniformMatrix4fv( uloc, 1, GL_FALSE, glm::value_ptr(((uniform< enum_to_type< FLOAT_MATRIX_4 >::type >*)( ubase ))->get_value()) ); break;
-			//default     : error?
+			default : break; // error?
 			}
 			ubase->clean();
Index: trunk/src/gl/gl_texture2d.cc
===================================================================
--- trunk/src/gl/gl_texture2d.cc	(revision 120)
+++ trunk/src/gl/gl_texture2d.cc	(revision 121)
@@ -15,8 +15,8 @@
 	glBindTexture( GL_TEXTURE_2D, m_name.get_value() );
 
-	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, nv::sampler_filter_to_enum( m_sampler.filter_min ) );
-	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, nv::sampler_filter_to_enum( m_sampler.filter_max ) );
-	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, nv::sampler_wrap_to_enum( m_sampler.wrap_s) );
-	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, nv::sampler_wrap_to_enum( m_sampler.wrap_t) );
+	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (int)nv::sampler_filter_to_enum( m_sampler.filter_min ) );
+	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (int)nv::sampler_filter_to_enum( m_sampler.filter_max ) );
+	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, (int)nv::sampler_wrap_to_enum( m_sampler.wrap_s) );
+	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, (int)nv::sampler_wrap_to_enum( m_sampler.wrap_t) );
 
 	glBindTexture( GL_TEXTURE_2D, 0 );
@@ -31,9 +31,9 @@
 {
 	glBindTexture( GL_TEXTURE_2D, m_name.get_value() );
-	glTexImage2D( GL_TEXTURE_2D, 0, nv::image_format_to_enum(m_format), m_size.x, m_size.y, 0, nv::image_format_to_enum(m_format), nv::datatype_to_gl_enum(m_datatype), data );
+	glTexImage2D( GL_TEXTURE_2D, 0, (GLint)nv::image_format_to_enum(m_format), m_size.x, m_size.y, 0, nv::image_format_to_enum(m_format), nv::datatype_to_gl_enum(m_datatype), data );
 	glBindTexture( GL_TEXTURE_2D, 0 );
 }
 
-void nv::gl_texture2d::bind( int slot )
+void nv::gl_texture2d::bind( size_t slot )
 {
 	glActiveTexture( GL_TEXTURE0 + slot );
Index: trunk/src/gl/gl_vertex_buffer.cc
===================================================================
--- trunk/src/gl/gl_vertex_buffer.cc	(revision 120)
+++ trunk/src/gl/gl_vertex_buffer.cc	(revision 121)
@@ -10,15 +10,15 @@
 using namespace nv;
 
-gl_vertex_buffer::gl_vertex_buffer( buffer_hint hint, int size, void* data ) 
+gl_vertex_buffer::gl_vertex_buffer( buffer_hint hint, size_t size, void* data ) 
 	: vertex_buffer( hint, size ), m_name()
 {
 	bind();
-	glBufferData( GL_ARRAY_BUFFER, m_size, data, buffer_hint_to_enum( m_hint ) );
+	glBufferData( GL_ARRAY_BUFFER, (GLsizeiptr)m_size, data, buffer_hint_to_enum( m_hint ) );
 	unbind();
 }
 
-void gl_vertex_buffer::update( void* data, int offset, int size )
+void gl_vertex_buffer::update( void* data, size_t offset, size_t size )
 {
-	glBufferSubData( GL_ARRAY_BUFFER, offset, size, data );
+	glBufferSubData( GL_ARRAY_BUFFER, (GLintptr)offset, (GLsizeiptr)size, data );
 }
 
@@ -39,15 +39,15 @@
 }
 
-gl_index_buffer::gl_index_buffer( buffer_hint hint, int size, void* data ) 
+gl_index_buffer::gl_index_buffer( buffer_hint hint, size_t size, void* data ) 
 	: index_buffer( hint, size ), m_name()
 {
 	bind();
-	glBufferData( GL_ELEMENT_ARRAY_BUFFER, m_size, data, buffer_hint_to_enum( m_hint ) );
+	glBufferData( GL_ELEMENT_ARRAY_BUFFER, (GLsizeiptr)m_size, data, buffer_hint_to_enum( m_hint ) );
 	unbind();
 }
 
-void gl_index_buffer::update( void* data, int offset, int size )
+void gl_index_buffer::update( void* data, size_t offset, size_t size )
 {
-	glBufferSubData( GL_ELEMENT_ARRAY_BUFFER, offset, size, data );
+	glBufferSubData( GL_ELEMENT_ARRAY_BUFFER, (GLintptr)offset, (GLsizeiptr)size, data );
 }
 
@@ -76,5 +76,5 @@
 	for ( vertex_buffer_attribute_map::iterator i = m_map.begin(); 	i != m_map.end(); ++i ) 
 	{
-		int location                = i->first;
+		uint32 location             = static_cast<uint32>( i->first );
 		vertex_buffer_attribute* va = i->second;
 		vertex_buffer*           vb = va->get_buffer();
@@ -83,8 +83,8 @@
 		glVertexAttribPointer( 
 			location, 
-			va->get_components(), 
+			static_cast<GLint>( va->get_components() ), 
 			nv::datatype_to_gl_enum( va->get_datatype() ),
 			GL_FALSE,
-			va->get_stride(),
+			static_cast<GLsizei>( va->get_stride() ),
 			(void*)va->get_offset()
 			);
@@ -107,5 +107,5 @@
 	for ( vertex_buffer_attribute_map::iterator i = m_map.begin(); 	i != m_map.end(); ++i ) 
 	{
-		glDisableVertexAttribArray( i->first );
+		glDisableVertexAttribArray( static_cast<uint32>( i->first ) );
 	}
 }
Index: trunk/src/gl/gl_window.cc
===================================================================
--- trunk/src/gl/gl_window.cc	(revision 120)
+++ trunk/src/gl/gl_window.cc	(revision 121)
@@ -21,5 +21,5 @@
 	if (ke.keysym.unicode >= 32 && ke.keysym.unicode < 128 )
 	{
-		kevent.key.ascii = (char)ke.keysym.unicode;
+		kevent.key.ascii = static_cast<char8>( ke.keysym.unicode );
 	}
 
@@ -151,5 +151,5 @@
 	: m_device( dev ), m_width( width ), m_height( height ), m_title("NV Engine"), m_screen( nullptr )
 {
-	int flags = SDL_OPENGL;
+	uint32 flags = SDL_OPENGL;
 	
 	m_screen = SDL_SetVideoMode( width, height, 32, flags );
Index: trunk/src/gui/gui_style.cc
===================================================================
--- trunk/src/gui/gui_style.cc	(revision 120)
+++ trunk/src/gui/gui_style.cc	(revision 121)
@@ -36,5 +36,5 @@
 	for (size_t i = 0; i < 4; ++i )
 	{
-		lua_rawgeti( m_lua, -1, i+1 );
+		lua_rawgeti( m_lua, -1, static_cast<int>( i+1 ) );
 		if ( lua_isnil( m_lua, -1 ) ) return true;
 		vec[i] = (float)lua_tonumber( m_lua, -1 );
Index: trunk/src/io_event.cc
===================================================================
--- trunk/src/io_event.cc	(revision 120)
+++ trunk/src/io_event.cc	(revision 121)
@@ -9,5 +9,5 @@
 using namespace nv;
 
-const char* get_key_name( key_code key )
+const char* nv::get_key_name( key_code key )
 {
 	switch ( key )
@@ -16,9 +16,9 @@
 #		include <nv/detail/key_list.inc>
 #	undef NV_KEY
-default: return "KEY_UNKNOWN";
+	NV_RETURN_COVERED_DEFAULT( "KEY_UNKNOWN" );
 	};
 }
 
-const char* get_mouse_name( mouse_code button )
+const char* nv::get_mouse_name( mouse_code button )
 {
 	switch ( button )
@@ -27,9 +27,9 @@
 #		include <nv/detail/mouse_list.inc>
 #	undef NV_MOUSE
-default: return "MOUSE_UNKNOWN";
+	NV_RETURN_COVERED_DEFAULT( "MOUSE_UNKNOWN" );
 	};
 }
 
-const char* get_io_event_name( io_event_code event )
+const char* nv::get_io_event_name( io_event_code event )
 {
 	switch ( event )
@@ -38,9 +38,9 @@
 #		include <nv/detail/io_event_list.inc>
 #	undef NV_IO_EVENT
-default: return "EV_UNKNOWN";
+	NV_RETURN_COVERED_DEFAULT( "EV_UNKNOWN" );
 	};
 }
 
-void register_io_types( type_database* db )
+void nv::register_io_types( type_database* db )
 {
 	type_enum key_enums[] = {
Index: trunk/src/library.cc
===================================================================
--- trunk/src/library.cc	(revision 120)
+++ trunk/src/library.cc	(revision 121)
@@ -37,5 +37,5 @@
 
 library::library() 
-    : m_name(), m_handle( nullptr )
+    : m_handle( nullptr ), m_name()
 {
 }
Index: trunk/src/logger.cc
===================================================================
--- trunk/src/logger.cc	(revision 120)
+++ trunk/src/logger.cc	(revision 121)
@@ -21,5 +21,5 @@
 
 // log level names
-const char *log_level_names[] =
+static const char *log_level_names[] =
 {
 	"NONE",
@@ -37,5 +37,5 @@
 
 // log level names
-const char *log_level_names_pad[] =
+static const char *log_level_names_pad[] =
 {
 	"NONE    ",
@@ -57,5 +57,5 @@
 
 #if NV_PLATFORM == NV_WINDOWS 
-unsigned short log_color[] =
+static unsigned short log_color[] =
 {
 	FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY,
@@ -72,5 +72,5 @@
 };
 #else
-const char *log_color[] =
+static const char *log_color[] =
 {
 	"\33[37;1m",
Index: trunk/src/lua/lua_glm.cc
===================================================================
--- trunk/src/lua/lua_glm.cc	(revision 120)
+++ trunk/src/lua/lua_glm.cc	(revision 121)
@@ -12,5 +12,5 @@
 static size_t nlua_swizzel_lookup[256];
 
-inline bool nlua_is_swizzel( const char* str, size_t max )
+inline bool nlua_is_swizzel( const unsigned char* str, size_t max )
 {
 	while (*str)
@@ -24,5 +24,5 @@
 template < typename T, size_t k >
 struct nlua_vec_constructor {
-	static inline T construct( lua_State* L, int index ) {
+	static inline T construct( lua_State*, int ) {
 		return T();
 	}
@@ -202,5 +202,5 @@
 	size_t len  = 0;
 	size_t vlen = v->length();
-	const char * key = lua_tolstring( L, 2, &len );
+	const unsigned char * key = (const unsigned char *)( lua_tolstring( L, 2, &len ) );
 	size_t idx = 255;
 
@@ -240,5 +240,5 @@
 	size_t len  = 0;
 	size_t vlen = v->length();
-	const char * key = lua_tolstring( L, 2, &len );
+	const unsigned char * key = (const unsigned char *)( lua_tolstring( L, 2, &len ) );
 	size_t idx = 255;
 	if( len == 1 )
@@ -321,28 +321,29 @@
 { 
 	for (size_t i = 0; i < 256; ++i ) nlua_swizzel_lookup[i] = 255;
-	nlua_swizzel_lookup['x'] = 0;
-	nlua_swizzel_lookup['r'] = 0;
-	nlua_swizzel_lookup['s'] = 0;
-	nlua_swizzel_lookup['0'] = 0;
-	nlua_swizzel_lookup['y'] = 1;
-	nlua_swizzel_lookup['g'] = 1;
-	nlua_swizzel_lookup['t'] = 0;
-	nlua_swizzel_lookup['1'] = 1;
-	nlua_swizzel_lookup['z'] = 2;
-	nlua_swizzel_lookup['b'] = 2;
-	nlua_swizzel_lookup['u'] = 0;
-	nlua_swizzel_lookup['2'] = 2;
-	nlua_swizzel_lookup['w'] = 3;
-	nlua_swizzel_lookup['a'] = 3;
-	nlua_swizzel_lookup['v'] = 0;
-	nlua_swizzel_lookup['3'] = 3;
+	using nv::char8;
+	nlua_swizzel_lookup[char8( 'x' )] = 0;
+	nlua_swizzel_lookup[char8( 'r' )] = 0;
+	nlua_swizzel_lookup[char8( 's' )] = 0;
+	nlua_swizzel_lookup[char8( '0' )] = 0;
+	nlua_swizzel_lookup[char8( 'y' )] = 1;
+	nlua_swizzel_lookup[char8( 'g' )] = 1;
+	nlua_swizzel_lookup[char8( 't' )] = 0;
+	nlua_swizzel_lookup[char8( '1' )] = 1;
+	nlua_swizzel_lookup[char8( 'z' )] = 2;
+	nlua_swizzel_lookup[char8( 'b' )] = 2;
+	nlua_swizzel_lookup[char8( 'u' )] = 0;
+	nlua_swizzel_lookup[char8( '2' )] = 2;
+	nlua_swizzel_lookup[char8( 'w' )] = 3;
+	nlua_swizzel_lookup[char8( 'a' )] = 3;
+	nlua_swizzel_lookup[char8( 'v' )] = 0;
+	nlua_swizzel_lookup[char8( '3' )] = 3;
 	int stack = lua_gettop( L );
 
-	luaL_requiref(L, "ivec2", luaopen_vec<glm::ivec2>, 1);
-	luaL_requiref(L, "ivec3", luaopen_vec<glm::ivec3>, 1);
-	luaL_requiref(L, "ivec4", luaopen_vec<glm::ivec4>, 1);
-	luaL_requiref(L, "vec2", luaopen_vec<glm::vec2>, 1);
-	luaL_requiref(L, "vec3", luaopen_vec<glm::vec3>, 1);
-	luaL_requiref(L, "vec4", luaopen_vec<glm::vec4>, 1);
+	luaL_requiref(L, "ivec2", luaopen_vec<nv::ivec2>, 1);
+	luaL_requiref(L, "ivec3", luaopen_vec<nv::ivec3>, 1);
+	luaL_requiref(L, "ivec4", luaopen_vec<nv::ivec4>, 1);
+	luaL_requiref(L, "vec2", luaopen_vec<nv::vec2>, 1);
+	luaL_requiref(L, "vec3", luaopen_vec<nv::vec3>, 1);
+	luaL_requiref(L, "vec4", luaopen_vec<nv::vec4>, 1);
 	lua_settop( L, stack );
 }
Index: trunk/src/lua/lua_raw.cc
===================================================================
--- trunk/src/lua/lua_raw.cc	(revision 120)
+++ trunk/src/lua/lua_raw.cc	(revision 121)
@@ -30,5 +30,5 @@
 {
 	index = lua_absindex( L, index );
-	int len = lua_rawlen( L, index );
+	int len = static_cast<int>( lua_rawlen( L, index ) );
 	int i   = len;
 	lua_createtable( L, len, 0 );
Index: trunk/src/lua/lua_state.cc
===================================================================
--- trunk/src/lua/lua_state.cc	(revision 120)
+++ trunk/src/lua/lua_state.cc	(revision 121)
@@ -15,12 +15,12 @@
 using namespace nv;
 
-lua::stack_guard::stack_guard( lua::state* L )
-	: L(L), m_level( lua_gettop(L->L) )
-{
-
-}
-
-lua::stack_guard::stack_guard( lua::state& L )
-	: L(&L), m_level( lua_gettop((&L)->L) )
+lua::stack_guard::stack_guard( lua::state* aL )
+	: L(aL), m_level( lua_gettop(aL->L) )
+{
+
+}
+
+lua::stack_guard::stack_guard( lua::state& aL )
+	: L(&aL), m_level( lua_gettop(aL.L) )
 {
 
Index: trunk/src/time.cc
===================================================================
--- trunk/src/time.cc	(revision 120)
+++ trunk/src/time.cc	(revision 121)
@@ -42,14 +42,12 @@
 static timer_impl zero_timer;
 
-volatile nv::uint64 nv::get_ticks()
+nv::uint64 nv::get_ticks()
 {
 #if NV_COMPILER == NV_MSVC
 	return __rdtsc();
-#elif NV_COMPILER == NV_GNUC
-	register long long ticks asm("eax");
+#else
+	register long long ticks asm("eax") = 0;
 	asm volatile (".byte 15, 49" : : : "eax", "edx");
-	return ticks;
-#else
-	return 0; // unsupported
+	return static_cast<nv::uint64>( ticks );
 #endif
 }
@@ -59,7 +57,6 @@
 #if NV_COMPILER == NV_MSVC
 	Sleep( ms );
-#elif NV_COMPILER == NV_GNUC
+#else
 	usleep( ms * 1000 );
-#else
 #endif
 }
@@ -85,5 +82,5 @@
 	struct timeval now;
 	gettimeofday(&now, NULL);
-	return (now.tv_sec - zero_timer.timeval_zero.tv_sec)*1000+(now.tv_usec-zero_timer.timeval_zero.tv_usec)/1000;
+	return (uint32)( (now.tv_sec - zero_timer.timeval_zero.tv_sec)*1000+(now.tv_usec-zero_timer.timeval_zero.tv_usec)/1000 );
 #endif
 }
@@ -99,5 +96,5 @@
 	struct timeval now;
 	gettimeofday(&now, NULL);
-	return (now.tv_sec - zero_timer.timeval_zero.tv_sec)*1000000+(now.tv_usec - zero_timer.timeval_zero.tv_usec);
+	return (uint32)( (now.tv_sec - zero_timer.timeval_zero.tv_sec)*1000000+(now.tv_usec - zero_timer.timeval_zero.tv_usec) );
 #endif
 }
Index: trunk/tests/render_test/rl.cc
===================================================================
--- trunk/tests/render_test/rl.cc	(revision 120)
+++ trunk/tests/render_test/rl.cc	(revision 121)
@@ -8,7 +8,5 @@
 #include <nv/logging.hh>
 #include <nv/logger.hh>
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-#include <glm/gtc/type_ptr.hpp>
+#include <nv/math.hh>
 #include <nv/string.hh>
 #include <nv/types.hh>
@@ -19,5 +17,5 @@
 const nv::uint16 size_xy = size_x * size_y;
 
-nv::uint8 height[size_xy] = 
+static nv::uint8 height[size_xy] = 
 {
 	4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,
@@ -39,5 +37,5 @@
 };
 
-nv::uint8 map[size_xy] = 
+static nv::uint8 map[size_xy] = 
 {
 	2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,
@@ -224,7 +222,9 @@
 					case nv::KEY_UP     : move.z = move.z - 1.0f; break;
 					case nv::KEY_DOWN   : move.z = move.z + 1.0f; break;
+					default: break;
 					}
 				}
 				break;
+			default: break;
 			}
 		}
