Fix D3D8, D3D9, and GL builds.

Bug swiftshader:63
Bug swiftshader:31

Change-Id: I59d08cbc8379e2c30984b9ec0ed4d49317633ce8
Reviewed-on: https://swiftshader-review.googlesource.com/10048
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/D3D8/Direct3D8.hpp b/src/D3D8/Direct3D8.hpp
index 1017846..bc514a3 100644
--- a/src/D3D8/Direct3D8.hpp
+++ b/src/D3D8/Direct3D8.hpp
@@ -30,27 +30,27 @@
 	public:
 		Direct3D8(int version, const HINSTANCE instance);
 
-		virtual ~Direct3D8();
+		~Direct3D8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3D8 methods
-		long __stdcall CheckDepthStencilMatch(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapterFormat, D3DFORMAT renderTargetFormat, D3DFORMAT depthStencilFormat);
-		long __stdcall CheckDeviceFormat(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapaterFormat, unsigned long usage, D3DRESOURCETYPE type, D3DFORMAT checkFormat);
-		long __stdcall CheckDeviceMultiSampleType(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT surfaceFormat, int windowed, D3DMULTISAMPLE_TYPE multiSampleType);
-		long __stdcall CheckDeviceType(unsigned int adapter, D3DDEVTYPE checkType, D3DFORMAT displayFormat, D3DFORMAT backBufferFormat, int windowed);
-		long __stdcall CreateDevice(unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, unsigned long behaviorFlags, D3DPRESENT_PARAMETERS *presentParameters, IDirect3DDevice8 **returnedDeviceInterface);
-		long __stdcall EnumAdapterModes(unsigned int adapter, unsigned int index, D3DDISPLAYMODE *mode);
-		unsigned int __stdcall GetAdapterCount();
-		long __stdcall GetAdapterDisplayMode(unsigned int adapter, D3DDISPLAYMODE *mode);
-		long __stdcall GetAdapterIdentifier(unsigned int adapter, unsigned long flags, D3DADAPTER_IDENTIFIER8 *identifier);
-		unsigned int __stdcall GetAdapterModeCount(unsigned int adapter);
-		HMONITOR __stdcall GetAdapterMonitor(unsigned int adapter);
-		long __stdcall GetDeviceCaps(unsigned int adapter, D3DDEVTYPE deviceType, D3DCAPS8 *caps);
-		long __stdcall RegisterSoftwareDevice(void *initializeFunction);
+		long __stdcall CheckDepthStencilMatch(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapterFormat, D3DFORMAT renderTargetFormat, D3DFORMAT depthStencilFormat) override;
+		long __stdcall CheckDeviceFormat(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapaterFormat, unsigned long usage, D3DRESOURCETYPE type, D3DFORMAT checkFormat) override;
+		long __stdcall CheckDeviceMultiSampleType(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT surfaceFormat, int windowed, D3DMULTISAMPLE_TYPE multiSampleType) override;
+		long __stdcall CheckDeviceType(unsigned int adapter, D3DDEVTYPE checkType, D3DFORMAT displayFormat, D3DFORMAT backBufferFormat, int windowed) override;
+		long __stdcall CreateDevice(unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, unsigned long behaviorFlags, D3DPRESENT_PARAMETERS *presentParameters, IDirect3DDevice8 **returnedDeviceInterface) override;
+		long __stdcall EnumAdapterModes(unsigned int adapter, unsigned int index, D3DDISPLAYMODE *mode) override;
+		unsigned int __stdcall GetAdapterCount() override;
+		long __stdcall GetAdapterDisplayMode(unsigned int adapter, D3DDISPLAYMODE *mode) override;
+		long __stdcall GetAdapterIdentifier(unsigned int adapter, unsigned long flags, D3DADAPTER_IDENTIFIER8 *identifier) override;
+		unsigned int __stdcall GetAdapterModeCount(unsigned int adapter) override;
+		HMONITOR __stdcall GetAdapterMonitor(unsigned int adapter) override;
+		long __stdcall GetDeviceCaps(unsigned int adapter, D3DDEVTYPE deviceType, D3DCAPS8 *caps) override;
+		long __stdcall RegisterSoftwareDevice(void *initializeFunction) override;
 
 	private:
 		void loadSystemD3D8();
diff --git a/src/D3D8/Direct3DBaseTexture8.cpp b/src/D3D8/Direct3DBaseTexture8.cpp
index 3a3f208..fe1aa76 100644
--- a/src/D3D8/Direct3DBaseTexture8.cpp
+++ b/src/D3D8/Direct3DBaseTexture8.cpp
@@ -135,7 +135,7 @@
 		return LOD;
 	}
 
-	long Direct3DBaseTexture8::SetLOD(long newLOD)
+	unsigned long Direct3DBaseTexture8::SetLOD(unsigned long newLOD)
 	{
 		TRACE("");
 
diff --git a/src/D3D8/Direct3DBaseTexture8.hpp b/src/D3D8/Direct3DBaseTexture8.hpp
index ab69aba..4a780b5 100644
--- a/src/D3D8/Direct3DBaseTexture8.hpp
+++ b/src/D3D8/Direct3DBaseTexture8.hpp
@@ -31,27 +31,27 @@
 	public:
 		Direct3DBaseTexture8(Direct3DDevice8 *device, D3DRESOURCETYPE type, unsigned long levels, unsigned long usage);
 
-		virtual ~Direct3DBaseTexture8();
+		~Direct3DBaseTexture8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource8 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		void __stdcall PreLoad();
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetDevice(IDirect3DDevice8 **device);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		void __stdcall PreLoad() override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetDevice(IDirect3DDevice8 **device) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DBaseTexture8 methods
-		unsigned long __stdcall GetLevelCount();
-		unsigned long __stdcall GetLOD();
-		long __stdcall SetLOD(long newLOD);
+		unsigned long __stdcall GetLevelCount() override;
+		unsigned long __stdcall GetLOD() override;
+		unsigned long __stdcall SetLOD(unsigned long newLOD) override;
 
 		// Intenal methods
 		sw::Resource *getResource() const;
diff --git a/src/D3D8/Direct3DCubeTexture8.hpp b/src/D3D8/Direct3DCubeTexture8.hpp
index 9107152..233afaf 100644
--- a/src/D3D8/Direct3DCubeTexture8.hpp
+++ b/src/D3D8/Direct3DCubeTexture8.hpp
@@ -30,34 +30,34 @@
 	public:
 		Direct3DCubeTexture8(Direct3DDevice8 *device, unsigned int edgeLength, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool);
 
-		virtual ~Direct3DCubeTexture8();
+		~Direct3DCubeTexture8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource8 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		void __stdcall PreLoad();
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetDevice(IDirect3DDevice8 **device);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		void __stdcall PreLoad() override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetDevice(IDirect3DDevice8 **device) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DBaseTexture methods
-		unsigned long __stdcall GetLevelCount();
-		unsigned long __stdcall GetLOD();
-		unsigned long __stdcall SetLOD(unsigned long newLOD);
+		unsigned long __stdcall GetLevelCount() override;
+		unsigned long __stdcall GetLOD() override;
+		unsigned long __stdcall SetLOD(unsigned long newLOD) override;
 
 		// IDirect3DCubeTexture8 methods
-		long __stdcall AddDirtyRect(D3DCUBEMAP_FACES face, const RECT *dirtyRect);
-		long __stdcall GetCubeMapSurface(D3DCUBEMAP_FACES face, unsigned int level , IDirect3DSurface8 **cubeMapSurface);
-		long __stdcall GetLevelDesc(unsigned int level, D3DSURFACE_DESC *description);
-		long __stdcall LockRect(D3DCUBEMAP_FACES face, unsigned int level, D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long flags);
-		long __stdcall UnlockRect(D3DCUBEMAP_FACES face, unsigned int level);
+		long __stdcall AddDirtyRect(D3DCUBEMAP_FACES face, const RECT *dirtyRect) override;
+		long __stdcall GetCubeMapSurface(D3DCUBEMAP_FACES face, unsigned int level , IDirect3DSurface8 **cubeMapSurface) override;
+		long __stdcall GetLevelDesc(unsigned int level, D3DSURFACE_DESC *description) override;
+		long __stdcall LockRect(D3DCUBEMAP_FACES face, unsigned int level, D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long flags) override;
+		long __stdcall UnlockRect(D3DCUBEMAP_FACES face, unsigned int level) override;
 
 		// Internal methods
 		Direct3DSurface8 *getInternalCubeMapSurface(D3DCUBEMAP_FACES face, unsigned int level);
diff --git a/src/D3D8/Direct3DDevice8.cpp b/src/D3D8/Direct3DDevice8.cpp
index ff85a7a..6294fbb 100644
--- a/src/D3D8/Direct3DDevice8.cpp
+++ b/src/D3D8/Direct3DDevice8.cpp
@@ -81,7 +81,7 @@
 		pixelShaderHandle = 0;
 
 		lightsDirty = true;
-				
+
 		for(int i = 0; i < 16; i++)
 		{
 			dataStream[i] = 0;
@@ -176,13 +176,13 @@
 				swapChain[i] = 0;
 			}
 		}
-		
+
 		if(depthStencil)
 		{
 			depthStencil->unbind();
 			depthStencil = 0;
 		}
-		
+
 		if(renderTarget)
 		{
 			renderTarget->unbind();
@@ -270,7 +270,7 @@
 
 		return Unknown::AddRef();
 	}
-	
+
 	unsigned long Direct3DDevice8::Release()
 	{
 		TRACE("");
@@ -311,7 +311,7 @@
 		TRACE("");
 
 		stateRecorder[token]->Capture();
-		
+
 		return D3D_OK;
 	}
 
@@ -488,7 +488,7 @@
 			sourceSurface->UnlockRect();
 			destinationSurface->UnlockRect();
 		}
-		
+
 		return D3D_OK;
 	}
 
@@ -678,7 +678,7 @@
 		pixelShader[index]->AddRef();
 
 		*handle = index;
-		
+
 		return D3D_OK;
 	}
 
@@ -708,7 +708,7 @@
 		}
 
 		(*surface)->AddRef();
-		
+
 		return D3D_OK;
 	}
 
@@ -778,7 +778,7 @@
 		}
 
 		(*vertexBuffer)->AddRef();
-		
+
 		return D3D_OK;
 	}
 
@@ -865,7 +865,7 @@
 
 		stateRecorder[token]->unbind();
 		stateRecorder[token] = 0;
-		
+
 		return D3D_OK;
 	}
 
@@ -936,7 +936,7 @@
 		bindData(indexData, baseVertexIndex);
 
 		renderer->draw(drawType, indexOffset, primitiveCount);
-		
+
 		return D3D_OK;
 	}
 
@@ -965,7 +965,7 @@
 		}
 
 		int length = (minIndex + numVertices) * vertexStreamZeroStride;
-		
+
 		Direct3DVertexBuffer8 *vertexBuffer = new Direct3DVertexBuffer8(this, length, 0, 0, D3DPOOL_DEFAULT);
 
 		unsigned char *data;
@@ -1098,7 +1098,7 @@
 		length *= vertexStreamZeroStride;
 
 		CreateVertexBuffer(length, 0, 0, D3DPOOL_DEFAULT, &vertexBuffer);
-		
+
 		unsigned char *data;
 		vertexBuffer->Lock(0, 0, &data, 0);
 		memcpy(data, vertexStreamZeroData, length);
@@ -1131,7 +1131,7 @@
 
 		SetStreamSource(0, 0, 0);
 		vertexBuffer->Release();
-		
+
 		return D3D_OK;
 	}
 
@@ -1344,7 +1344,7 @@
 		swapChain[0]->screenshot(description.pBits);
 
 		destSurface->UnlockRect();
-		
+
 		return D3D_OK;
 	}
 
@@ -1401,7 +1401,7 @@
 		case 6: UNIMPLEMENTED();   // FIXME: D3DDEVINFOID_D3DVERTEXSTATS
 		case 7: return E_FAIL;
 		}
-		
+
 		return D3D_OK;
 	}
 
@@ -1561,7 +1561,7 @@
 
 		*renderTarget = this->renderTarget;
 		this->renderTarget->AddRef();
-		
+
 		return D3D_OK;
 	}
 
@@ -1575,7 +1575,7 @@
 		}
 
 		*streamData = dataStream[streamNumber];
-		
+
 		if(dataStream[streamNumber])
 		{
 			dataStream[streamNumber]->AddRef();
@@ -1596,7 +1596,7 @@
 		}
 
 		*texture = this->texture[stage];
-		
+
 		if(this->texture[stage])
 		{
 			this->texture[stage]->AddRef();
@@ -1739,7 +1739,7 @@
 				light.Direction.y = 0;
 				light.Direction.z = 1;
 				light.Range = 0;
-				light.Falloff = 0; 
+				light.Falloff = 0;
 				light.Attenuation0 = 0;
 				light.Attenuation1 = 0;
 				light.Attenuation2 = 0;
@@ -1879,13 +1879,13 @@
 			swapChain[0]->unbind();
 			swapChain[0] = 0;
 		}
-		
+
 		if(depthStencil)
 		{
 			depthStencil->unbind();
 			depthStencil = 0;
 		}
-		
+
 		if(renderTarget)
 		{
 			renderTarget->unbind();
@@ -2047,7 +2047,7 @@
 		delete cursor;
 		showCursor = false;
 
-		return D3D_OK;		
+		return D3D_OK;
 	}
 
 	long Direct3DDevice8::ResourceManagerDiscardBytes(unsigned long bytes)
@@ -2133,11 +2133,6 @@
 		sw::FrameBuffer::setCursorPosition(point.x, point.y);
 	}
 
-	void Direct3DDevice8::SetCursorPosition(unsigned int x, unsigned int y, unsigned long flags)
-	{
-		SetCursorPosition((int)x, (int)y, flags);
-	}
-
 	long Direct3DDevice8::SetCursorProperties(unsigned int x0, unsigned int y0, IDirect3DSurface8 *cursorBitmap)
 	{
 		TRACE("");
@@ -2154,7 +2149,7 @@
 		cursorBitmap->LockRect(&lock, 0, 0);
 
 		delete cursor;
-		cursor = new sw::Surface(0, desc.Width, desc.Height, 1, sw::FORMAT_A8R8G8B8, false, false);
+		cursor = sw::Surface::create(0, desc.Width, desc.Height, 1, sw::FORMAT_A8R8G8B8, false, false);
 
 		void *buffer = cursor->lockExternal(0, 0, 0, sw::LOCK_DISCARD, sw::PUBLIC);
 		memcpy(buffer, lock.pBits, desc.Width * desc.Height * sizeof(unsigned int));
@@ -2179,7 +2174,7 @@
 		}
 
 		swapChain[0]->setGammaRamp((sw::GammaRamp*)ramp, flags & D3DSGR_CALIBRATE);
-		
+
 		return;
 	}
 
@@ -2333,7 +2328,7 @@
 			renderState[state] = value;
 
 			switch(state)
-			{		
+			{
 			case D3DRS_ZENABLE:
 				switch(value)
 				{
@@ -2488,7 +2483,7 @@
 					ASSERT(false);
 				}
 				break;
-			case D3DRS_CULLMODE:	
+			case D3DRS_CULLMODE:
 				switch(value)
 				{
 				case D3DCULL_NONE:
@@ -3098,10 +3093,10 @@
 		{
 			stateRecorder.back()->setStreamSource(stream, vertexBuffer, stride);
 		}
-	
+
 		return D3D_OK;
 	}
-	
+
 	long Direct3DDevice8::SetTexture(unsigned long stage, IDirect3DBaseTexture8 *iBaseTexture)
 	{
 		TRACE("");
@@ -3301,7 +3296,7 @@
 					renderer->setSecondArgument(stage, sw::TextureStage::SOURCE_TEXTURE);
 					break;
 				case D3DTA_TFACTOR:
-					renderer->setSecondArgument(stage, sw::TextureStage::SOURCE_TFACTOR);						
+					renderer->setSecondArgument(stage, sw::TextureStage::SOURCE_TFACTOR);
 					break;
 				case D3DTA_SPECULAR:
 					renderer->setSecondArgument(stage, sw::TextureStage::SOURCE_SPECULAR);
@@ -3928,14 +3923,14 @@
 				Direct3DVertexShader8 *shader = vertexShader[index];
 				renderer->setVertexShader(shader->getVertexShader());
 				declaration = shader->getDeclaration();
-				
+
 				FVF = 0;
 			}
 			else
 			{
 				renderer->setVertexShader(0);
 				declaration = 0;
-				
+
 				FVF = handle;
 			}
 		}
@@ -3993,7 +3988,7 @@
 		{
 			stateRecorder.back()->setViewport(viewport);
 		}
-		
+
 		return D3D_OK;
 	}
 
@@ -4160,7 +4155,7 @@
 
 		RECT sRect;
 		RECT dRect;
-		
+
 		if(sourceRect && destPoint)
 		{
 			sRect.left = sourceRect->left;
@@ -4237,14 +4232,14 @@
 		for(unsigned int y = 0; y < height; y++)
 		{
 			memcpy(destinationLock.pBits, sourceLock.pBits, bytes);
-			
+
 			(byte*&)sourceLock.pBits += sourceLock.Pitch;
 			(byte*&)destinationLock.pBits += destinationLock.Pitch;
 		}
 
 		sourceSurface->UnlockRect();
 		destinationSurface->UnlockRect();
-		
+
 		return D3D_OK;
 	}
 
@@ -4296,7 +4291,7 @@
 		if(FVF & D3DFVF_PSIZE)		stride += 4;
 		if(FVF & D3DFVF_DIFFUSE)	stride += 4;
 		if(FVF & D3DFVF_SPECULAR)	stride += 4;
-		
+
 		switch((FVF & D3DFVF_TEXCOUNT_MASK) >> D3DFVF_TEXCOUNT_SHIFT)
 		{
 		case 8: stride += 4 + 4 * ((1 + (FVF >> 30)) % 4);
@@ -4428,25 +4423,25 @@
 			{
 				renderer->setInputStream(sw::BlendIndices, attribute.define((char*&)buffer - 4, sw::STREAMTYPE_INDICES, 1));
 			}
-			
+
 			if(FVF & D3DFVF_NORMAL)
 			{
 				renderer->setInputStream(sw::Normal, attribute.define(buffer, sw::STREAMTYPE_FLOAT, 3));
 				(char*&)buffer += 12;
 			}
-			
+
 			if(FVF & D3DFVF_PSIZE)
 			{
 				renderer->setInputStream(sw::PointSize, attribute.define(buffer, sw::STREAMTYPE_FLOAT, 1));
 				(char*&)buffer += 4;
 			}
-			
+
 			if(FVF & D3DFVF_DIFFUSE)
 			{
 				renderer->setInputStream(sw::Color0, attribute.define(buffer, sw::STREAMTYPE_COLOR, 4));
 				(char*&)buffer += 4;
 			}
-			
+
 			if(FVF & D3DFVF_SPECULAR)
 			{
 				renderer->setInputStream(sw::Color1, attribute.define(buffer, sw::STREAMTYPE_COLOR, 4));
@@ -4633,7 +4628,7 @@
 			renderer->setLightDiffuse(active, diffuse);
 			renderer->setLightSpecular(active, specular);
 			renderer->setLightAmbient(active, ambient);
-			
+
 			if(l.Type == D3DLIGHT_DIRECTIONAL)
 			{
 			//	goto next;   // FIXME
@@ -4734,7 +4729,7 @@
 			if(baseTexture && textureUsed)
 			{
 				int levelCount = baseTexture->getInternalLevelCount();
-				
+
 				int textureLOD = baseTexture->GetLOD();
 				int stageLOD = textureStageState[stage][D3DTSS_MAXMIPLEVEL];
 				int LOD = textureLOD > stageLOD ? textureLOD : stageLOD;
@@ -4849,7 +4844,7 @@
 			sw::FrameBuffer::setCursorImage(cursor);
 
 			HCURSOR oldCursor = SetCursor(nullCursor);
-			
+
 			if(oldCursor != nullCursor)
 			{
 				win32Cursor = oldCursor;
@@ -4906,7 +4901,7 @@
 
 		sourceVolume->UnlockBox();
 		destinationVolume->UnlockBox();
-		
+
 		return D3D_OK;
 	}
 
diff --git a/src/D3D8/Direct3DDevice8.hpp b/src/D3D8/Direct3DDevice8.hpp
index 203849d..179a2d8 100644
--- a/src/D3D8/Direct3DDevice8.hpp
+++ b/src/D3D8/Direct3DDevice8.hpp
@@ -48,109 +48,108 @@
 	public:
 		Direct3DDevice8(const HINSTANCE instance, Direct3D8 *d3d8, unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, unsigned long behaviourFlags, D3DPRESENT_PARAMETERS *presentParameters);
 
-		virtual ~Direct3DDevice8();
+		~Direct3DDevice8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DDevice8 methods
-		long __stdcall ApplyStateBlock(unsigned long token);
-		long __stdcall BeginScene();
-		long __stdcall BeginStateBlock();
-		long __stdcall CaptureStateBlock(unsigned long token);
-		long __stdcall Clear(unsigned long count, const D3DRECT *rects, unsigned long flags, unsigned long color, float z, unsigned long stencil);
-		long __stdcall CopyRects(IDirect3DSurface8 *sourceSurface, const RECT *sourceRectsArray, unsigned int rects, IDirect3DSurface8 *destinationSurface, const POINT *destPointsArray);
-		long __stdcall CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS *presentParameters, IDirect3DSwapChain8 **swapChain);
-		long __stdcall CreateCubeTexture(unsigned int edgeLength, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DCubeTexture8 **cubeTexture);
-		long __stdcall CreateDepthStencilSurface(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, IDirect3DSurface8 **surface);
-		long __stdcall CreateImageSurface(unsigned int width, unsigned int height, D3DFORMAT format, IDirect3DSurface8 **surface);
-		long __stdcall CreateIndexBuffer(unsigned int length, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer8 **indexBuffer);
-		long __stdcall CreatePixelShader(const unsigned long *function, unsigned long *handle);
-		long __stdcall CreateRenderTarget(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, int lockable, IDirect3DSurface8 **surface);
-		long __stdcall CreateStateBlock(D3DSTATEBLOCKTYPE type, unsigned long *token);
-		long __stdcall CreateTexture(unsigned int width, unsigned int height, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DTexture8 **texture);
-		long __stdcall CreateVertexBuffer(unsigned int length, unsigned long usage, unsigned long FVF, D3DPOOL, IDirect3DVertexBuffer8 **vertexBuffer);
-		long __stdcall CreateVertexShader(const unsigned long *declaration, const unsigned long *function, unsigned long *handle, unsigned long usage);
-		long __stdcall CreateVolumeTexture(unsigned int width, unsigned int height, unsigned int depth, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DVolumeTexture8 **volumeTexture);
-		long __stdcall DeletePatch(unsigned int handle);
-		long __stdcall DeletePixelShader(unsigned long handle);
-		long __stdcall DeleteStateBlock(unsigned long token);
-		long __stdcall DeleteVertexShader(unsigned long handle);
-		long __stdcall DrawIndexedPrimitive(D3DPRIMITIVETYPE type, unsigned int minIndex, unsigned int numVertices, unsigned int startIndex, unsigned int primitiveCount);
-		long __stdcall DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE type, unsigned int minVertexIndex, unsigned int numVertexIndices, unsigned int PrimitiveCount, const void *indexData, D3DFORMAT indexDataFormat, const void *vertexStreamZeroData, unsigned int VertexStreamZeroStride);
-		long __stdcall DrawPrimitive(D3DPRIMITIVETYPE primitiveType, unsigned int startVertex, unsigned int primiveCount);
-		long __stdcall DrawPrimitiveUP(D3DPRIMITIVETYPE primitiveType, unsigned int primitiveCount, const void *vertexStreamZeroData, unsigned int vertexStreamZeroStride);
-		long __stdcall DrawRectPatch(unsigned int handle, const float *numSegs, const D3DRECTPATCH_INFO *rectPatchInfo);
-		long __stdcall DrawTriPatch(unsigned int handle, const float *numSegs, const D3DTRIPATCH_INFO *triPatchInfo);
-		long __stdcall EndScene();
-		long __stdcall EndStateBlock(unsigned long *token);
-		unsigned int __stdcall GetAvailableTextureMem();
-		long __stdcall GetBackBuffer(unsigned int index, D3DBACKBUFFER_TYPE type, IDirect3DSurface8 **backBuffer);
-		long __stdcall GetClipPlane(unsigned long index, float *plane);
-		long __stdcall GetClipStatus(D3DCLIPSTATUS8 *clipStatus);
-		long __stdcall GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *parameters);
-		long __stdcall GetCurrentTexturePalette(unsigned int *paletteNumber);
-		long __stdcall GetDepthStencilSurface(IDirect3DSurface8 **depthStencilSurface);
-		long __stdcall GetDeviceCaps(D3DCAPS8 *caps);
-		long __stdcall GetDirect3D(IDirect3D8 **D3D);
-		long __stdcall GetDisplayMode(D3DDISPLAYMODE *mode);
-		long __stdcall GetFrontBuffer(IDirect3DSurface8 *destSurface);
-		void __stdcall GetGammaRamp(D3DGAMMARAMP *ramp);
-		long __stdcall GetIndices(IDirect3DIndexBuffer8 **indexData, unsigned int *baseVertexIndex);
-		long __stdcall GetInfo(unsigned long devInfoID, void *devInfoStruct, unsigned long devInfoStructSize);
-		long __stdcall GetLight(unsigned long index, D3DLIGHT8 *p);
-		long __stdcall GetLightEnable(unsigned long index , int *enable);
-		long __stdcall GetMaterial(D3DMATERIAL8 *material);
-		long __stdcall GetPaletteEntries(unsigned int paletteNumber, PALETTEENTRY *entries);
-		long __stdcall GetPixelShader(unsigned long *handle);
-		long __stdcall GetPixelShaderFunction(unsigned long handle, void *data, unsigned long *sizeOfData);
-		long __stdcall GetPixelShaderConstant(unsigned long startRegister, void *constantData, unsigned long constantCount);
-		long __stdcall GetRasterStatus(D3DRASTER_STATUS *rasterStatus);
-		long __stdcall GetRenderState(D3DRENDERSTATETYPE State, unsigned long *value);
-		long __stdcall GetRenderTarget(IDirect3DSurface8 **renderTarget);
-		long __stdcall GetStreamSource(unsigned int streamNumber, IDirect3DVertexBuffer8 **streamData, unsigned int *stride);
-		long __stdcall GetTexture(unsigned long stage, IDirect3DBaseTexture8 **texture);
-		long __stdcall GetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long *value);
-		long __stdcall GetTransform(D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix);
-		long __stdcall GetVertexShader(unsigned long *handle);
-		long __stdcall GetVertexShaderConstant(unsigned long startRegister, void *constantData, unsigned long constantCount);
-		long __stdcall GetVertexShaderDeclaration(unsigned long handle, void *data, unsigned long *size);
-		long __stdcall GetVertexShaderFunction(unsigned long handle, void *data, unsigned long *size);
-		long __stdcall GetViewport(D3DVIEWPORT8 *viewport);
-		long __stdcall LightEnable(unsigned long index, int enable);
-		long __stdcall MultiplyTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix);
-		long __stdcall Present(const RECT *sourceRect, const RECT *destRect, HWND destWindowOverride, const RGNDATA *dirtyRegion);
-		long __stdcall ProcessVertices(unsigned int srcStartIndex, unsigned int destIndex, unsigned int vertexCount, IDirect3DVertexBuffer8 *destBuffer, unsigned long flags);
-		long __stdcall Reset(D3DPRESENT_PARAMETERS *presentParameters);
-		long __stdcall ResourceManagerDiscardBytes(unsigned long bytes);
-		long __stdcall SetClipPlane(unsigned long index, const float *plane);
-		long __stdcall SetClipStatus(const D3DCLIPSTATUS8 *clipStatus);
-		long __stdcall SetCurrentTexturePalette(unsigned int paletteNumber);
-		void __stdcall SetCursorPosition(int x, int y, unsigned long flags);
-		void __stdcall SetCursorPosition(unsigned int x, unsigned int y, unsigned long flags);
-		long __stdcall SetCursorProperties(unsigned int x, unsigned int y, IDirect3DSurface8 *cursorBitmap);
-		void __stdcall SetGammaRamp(unsigned long flags, const D3DGAMMARAMP *ramp);
-		long __stdcall SetIndices(IDirect3DIndexBuffer8 *indexData, unsigned int baseVertexIndex);
-		long __stdcall SetLight(unsigned long index, const D3DLIGHT8 *light);
-		long __stdcall SetMaterial(const D3DMATERIAL8 *material);
-		long __stdcall SetPaletteEntries(unsigned int paletteNumber, const PALETTEENTRY *entries);
-		long __stdcall SetPixelShader(unsigned long shader);
-		long __stdcall SetPixelShaderConstant(unsigned long startRegister, const void *constantData, unsigned long constantCount);
-		long __stdcall SetRenderState(D3DRENDERSTATETYPE state, unsigned long value);
-		long __stdcall SetRenderTarget(IDirect3DSurface8 *renderTarget, IDirect3DSurface8 *newZStencil);
-		long __stdcall SetStreamSource(unsigned int streamNumber, IDirect3DVertexBuffer8 *streamData, unsigned int stride);
-		long __stdcall SetTexture(unsigned long stage, IDirect3DBaseTexture8 *texture);
-		long __stdcall SetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long value);
-		long __stdcall SetTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix);
-		long __stdcall SetVertexShader(unsigned long handle);
-		long __stdcall SetVertexShaderConstant(unsigned long startRegister, const void *constantData, unsigned long constantCount);
-		long __stdcall SetViewport(const D3DVIEWPORT8 *viewport);
-		int __stdcall ShowCursor(int show);
-		long __stdcall TestCooperativeLevel();
-		long __stdcall UpdateTexture(IDirect3DBaseTexture8 *sourceTexture, IDirect3DBaseTexture8 *destinationTexture);
-		long __stdcall ValidateDevice(unsigned long *numPasses);
+		long __stdcall ApplyStateBlock(unsigned long token) override;
+		long __stdcall BeginScene() override;
+		long __stdcall BeginStateBlock() override;
+		long __stdcall CaptureStateBlock(unsigned long token) override;
+		long __stdcall Clear(unsigned long count, const D3DRECT *rects, unsigned long flags, unsigned long color, float z, unsigned long stencil) override;
+		long __stdcall CopyRects(IDirect3DSurface8 *sourceSurface, const RECT *sourceRectsArray, unsigned int rects, IDirect3DSurface8 *destinationSurface, const POINT *destPointsArray) override;
+		long __stdcall CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS *presentParameters, IDirect3DSwapChain8 **swapChain) override;
+		long __stdcall CreateCubeTexture(unsigned int edgeLength, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DCubeTexture8 **cubeTexture) override;
+		long __stdcall CreateDepthStencilSurface(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, IDirect3DSurface8 **surface) override;
+		long __stdcall CreateImageSurface(unsigned int width, unsigned int height, D3DFORMAT format, IDirect3DSurface8 **surface) override;
+		long __stdcall CreateIndexBuffer(unsigned int length, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer8 **indexBuffer) override;
+		long __stdcall CreatePixelShader(const unsigned long *function, unsigned long *handle) override;
+		long __stdcall CreateRenderTarget(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, int lockable, IDirect3DSurface8 **surface) override;
+		long __stdcall CreateStateBlock(D3DSTATEBLOCKTYPE type, unsigned long *token) override;
+		long __stdcall CreateTexture(unsigned int width, unsigned int height, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DTexture8 **texture) override;
+		long __stdcall CreateVertexBuffer(unsigned int length, unsigned long usage, unsigned long FVF, D3DPOOL, IDirect3DVertexBuffer8 **vertexBuffer) override;
+		long __stdcall CreateVertexShader(const unsigned long *declaration, const unsigned long *function, unsigned long *handle, unsigned long usage) override;
+		long __stdcall CreateVolumeTexture(unsigned int width, unsigned int height, unsigned int depth, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DVolumeTexture8 **volumeTexture) override;
+		long __stdcall DeletePatch(unsigned int handle) override;
+		long __stdcall DeletePixelShader(unsigned long handle) override;
+		long __stdcall DeleteStateBlock(unsigned long token) override;
+		long __stdcall DeleteVertexShader(unsigned long handle) override;
+		long __stdcall DrawIndexedPrimitive(D3DPRIMITIVETYPE type, unsigned int minIndex, unsigned int numVertices, unsigned int startIndex, unsigned int primitiveCount) override;
+		long __stdcall DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE type, unsigned int minVertexIndex, unsigned int numVertexIndices, unsigned int PrimitiveCount, const void *indexData, D3DFORMAT indexDataFormat, const void *vertexStreamZeroData, unsigned int VertexStreamZeroStride) override;
+		long __stdcall DrawPrimitive(D3DPRIMITIVETYPE primitiveType, unsigned int startVertex, unsigned int primiveCount) override;
+		long __stdcall DrawPrimitiveUP(D3DPRIMITIVETYPE primitiveType, unsigned int primitiveCount, const void *vertexStreamZeroData, unsigned int vertexStreamZeroStride) override;
+		long __stdcall DrawRectPatch(unsigned int handle, const float *numSegs, const D3DRECTPATCH_INFO *rectPatchInfo) override;
+		long __stdcall DrawTriPatch(unsigned int handle, const float *numSegs, const D3DTRIPATCH_INFO *triPatchInfo) override;
+		long __stdcall EndScene() override;
+		long __stdcall EndStateBlock(unsigned long *token) override;
+		unsigned int __stdcall GetAvailableTextureMem() override;
+		long __stdcall GetBackBuffer(unsigned int index, D3DBACKBUFFER_TYPE type, IDirect3DSurface8 **backBuffer) override;
+		long __stdcall GetClipPlane(unsigned long index, float *plane) override;
+		long __stdcall GetClipStatus(D3DCLIPSTATUS8 *clipStatus) override;
+		long __stdcall GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *parameters) override;
+		long __stdcall GetCurrentTexturePalette(unsigned int *paletteNumber) override;
+		long __stdcall GetDepthStencilSurface(IDirect3DSurface8 **depthStencilSurface) override;
+		long __stdcall GetDeviceCaps(D3DCAPS8 *caps) override;
+		long __stdcall GetDirect3D(IDirect3D8 **D3D) override;
+		long __stdcall GetDisplayMode(D3DDISPLAYMODE *mode) override;
+		long __stdcall GetFrontBuffer(IDirect3DSurface8 *destSurface) override;
+		void __stdcall GetGammaRamp(D3DGAMMARAMP *ramp) override;
+		long __stdcall GetIndices(IDirect3DIndexBuffer8 **indexData, unsigned int *baseVertexIndex) override;
+		long __stdcall GetInfo(unsigned long devInfoID, void *devInfoStruct, unsigned long devInfoStructSize) override;
+		long __stdcall GetLight(unsigned long index, D3DLIGHT8 *p) override;
+		long __stdcall GetLightEnable(unsigned long index , int *enable) override;
+		long __stdcall GetMaterial(D3DMATERIAL8 *material) override;
+		long __stdcall GetPaletteEntries(unsigned int paletteNumber, PALETTEENTRY *entries) override;
+		long __stdcall GetPixelShader(unsigned long *handle) override;
+		long __stdcall GetPixelShaderFunction(unsigned long handle, void *data, unsigned long *sizeOfData) override;
+		long __stdcall GetPixelShaderConstant(unsigned long startRegister, void *constantData, unsigned long constantCount) override;
+		long __stdcall GetRasterStatus(D3DRASTER_STATUS *rasterStatus) override;
+		long __stdcall GetRenderState(D3DRENDERSTATETYPE State, unsigned long *value) override;
+		long __stdcall GetRenderTarget(IDirect3DSurface8 **renderTarget) override;
+		long __stdcall GetStreamSource(unsigned int streamNumber, IDirect3DVertexBuffer8 **streamData, unsigned int *stride) override;
+		long __stdcall GetTexture(unsigned long stage, IDirect3DBaseTexture8 **texture) override;
+		long __stdcall GetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long *value) override;
+		long __stdcall GetTransform(D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) override;
+		long __stdcall GetVertexShader(unsigned long *handle) override;
+		long __stdcall GetVertexShaderConstant(unsigned long startRegister, void *constantData, unsigned long constantCount) override;
+		long __stdcall GetVertexShaderDeclaration(unsigned long handle, void *data, unsigned long *size) override;
+		long __stdcall GetVertexShaderFunction(unsigned long handle, void *data, unsigned long *size) override;
+		long __stdcall GetViewport(D3DVIEWPORT8 *viewport) override;
+		long __stdcall LightEnable(unsigned long index, int enable) override;
+		long __stdcall MultiplyTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix) override;
+		long __stdcall Present(const RECT *sourceRect, const RECT *destRect, HWND destWindowOverride, const RGNDATA *dirtyRegion) override;
+		long __stdcall ProcessVertices(unsigned int srcStartIndex, unsigned int destIndex, unsigned int vertexCount, IDirect3DVertexBuffer8 *destBuffer, unsigned long flags) override;
+		long __stdcall Reset(D3DPRESENT_PARAMETERS *presentParameters) override;
+		long __stdcall ResourceManagerDiscardBytes(unsigned long bytes) override;
+		long __stdcall SetClipPlane(unsigned long index, const float *plane) override;
+		long __stdcall SetClipStatus(const D3DCLIPSTATUS8 *clipStatus) override;
+		long __stdcall SetCurrentTexturePalette(unsigned int paletteNumber) override;
+		void __stdcall SetCursorPosition(int x, int y, unsigned long flags) override;
+		long __stdcall SetCursorProperties(unsigned int x, unsigned int y, IDirect3DSurface8 *cursorBitmap) override;
+		void __stdcall SetGammaRamp(unsigned long flags, const D3DGAMMARAMP *ramp) override;
+		long __stdcall SetIndices(IDirect3DIndexBuffer8 *indexData, unsigned int baseVertexIndex) override;
+		long __stdcall SetLight(unsigned long index, const D3DLIGHT8 *light) override;
+		long __stdcall SetMaterial(const D3DMATERIAL8 *material) override;
+		long __stdcall SetPaletteEntries(unsigned int paletteNumber, const PALETTEENTRY *entries) override;
+		long __stdcall SetPixelShader(unsigned long shader) override;
+		long __stdcall SetPixelShaderConstant(unsigned long startRegister, const void *constantData, unsigned long constantCount) override;
+		long __stdcall SetRenderState(D3DRENDERSTATETYPE state, unsigned long value) override;
+		long __stdcall SetRenderTarget(IDirect3DSurface8 *renderTarget, IDirect3DSurface8 *newZStencil) override;
+		long __stdcall SetStreamSource(unsigned int streamNumber, IDirect3DVertexBuffer8 *streamData, unsigned int stride) override;
+		long __stdcall SetTexture(unsigned long stage, IDirect3DBaseTexture8 *texture) override;
+		long __stdcall SetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long value) override;
+		long __stdcall SetTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix) override;
+		long __stdcall SetVertexShader(unsigned long handle) override;
+		long __stdcall SetVertexShaderConstant(unsigned long startRegister, const void *constantData, unsigned long constantCount) override;
+		long __stdcall SetViewport(const D3DVIEWPORT8 *viewport) override;
+		int __stdcall ShowCursor(int show) override;
+		long __stdcall TestCooperativeLevel() override;
+		long __stdcall UpdateTexture(IDirect3DBaseTexture8 *sourceTexture, IDirect3DBaseTexture8 *destinationTexture) override;
+		long __stdcall ValidateDevice(unsigned long *numPasses) override;
 
 		// Internal methods
 		long __stdcall updateSurface(IDirect3DSurface8 *sourceSurface, const RECT *sourceRect, IDirect3DSurface8 *destinationSurface, const POINT *destPoint);
@@ -178,7 +177,7 @@
 		const HWND focusWindow;
 		const unsigned long behaviourFlags;
 		const D3DPRESENT_PARAMETERS presentParameters;
-		
+
 		HWND windowHandle;
 
 		D3DVIEWPORT8 viewport;
diff --git a/src/D3D8/Direct3DIndexBuffer8.hpp b/src/D3D8/Direct3DIndexBuffer8.hpp
index 8b241ab..cf141d7 100644
--- a/src/D3D8/Direct3DIndexBuffer8.hpp
+++ b/src/D3D8/Direct3DIndexBuffer8.hpp
@@ -31,28 +31,28 @@
 	public:
 		Direct3DIndexBuffer8(Direct3DDevice8 *device, unsigned int length, unsigned long usage, D3DFORMAT format, D3DPOOL pool);
 
-		virtual ~Direct3DIndexBuffer8();
+		~Direct3DIndexBuffer8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource8 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		void __stdcall PreLoad();
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetDevice(IDirect3DDevice8 **device);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		void __stdcall PreLoad() override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetDevice(IDirect3DDevice8 **device) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DIndexBuffer8 methods
-		long __stdcall GetDesc(D3DINDEXBUFFER_DESC *description);
-		long __stdcall Lock(unsigned int offset, unsigned int size, unsigned char **data, unsigned long flags);
-		long __stdcall Unlock();
-		
+		long __stdcall GetDesc(D3DINDEXBUFFER_DESC *description) override;
+		long __stdcall Lock(unsigned int offset, unsigned int size, unsigned char **data, unsigned long flags) override;
+		long __stdcall Unlock() override;
+
 		// Internal methods
 		sw::Resource *getResource() const;
 		bool is32Bit() const;
diff --git a/src/D3D8/Direct3DPixelShader8.hpp b/src/D3D8/Direct3DPixelShader8.hpp
index daf6a24..d9f9725 100644
--- a/src/D3D8/Direct3DPixelShader8.hpp
+++ b/src/D3D8/Direct3DPixelShader8.hpp
@@ -28,14 +28,13 @@
 	public:
 		Direct3DPixelShader8(Direct3DDevice8 *device, const unsigned long *shaderToken);
 
-		virtual ~Direct3DPixelShader8();
+		~Direct3DPixelShader8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
-		// IDirect3DPixelShader8 methods
 		void __stdcall GetFunction(void *data, unsigned int *size);
 
 		// Internal methods
diff --git a/src/D3D8/Direct3DResource8.hpp b/src/D3D8/Direct3DResource8.hpp
index b80296a..77eccc6 100644
--- a/src/D3D8/Direct3DResource8.hpp
+++ b/src/D3D8/Direct3DResource8.hpp
@@ -30,22 +30,22 @@
 	public:
 		Direct3DResource8(Direct3DDevice8 *device, D3DRESOURCETYPE type, unsigned int size);
 
-		virtual ~Direct3DResource8();
+		~Direct3DResource8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource8 methods
-		long __stdcall GetDevice(IDirect3DDevice8 **device);
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		long __stdcall FreePrivateData(const GUID &guid);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		void __stdcall PreLoad();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall GetDevice(IDirect3DDevice8 **device) override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		void __stdcall PreLoad() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// Internal methods
 		static unsigned int getMemoryUsage();
diff --git a/src/D3D8/Direct3DStateBlock8.hpp b/src/D3D8/Direct3DStateBlock8.hpp
index 744de2e..6d602aa 100644
--- a/src/D3D8/Direct3DStateBlock8.hpp
+++ b/src/D3D8/Direct3DStateBlock8.hpp
@@ -33,14 +33,13 @@
 	public:
 		Direct3DStateBlock8(Direct3DDevice8 *device, D3DSTATEBLOCKTYPE type);
 
-		virtual ~Direct3DStateBlock8();
+		~Direct3DStateBlock8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
-		// IDirect3DStateBlock8 methods
 		long __stdcall Apply();
 		long __stdcall Capture();
 		long __stdcall GetDevice(IDirect3DDevice8 **device);
@@ -75,13 +74,13 @@
 		void capturePixelRenderStates();
 		void capturePixelTextureStates();
 		void capturePixelShaderStates();
-	
+
 		// Vertex states
 		void captureVertexRenderStates();
 		void captureVertexTextureStates();
 		void captureLightStates();
 		void captureVertexShaderStates();
-	
+
 		// All (remaining) states
 		void captureTextures();
 		void captureVertexTextures();
diff --git a/src/D3D8/Direct3DSurface8.cpp b/src/D3D8/Direct3DSurface8.cpp
index 2a4dea6..6ad0e6b 100644
--- a/src/D3D8/Direct3DSurface8.cpp
+++ b/src/D3D8/Direct3DSurface8.cpp
@@ -70,6 +70,16 @@
 		resource->Release();
 	}
 
+	void *Direct3DSurface8::lockInternal(int x, int y, int z, sw::Lock lock, sw::Accessor client)
+	{
+		return Surface::lockInternal(x, y, z, lock, client);
+	}
+
+	void Direct3DSurface8::unlockInternal()
+	{
+		Surface::unlockInternal();
+	}
+
 	long Direct3DSurface8::QueryInterface(const IID &iid, void **object)
 	{
 		TRACE("");
diff --git a/src/D3D8/Direct3DSurface8.hpp b/src/D3D8/Direct3DSurface8.hpp
index 2796480..e07829d 100644
--- a/src/D3D8/Direct3DSurface8.hpp
+++ b/src/D3D8/Direct3DSurface8.hpp
@@ -31,22 +31,26 @@
 	public:
 		Direct3DSurface8(Direct3DDevice8 *device, Unknown *container, int width, int height, D3DFORMAT format, D3DPOOL pool, D3DMULTISAMPLE_TYPE multiSample, bool lockable, unsigned long usage);
 
-		virtual ~Direct3DSurface8();
+		~Direct3DSurface8() override;
+
+		// Surface methods
+		void *lockInternal(int x, int y, int z, sw::Lock lock, sw::Accessor client) override;
+		void unlockInternal() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();		
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DSurface8 methods
-		long __stdcall GetDevice(IDirect3DDevice8 **device);
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetContainer(const IID &iid, void **container);
-		long __stdcall GetDesc(D3DSURFACE_DESC *desc);
-		long __stdcall LockRect(D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long Flags);
-		long __stdcall UnlockRect();
+		long __stdcall GetDevice(IDirect3DDevice8 **device) override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetContainer(const IID &iid, void **container) override;
+		long __stdcall GetDesc(D3DSURFACE_DESC *desc) override;
+		long __stdcall LockRect(D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long Flags) override;
+		long __stdcall UnlockRect() override;
 
 		// Internal methods
 		static sw::Format translateFormat(D3DFORMAT format);
diff --git a/src/D3D8/Direct3DSwapChain8.hpp b/src/D3D8/Direct3DSwapChain8.hpp
index 2a0c194..0501dbb 100644
--- a/src/D3D8/Direct3DSwapChain8.hpp
+++ b/src/D3D8/Direct3DSwapChain8.hpp
@@ -30,20 +30,20 @@
 	public:
 		Direct3DSwapChain8(Direct3DDevice8 *device, D3DPRESENT_PARAMETERS *presentParameters);
 
-		virtual ~Direct3DSwapChain8();
+		~Direct3DSwapChain8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DSwapChain8 methods
-	    long __stdcall Present(const RECT *sourceRect, const RECT *destRect, HWND destWindowOverride, const RGNDATA *dirtyRegion);
-	    long __stdcall GetBackBuffer(unsigned int index, D3DBACKBUFFER_TYPE type, IDirect3DSurface8 **backBuffer);
+	    long __stdcall Present(const RECT *sourceRect, const RECT *destRect, HWND destWindowOverride, const RGNDATA *dirtyRegion) override;
+	    long __stdcall GetBackBuffer(unsigned int index, D3DBACKBUFFER_TYPE type, IDirect3DSurface8 **backBuffer) override;
 
 		// Internal methods
 		void reset(D3DPRESENT_PARAMETERS *presentParameters);
-		
+
 		void screenshot(void *destBuffer);
 		void setGammaRamp(sw::GammaRamp *gammaRamp, bool calibrate);
 		void getGammaRamp(sw::GammaRamp *gammaRamp);
diff --git a/src/D3D8/Direct3DTexture8.hpp b/src/D3D8/Direct3DTexture8.hpp
index c031a27..40f31a3 100644
--- a/src/D3D8/Direct3DTexture8.hpp
+++ b/src/D3D8/Direct3DTexture8.hpp
@@ -27,37 +27,37 @@
 {
 	class Direct3DTexture8 : public IDirect3DTexture8, public Direct3DBaseTexture8
 	{
-	public:	
+	public:
 		Direct3DTexture8(Direct3DDevice8 *device, unsigned int width, unsigned int height, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool);
 
-		virtual ~Direct3DTexture8();
+		~Direct3DTexture8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource8 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		void __stdcall PreLoad();
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetDevice(IDirect3DDevice8 **device);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		void __stdcall PreLoad() override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetDevice(IDirect3DDevice8 **device) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DBaseTexture methods
-		unsigned long __stdcall GetLevelCount();
-		unsigned long __stdcall GetLOD();
-		unsigned long __stdcall SetLOD(unsigned long newLOD);
+		unsigned long __stdcall GetLevelCount() override;
+		unsigned long __stdcall GetLOD() override;
+		unsigned long __stdcall SetLOD(unsigned long newLOD) override;
 
 		// IDirect3DTexture8 methods
-		long __stdcall GetLevelDesc(unsigned int level, D3DSURFACE_DESC *description);
-		long __stdcall LockRect(unsigned int level, D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long flags);
-		long __stdcall GetSurfaceLevel(unsigned int level, IDirect3DSurface8 **surface);
-		long __stdcall UnlockRect(unsigned int level);
-		long __stdcall AddDirtyRect(const RECT *dirtyRect);		
+		long __stdcall GetLevelDesc(unsigned int level, D3DSURFACE_DESC *description) override;
+		long __stdcall LockRect(unsigned int level, D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long flags) override;
+		long __stdcall GetSurfaceLevel(unsigned int level, IDirect3DSurface8 **surface) override;
+		long __stdcall UnlockRect(unsigned int level) override;
+		long __stdcall AddDirtyRect(const RECT *dirtyRect) override;
 
 		// Internal methods
 		Direct3DSurface8 *getInternalSurfaceLevel(unsigned int level);
diff --git a/src/D3D8/Direct3DVertexBuffer8.hpp b/src/D3D8/Direct3DVertexBuffer8.hpp
index 435d012..0aa5996 100644
--- a/src/D3D8/Direct3DVertexBuffer8.hpp
+++ b/src/D3D8/Direct3DVertexBuffer8.hpp
@@ -31,27 +31,27 @@
 	public:
 		Direct3DVertexBuffer8(Direct3DDevice8 *device, unsigned int length, unsigned long usage, long FVF, D3DPOOL pool);
 
-		virtual ~Direct3DVertexBuffer8();
+		~Direct3DVertexBuffer8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource8 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		void __stdcall PreLoad();
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetDevice(IDirect3DDevice8 **device);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		void __stdcall PreLoad() override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetDevice(IDirect3DDevice8 **device) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DVertexBuffer8 methods
-		long __stdcall Lock(unsigned int offset, unsigned int size, unsigned char **data, unsigned long flags);
-		long __stdcall Unlock();
-		long __stdcall GetDesc(D3DVERTEXBUFFER_DESC *description);
+		long __stdcall Lock(unsigned int offset, unsigned int size, unsigned char **data, unsigned long flags) override;
+		long __stdcall Unlock() override;
+		long __stdcall GetDesc(D3DVERTEXBUFFER_DESC *description) override;
 
 		// Internal methods
 		int getLength() const;
diff --git a/src/D3D8/Direct3DVertexDeclaration8.hpp b/src/D3D8/Direct3DVertexDeclaration8.hpp
index 2b5b665..ff7c08f 100644
--- a/src/D3D8/Direct3DVertexDeclaration8.hpp
+++ b/src/D3D8/Direct3DVertexDeclaration8.hpp
@@ -28,12 +28,12 @@
 	public:
 		Direct3DVertexDeclaration8(Direct3DDevice8 *device, const unsigned long *vertexElements);
 
-		virtual ~Direct3DVertexDeclaration8();
+		~Direct3DVertexDeclaration8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// Internal methods
 		const unsigned long *getDeclaration() const;
diff --git a/src/D3D8/Direct3DVertexShader8.hpp b/src/D3D8/Direct3DVertexShader8.hpp
index 046f7b4..388bca0 100644
--- a/src/D3D8/Direct3DVertexShader8.hpp
+++ b/src/D3D8/Direct3DVertexShader8.hpp
@@ -29,12 +29,12 @@
 	public:
 		Direct3DVertexShader8(Direct3DDevice8 *device, const unsigned long *declaration, const unsigned long *shaderToken);
 
-		virtual ~Direct3DVertexShader8();
+		~Direct3DVertexShader8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// Internal methods
 		const sw::VertexShader *getVertexShader() const;
diff --git a/src/D3D8/Direct3DVolume8.cpp b/src/D3D8/Direct3DVolume8.cpp
index 3fa78ad..aa33ea1 100644
--- a/src/D3D8/Direct3DVolume8.cpp
+++ b/src/D3D8/Direct3DVolume8.cpp
@@ -33,6 +33,16 @@
 		resource->Release();
 	}
 
+	void *Direct3DVolume8::lockInternal(int x, int y, int z, sw::Lock lock, sw::Accessor client)
+	{
+		return Surface::lockInternal(x, y, z, lock, client);
+	}
+
+	void Direct3DVolume8::unlockInternal()
+	{
+		Surface::unlockInternal();
+	}
+
 	long __stdcall Direct3DVolume8::QueryInterface(const IID &iid, void **object)
 	{
 		TRACE("");
diff --git a/src/D3D8/Direct3DVolume8.hpp b/src/D3D8/Direct3DVolume8.hpp
index 9b85fc7..ec5aba0 100644
--- a/src/D3D8/Direct3DVolume8.hpp
+++ b/src/D3D8/Direct3DVolume8.hpp
@@ -32,22 +32,26 @@
 	public:
 		Direct3DVolume8(Direct3DDevice8 *device, Direct3DVolumeTexture8 *container, int width, int height, int depth, D3DFORMAT format, D3DPOOL pool, bool locakble, unsigned long usage);
 
-		virtual ~Direct3DVolume8();
+		~Direct3DVolume8() override;
+
+		// Surface methods
+		void *lockInternal(int x, int y, int z, sw::Lock lock, sw::Accessor client) override;
+		void unlockInternal() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DVolume8 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetContainer(const IID &iid, void **container);
-		long __stdcall GetDesc(D3DVOLUME_DESC *description);
-		long __stdcall GetDevice(IDirect3DDevice8 **device);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		long __stdcall LockBox(D3DLOCKED_BOX *lockedVolume, const D3DBOX *box, unsigned long flags);
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall UnlockBox();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetContainer(const IID &iid, void **container) override;
+		long __stdcall GetDesc(D3DVOLUME_DESC *description) override;
+		long __stdcall GetDevice(IDirect3DDevice8 **device) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		long __stdcall LockBox(D3DLOCKED_BOX *lockedVolume, const D3DBOX *box, unsigned long flags) override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall UnlockBox() override;
 
 	private:
 		static sw::Format translateFormat(D3DFORMAT format);
diff --git a/src/D3D8/Direct3DVolumeTexture8.hpp b/src/D3D8/Direct3DVolumeTexture8.hpp
index fb0fbd7..03ac183 100644
--- a/src/D3D8/Direct3DVolumeTexture8.hpp
+++ b/src/D3D8/Direct3DVolumeTexture8.hpp
@@ -30,34 +30,34 @@
 	public:
 		Direct3DVolumeTexture8(Direct3DDevice8 *device, unsigned int width, unsigned int height, unsigned int depth, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool);
 
-		virtual ~Direct3DVolumeTexture8();
+		~Direct3DVolumeTexture8() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource8 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		void __stdcall PreLoad();
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetDevice(IDirect3DDevice8 **device);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		void __stdcall PreLoad() override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetDevice(IDirect3DDevice8 **device) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DBaseTexture methods
-		unsigned long __stdcall GetLevelCount();
-		unsigned long __stdcall GetLOD();
-		unsigned long __stdcall SetLOD(unsigned long newLOD);
+		unsigned long __stdcall GetLevelCount() override;
+		unsigned long __stdcall GetLOD() override;
+		unsigned long __stdcall SetLOD(unsigned long newLOD) override;
 
 		// IDirect3DVolumeTexture8 methods
-		long __stdcall GetLevelDesc(unsigned int level, D3DVOLUME_DESC *description);
-		long __stdcall GetVolumeLevel(unsigned int level, IDirect3DVolume8 **volume);
-		long __stdcall LockBox(unsigned int level, D3DLOCKED_BOX *lockedVolume, const D3DBOX *box, unsigned long flags);
-		long __stdcall UnlockBox(unsigned int level);
-		long __stdcall AddDirtyBox(const D3DBOX *dirtyBox);
+		long __stdcall GetLevelDesc(unsigned int level, D3DVOLUME_DESC *description) override;
+		long __stdcall GetVolumeLevel(unsigned int level, IDirect3DVolume8 **volume) override;
+		long __stdcall LockBox(unsigned int level, D3DLOCKED_BOX *lockedVolume, const D3DBOX *box, unsigned long flags) override;
+		long __stdcall UnlockBox(unsigned int level) override;
+		long __stdcall AddDirtyBox(const D3DBOX *dirtyBox) override;
 
 		// Internal methods
 		Direct3DVolume8 *getInternalVolumeLevel(unsigned int level);
diff --git a/src/D3D9/Direct3D9.hpp b/src/D3D9/Direct3D9.hpp
index f1543cc..0509dda 100644
--- a/src/D3D9/Direct3D9.hpp
+++ b/src/D3D9/Direct3D9.hpp
@@ -29,28 +29,28 @@
 	public:
 		Direct3D9(int version, const HINSTANCE instance);
 
-		virtual ~Direct3D9();
+		~Direct3D9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3D9 methods
-		long __stdcall RegisterSoftwareDevice(void *initializeFunction);
-		unsigned int __stdcall GetAdapterCount();
-		long __stdcall GetAdapterIdentifier(unsigned int adapter, unsigned long flags, D3DADAPTER_IDENTIFIER9 *identifier);
-		unsigned int __stdcall GetAdapterModeCount(unsigned int adapter, D3DFORMAT format);
-		long __stdcall EnumAdapterModes(unsigned int adapter, D3DFORMAT format, unsigned int index, D3DDISPLAYMODE *mode);
-		long __stdcall GetAdapterDisplayMode(unsigned int adapter, D3DDISPLAYMODE *mode);
-		long __stdcall CheckDeviceType(unsigned int adapter, D3DDEVTYPE checkType, D3DFORMAT displayFormat, D3DFORMAT backBufferFormat, int windowed);
-		long __stdcall CheckDeviceFormat(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapterFormat, unsigned long usage, D3DRESOURCETYPE type, D3DFORMAT checkFormat);
-		long __stdcall CheckDeviceMultiSampleType(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT surfaceFormat, int windowed, D3DMULTISAMPLE_TYPE multiSampleType, unsigned long *qualityLevels);
-		long __stdcall CheckDepthStencilMatch(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapterFormat, D3DFORMAT renderTargetFormat, D3DFORMAT depthStencilFormat);
-		long __stdcall CheckDeviceFormatConversion(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT sourceFormat, D3DFORMAT targetFormat);
-		long __stdcall GetDeviceCaps(unsigned int adapter, D3DDEVTYPE deviceType, D3DCAPS9 *caps);
-		HMONITOR __stdcall GetAdapterMonitor(unsigned int adapter);
-		long __stdcall CreateDevice(unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, unsigned long behaviorFlags, D3DPRESENT_PARAMETERS *presentParameters, IDirect3DDevice9 **returnedDeviceInterface);
+		long __stdcall RegisterSoftwareDevice(void *initializeFunction) override;
+		unsigned int __stdcall GetAdapterCount() override;
+		long __stdcall GetAdapterIdentifier(unsigned int adapter, unsigned long flags, D3DADAPTER_IDENTIFIER9 *identifier) override;
+		unsigned int __stdcall GetAdapterModeCount(unsigned int adapter, D3DFORMAT format) override;
+		long __stdcall EnumAdapterModes(unsigned int adapter, D3DFORMAT format, unsigned int index, D3DDISPLAYMODE *mode) override;
+		long __stdcall GetAdapterDisplayMode(unsigned int adapter, D3DDISPLAYMODE *mode) override;
+		long __stdcall CheckDeviceType(unsigned int adapter, D3DDEVTYPE checkType, D3DFORMAT displayFormat, D3DFORMAT backBufferFormat, int windowed) override;
+		long __stdcall CheckDeviceFormat(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapterFormat, unsigned long usage, D3DRESOURCETYPE type, D3DFORMAT checkFormat) override;
+		long __stdcall CheckDeviceMultiSampleType(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT surfaceFormat, int windowed, D3DMULTISAMPLE_TYPE multiSampleType, unsigned long *qualityLevels) override;
+		long __stdcall CheckDepthStencilMatch(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapterFormat, D3DFORMAT renderTargetFormat, D3DFORMAT depthStencilFormat) override;
+		long __stdcall CheckDeviceFormatConversion(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT sourceFormat, D3DFORMAT targetFormat) override;
+		long __stdcall GetDeviceCaps(unsigned int adapter, D3DDEVTYPE deviceType, D3DCAPS9 *caps) override;
+		HMONITOR __stdcall GetAdapterMonitor(unsigned int adapter) override;
+		long __stdcall CreateDevice(unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, unsigned long behaviorFlags, D3DPRESENT_PARAMETERS *presentParameters, IDirect3DDevice9 **returnedDeviceInterface) override;
 
 	protected:
 		// Creation parameters
diff --git a/src/D3D9/Direct3D9Ex.hpp b/src/D3D9/Direct3D9Ex.hpp
index a6589cf..8746cdf 100644
--- a/src/D3D9/Direct3D9Ex.hpp
+++ b/src/D3D9/Direct3D9Ex.hpp
@@ -29,35 +29,35 @@
 	public:
 		Direct3D9Ex(int version, const HINSTANCE instance);
 
-		virtual ~Direct3D9Ex();
+		~Direct3D9Ex() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3D9 methods
-		long __stdcall RegisterSoftwareDevice(void *initializeFunction);
-		unsigned int __stdcall GetAdapterCount();
-		long __stdcall GetAdapterIdentifier(unsigned int adapter, unsigned long flags, D3DADAPTER_IDENTIFIER9 *identifier);
-		unsigned int __stdcall GetAdapterModeCount(unsigned int adapter, D3DFORMAT format);
-		long __stdcall EnumAdapterModes(unsigned int adapter, D3DFORMAT format, unsigned int index, D3DDISPLAYMODE *mode);
-		long __stdcall GetAdapterDisplayMode(unsigned int adapter, D3DDISPLAYMODE *mode);
-		long __stdcall CheckDeviceType(unsigned int adapter, D3DDEVTYPE checkType, D3DFORMAT displayFormat, D3DFORMAT backBufferFormat, int windowed);
-		long __stdcall CheckDeviceFormat(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapterFormat, unsigned long usage, D3DRESOURCETYPE type, D3DFORMAT checkFormat);
-		long __stdcall CheckDeviceMultiSampleType(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT surfaceFormat, int windowed, D3DMULTISAMPLE_TYPE multiSampleType, unsigned long *qualityLevels);
-		long __stdcall CheckDepthStencilMatch(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapterFormat, D3DFORMAT renderTargetFormat, D3DFORMAT depthStencilFormat);
-		long __stdcall CheckDeviceFormatConversion(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT sourceFormat, D3DFORMAT targetFormat);
-		long __stdcall GetDeviceCaps(unsigned int adapter, D3DDEVTYPE deviceType, D3DCAPS9 *caps);
-		HMONITOR __stdcall GetAdapterMonitor(unsigned int adapter);
-		long __stdcall CreateDevice(unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, unsigned long behaviorFlags, D3DPRESENT_PARAMETERS *presentParameters, IDirect3DDevice9 **returnedDeviceInterface);
+		long __stdcall RegisterSoftwareDevice(void *initializeFunction) override;
+		unsigned int __stdcall GetAdapterCount() override;
+		long __stdcall GetAdapterIdentifier(unsigned int adapter, unsigned long flags, D3DADAPTER_IDENTIFIER9 *identifier) override;
+		unsigned int __stdcall GetAdapterModeCount(unsigned int adapter, D3DFORMAT format) override;
+		long __stdcall EnumAdapterModes(unsigned int adapter, D3DFORMAT format, unsigned int index, D3DDISPLAYMODE *mode) override;
+		long __stdcall GetAdapterDisplayMode(unsigned int adapter, D3DDISPLAYMODE *mode) override;
+		long __stdcall CheckDeviceType(unsigned int adapter, D3DDEVTYPE checkType, D3DFORMAT displayFormat, D3DFORMAT backBufferFormat, int windowed) override;
+		long __stdcall CheckDeviceFormat(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapterFormat, unsigned long usage, D3DRESOURCETYPE type, D3DFORMAT checkFormat) override;
+		long __stdcall CheckDeviceMultiSampleType(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT surfaceFormat, int windowed, D3DMULTISAMPLE_TYPE multiSampleType, unsigned long *qualityLevels) override;
+		long __stdcall CheckDepthStencilMatch(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT adapterFormat, D3DFORMAT renderTargetFormat, D3DFORMAT depthStencilFormat) override;
+		long __stdcall CheckDeviceFormatConversion(unsigned int adapter, D3DDEVTYPE deviceType, D3DFORMAT sourceFormat, D3DFORMAT targetFormat) override;
+		long __stdcall GetDeviceCaps(unsigned int adapter, D3DDEVTYPE deviceType, D3DCAPS9 *caps) override;
+		HMONITOR __stdcall GetAdapterMonitor(unsigned int adapter) override;
+		long __stdcall CreateDevice(unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, unsigned long behaviorFlags, D3DPRESENT_PARAMETERS *presentParameters, IDirect3DDevice9 **returnedDeviceInterface) override;
 
 		// IDirect3D9Ex methods
-		unsigned int __stdcall GetAdapterModeCountEx(unsigned int adapter, const D3DDISPLAYMODEFILTER *filter);
-		long __stdcall EnumAdapterModesEx(unsigned int adapter, const D3DDISPLAYMODEFILTER *filter, unsigned int index, D3DDISPLAYMODEEX *mode);
-		long __stdcall GetAdapterDisplayModeEx(unsigned int adapter, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation);
-		long __stdcall CreateDeviceEx(unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, DWORD behaviorFlags, D3DPRESENT_PARAMETERS *presentParameters, D3DDISPLAYMODEEX *fullscreenDisplayMode, IDirect3DDevice9Ex **returnedDeviceInterface);
-		long __stdcall GetAdapterLUID(unsigned int adapter, LUID *luid);
+		unsigned int __stdcall GetAdapterModeCountEx(unsigned int adapter, const D3DDISPLAYMODEFILTER *filter) override;
+		long __stdcall EnumAdapterModesEx(unsigned int adapter, const D3DDISPLAYMODEFILTER *filter, unsigned int index, D3DDISPLAYMODEEX *mode) override;
+		long __stdcall GetAdapterDisplayModeEx(unsigned int adapter, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation) override;
+		long __stdcall CreateDeviceEx(unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, DWORD behaviorFlags, D3DPRESENT_PARAMETERS *presentParameters, D3DDISPLAYMODEEX *fullscreenDisplayMode, IDirect3DDevice9Ex **returnedDeviceInterface) override;
+		long __stdcall GetAdapterLUID(unsigned int adapter, LUID *luid) override;
 
 	private:
 		void loadSystemD3D9ex();
diff --git a/src/D3D9/Direct3DBaseTexture9.hpp b/src/D3D9/Direct3DBaseTexture9.hpp
index 52d0df7..1e75a14 100644
--- a/src/D3D9/Direct3DBaseTexture9.hpp
+++ b/src/D3D9/Direct3DBaseTexture9.hpp
@@ -31,30 +31,30 @@
 	public:
 		Direct3DBaseTexture9(Direct3DDevice9 *device, D3DRESOURCETYPE type, D3DFORMAT format, D3DPOOL pool, unsigned long levels, unsigned long usage);
 
-		virtual ~Direct3DBaseTexture9();
+		~Direct3DBaseTexture9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource9 methods
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		long __stdcall FreePrivateData(const GUID &guid);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		void __stdcall PreLoad();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		void __stdcall PreLoad() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DBaseTexture9 methods
-		unsigned long __stdcall SetLOD(unsigned long newLOD);
-		unsigned long __stdcall GetLOD();
-		unsigned long __stdcall GetLevelCount();
-		long __stdcall SetAutoGenFilterType(D3DTEXTUREFILTERTYPE filterType);
-		D3DTEXTUREFILTERTYPE __stdcall GetAutoGenFilterType();
-		void __stdcall GenerateMipSubLevels();
+		unsigned long __stdcall SetLOD(unsigned long newLOD) override;
+		unsigned long __stdcall GetLOD() override;
+		unsigned long __stdcall GetLevelCount() override;
+		long __stdcall SetAutoGenFilterType(D3DTEXTUREFILTERTYPE filterType) override;
+		D3DTEXTUREFILTERTYPE __stdcall GetAutoGenFilterType() override;
+		void __stdcall GenerateMipSubLevels() override;
 
 		// Intenal methods
 		sw::Resource *getResource() const;
diff --git a/src/D3D9/Direct3DCubeTexture9.hpp b/src/D3D9/Direct3DCubeTexture9.hpp
index b92bc74..21dedd5 100644
--- a/src/D3D9/Direct3DCubeTexture9.hpp
+++ b/src/D3D9/Direct3DCubeTexture9.hpp
@@ -30,37 +30,37 @@
 	public:
 		Direct3DCubeTexture9(Direct3DDevice9 *device, unsigned int edgeLength, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool);
 
-		virtual ~Direct3DCubeTexture9();
+		~Direct3DCubeTexture9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource9 methods
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		long __stdcall FreePrivateData(const GUID &guid);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		void __stdcall PreLoad();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		void __stdcall PreLoad() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DBaseTexture9 methods
-		unsigned long __stdcall SetLOD(unsigned long newLOD);
-		unsigned long __stdcall GetLOD();
-		unsigned long __stdcall GetLevelCount();
-		long __stdcall SetAutoGenFilterType(D3DTEXTUREFILTERTYPE filterType);
-		D3DTEXTUREFILTERTYPE __stdcall GetAutoGenFilterType();
-		void __stdcall GenerateMipSubLevels();
+		unsigned long __stdcall SetLOD(unsigned long newLOD) override;
+		unsigned long __stdcall GetLOD() override;
+		unsigned long __stdcall GetLevelCount() override;
+		long __stdcall SetAutoGenFilterType(D3DTEXTUREFILTERTYPE filterType) override;
+		D3DTEXTUREFILTERTYPE __stdcall GetAutoGenFilterType() override;
+		void __stdcall GenerateMipSubLevels() override;
 
 		// IDirect3DCubeTexture9 methods
-		long __stdcall GetLevelDesc(unsigned int level, D3DSURFACE_DESC *description);
-		long __stdcall GetCubeMapSurface(D3DCUBEMAP_FACES face, unsigned int level, IDirect3DSurface9 **cubeMapSurface);
-		long __stdcall LockRect(D3DCUBEMAP_FACES face, unsigned int level, D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long flags);
-		long __stdcall UnlockRect(D3DCUBEMAP_FACES face, unsigned int level);
-		long __stdcall AddDirtyRect(D3DCUBEMAP_FACES face, const RECT *dirtyRect);
+		long __stdcall GetLevelDesc(unsigned int level, D3DSURFACE_DESC *description) override;
+		long __stdcall GetCubeMapSurface(D3DCUBEMAP_FACES face, unsigned int level, IDirect3DSurface9 **cubeMapSurface) override;
+		long __stdcall LockRect(D3DCUBEMAP_FACES face, unsigned int level, D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long flags) override;
+		long __stdcall UnlockRect(D3DCUBEMAP_FACES face, unsigned int level) override;
+		long __stdcall AddDirtyRect(D3DCUBEMAP_FACES face, const RECT *dirtyRect) override;
 
 		// Internal methods
 		Direct3DSurface9 *getInternalCubeMapSurface(D3DCUBEMAP_FACES face, unsigned int level);
diff --git a/src/D3D9/Direct3DDevice9.cpp b/src/D3D9/Direct3DDevice9.cpp
index 126b0df..9b68c47 100644
--- a/src/D3D9/Direct3DDevice9.cpp
+++ b/src/D3D9/Direct3DDevice9.cpp
@@ -2659,7 +2659,7 @@
 		void *bitmap = cursorSurface->lockExternal(0, 0, 0, sw::LOCK_READONLY, sw::PUBLIC);
 
 		delete cursor;
-		cursor = new sw::Surface(0, width, height, 1, sw::FORMAT_A8R8G8B8, false, false);
+		cursor = sw::Surface::create(0, width, height, 1, sw::FORMAT_A8R8G8B8, false, false);
 
 		void *buffer = cursor->lockExternal(0, 0, 0, sw::LOCK_DISCARD, sw::PUBLIC);
 		memcpy(buffer, bitmap, width * height * sizeof(unsigned int));
diff --git a/src/D3D9/Direct3DDevice9.hpp b/src/D3D9/Direct3DDevice9.hpp
index 4ca3442..b5b7dc4 100644
--- a/src/D3D9/Direct3DDevice9.hpp
+++ b/src/D3D9/Direct3DDevice9.hpp
@@ -54,130 +54,130 @@
 	public:
 		Direct3DDevice9(const HINSTANCE instance, Direct3D9 *d3d9, unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, unsigned long behaviourFlags, D3DPRESENT_PARAMETERS *presentParameters);
 
-		virtual ~Direct3DDevice9();
+		~Direct3DDevice9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DDevice9 methods
-		long __stdcall BeginScene();
-		long __stdcall BeginStateBlock();
-		long __stdcall Clear(unsigned long count, const D3DRECT *rects, unsigned long flags, unsigned long color, float z, unsigned long stencil);
-		long __stdcall ColorFill(IDirect3DSurface9 *surface, const RECT *rect, D3DCOLOR color);
-		long __stdcall CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS *presentParameters, IDirect3DSwapChain9 **swapChain);
-		long __stdcall CreateCubeTexture(unsigned int edgeLength, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DCubeTexture9 **cubeTexture, void **sharedHandle);
-		long __stdcall CreateDepthStencilSurface(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, unsigned long multiSampleQuality, int discard, IDirect3DSurface9 **surface, void **sharedHandle);
-		long __stdcall CreateIndexBuffer(unsigned int length, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer9 **indexBuffer, void **sharedHandle);
-		long __stdcall CreateOffscreenPlainSurface(unsigned int width, unsigned int height, D3DFORMAT format, D3DPOOL pool, IDirect3DSurface9 **surface, void **sharedHandle);
-		long __stdcall CreatePixelShader(const unsigned long *function, IDirect3DPixelShader9 **shader);
-		long __stdcall CreateQuery(D3DQUERYTYPE type, IDirect3DQuery9 **query);
-		long __stdcall CreateRenderTarget(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, unsigned long multiSampleQuality, int lockable, IDirect3DSurface9 **surface, void **sharedHandle);
-		long __stdcall CreateStateBlock(D3DSTATEBLOCKTYPE type, IDirect3DStateBlock9 **stateBlock);
-		long __stdcall CreateTexture(unsigned int width, unsigned int height, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DTexture9 **texture, void **sharedHandle);
-		long __stdcall CreateVertexBuffer(unsigned int length, unsigned long usage, unsigned long FVF, D3DPOOL pool, IDirect3DVertexBuffer9 **vertexBuffer, void **sharedHandle);
-		long __stdcall CreateVertexDeclaration(const D3DVERTEXELEMENT9 *vertexElements, IDirect3DVertexDeclaration9 **declaration);
-		long __stdcall CreateVertexShader(const unsigned long *function, IDirect3DVertexShader9 **shader);
-		long __stdcall CreateVolumeTexture(unsigned int width, unsigned int height, unsigned int depth, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DVolumeTexture9 **volumeTexture, void **sharedHandle);
-		long __stdcall DeletePatch(unsigned int handle);
-		long __stdcall DrawIndexedPrimitive(D3DPRIMITIVETYPE type, int baseVertexIndex, unsigned int minIndex, unsigned int numVertices, unsigned int startIndex, unsigned int primitiveCount);
-		long __stdcall DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE type, unsigned int minVertexIndex, unsigned int numVertexIndices, unsigned int PrimitiveCount, const void *indexData, D3DFORMAT indexDataFormat, const void *vertexStreamZeroData, unsigned int VertexStreamZeroStride);
-		long __stdcall DrawPrimitive(D3DPRIMITIVETYPE primitiveType, unsigned int startVertex, unsigned int primiveCount);
-		long __stdcall DrawPrimitiveUP(D3DPRIMITIVETYPE primitiveType, unsigned int primitiveCount, const void *vertexStreamZeroData, unsigned int vertexStreamZeroStride);
-		long __stdcall DrawRectPatch(unsigned int handle, const float *numSegs, const D3DRECTPATCH_INFO *rectPatchInfo);
-		long __stdcall DrawTriPatch(unsigned int handle, const float *numSegs, const D3DTRIPATCH_INFO *triPatchInfo);
-		long __stdcall EndScene();
-		long __stdcall EndStateBlock(IDirect3DStateBlock9 **stateBlock);
-		long __stdcall EvictManagedResources();
-		unsigned int __stdcall GetAvailableTextureMem();
-		long __stdcall GetBackBuffer(unsigned int swapChain, unsigned int index, D3DBACKBUFFER_TYPE type, IDirect3DSurface9 **backBuffer);
-		long __stdcall GetClipPlane(unsigned long index, float *plane);
-		long __stdcall GetClipStatus(D3DCLIPSTATUS9 *clipStatus);
-		long __stdcall GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *parameters);
-		long __stdcall GetCurrentTexturePalette(unsigned int *paletteNumber);
-		long __stdcall GetDepthStencilSurface(IDirect3DSurface9 **depthStencilSurface);
-		long __stdcall GetDeviceCaps(D3DCAPS9 *caps);
-		long __stdcall GetDirect3D(IDirect3D9 **D3D);
-		long __stdcall GetDisplayMode(unsigned int swapChain ,D3DDISPLAYMODE *mode);
-		long __stdcall GetFrontBufferData(unsigned int swapChain, IDirect3DSurface9 *destSurface);
-		long __stdcall GetFVF(unsigned long *FVF);
-		void __stdcall GetGammaRamp(unsigned int swapChain, D3DGAMMARAMP *ramp);
-		long __stdcall GetIndices(IDirect3DIndexBuffer9 **indexData);
-		long __stdcall GetLight(unsigned long index, D3DLIGHT9 *p);
-		long __stdcall GetLightEnable(unsigned long index , int *enable);
-		long __stdcall GetMaterial(D3DMATERIAL9 *material);
-		float __stdcall GetNPatchMode();
-		unsigned int __stdcall GetNumberOfSwapChains();
-		long __stdcall GetPaletteEntries(unsigned int paletteNumber, PALETTEENTRY *entries);
-		long __stdcall GetPixelShader(IDirect3DPixelShader9 **shader);
-		long __stdcall GetPixelShaderConstantB(unsigned int startRegister, int *constantData, unsigned int count);
-		long __stdcall GetPixelShaderConstantF(unsigned int startRegister, float *constantData, unsigned int count);
-		long __stdcall GetPixelShaderConstantI(unsigned int startRegister, int *constantData, unsigned int count);
-		long __stdcall GetRasterStatus(unsigned int swapChain, D3DRASTER_STATUS *rasterStatus);
-		long __stdcall GetRenderState(D3DRENDERSTATETYPE State, unsigned long *value);
-		long __stdcall GetRenderTarget(unsigned long index, IDirect3DSurface9 **renderTarget);
-		long __stdcall GetRenderTargetData(IDirect3DSurface9 *renderTarget, IDirect3DSurface9 *destSurface);
-		long __stdcall GetSamplerState(unsigned long sampler, D3DSAMPLERSTATETYPE type, unsigned long *value);
-		long __stdcall GetScissorRect(RECT *rect);
-		int __stdcall GetSoftwareVertexProcessing();
-		long __stdcall GetStreamSource(unsigned int streamNumber, IDirect3DVertexBuffer9 **streamData, unsigned int *offset, unsigned int *stride);
-		long __stdcall GetStreamSourceFreq(unsigned int streamNumber, unsigned int *divider);
-		long __stdcall GetSwapChain(unsigned int index, IDirect3DSwapChain9 **swapChain);
-		long __stdcall GetTexture(unsigned long sampler, IDirect3DBaseTexture9 **texture);
-		long __stdcall GetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long *value);
-		long __stdcall GetTransform(D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix);
-		long __stdcall GetVertexDeclaration(IDirect3DVertexDeclaration9 **declaration);
-		long __stdcall GetVertexShader(IDirect3DVertexShader9 **shader);
-		long __stdcall GetVertexShaderConstantB(unsigned int startRegister, int *constantData, unsigned int count);
-		long __stdcall GetVertexShaderConstantF(unsigned int startRegister, float *constantData, unsigned int count);
-		long __stdcall GetVertexShaderConstantI(unsigned int startRegister, int *constantData, unsigned int count);
-		long __stdcall GetViewport(D3DVIEWPORT9 *viewport);
-		long __stdcall LightEnable(unsigned long index, int enable);
-		long __stdcall MultiplyTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix);
-		long __stdcall Present(const RECT *sourceRect, const RECT *destRect, HWND destWindowOverride, const RGNDATA *dirtyRegion);
-		long __stdcall ProcessVertices(unsigned int srcStartIndex, unsigned int destIndex, unsigned int vertexCount, IDirect3DVertexBuffer9 *destBuffer, IDirect3DVertexDeclaration9 *vertexDeclaration, unsigned long flags);
-		long __stdcall Reset(D3DPRESENT_PARAMETERS *presentParameters);
-		long __stdcall SetClipPlane(unsigned long index, const float *plane);
-		long __stdcall SetClipStatus(const D3DCLIPSTATUS9 *clipStatus);
-		long __stdcall SetCurrentTexturePalette(unsigned int paletteNumber);
-		void __stdcall SetCursorPosition(int x, int y, unsigned long flags);
-		long __stdcall SetCursorProperties(unsigned int x, unsigned int y, IDirect3DSurface9 *cursorBitmap);
-		long __stdcall SetDepthStencilSurface(IDirect3DSurface9 *newDepthStencil);
-		long __stdcall SetDialogBoxMode(int enableDialogs);
-		long __stdcall SetFVF(unsigned long FVF);
-		void __stdcall SetGammaRamp(unsigned int swapChain, unsigned long flags, const D3DGAMMARAMP *ramp);
-		long __stdcall SetIndices(IDirect3DIndexBuffer9 *indexData);
-		long __stdcall SetLight(unsigned long index, const D3DLIGHT9 *light);
-		long __stdcall SetMaterial(const D3DMATERIAL9 *material);
-		long __stdcall SetNPatchMode(float segments);
-		long __stdcall SetPaletteEntries(unsigned int paletteNumber, const PALETTEENTRY *entries);
-		long __stdcall SetPixelShader(IDirect3DPixelShader9 *shader);
-		long __stdcall SetPixelShaderConstantB(unsigned int startRegister, const int *constantData, unsigned int count);
-		long __stdcall SetPixelShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count);
-		long __stdcall SetPixelShaderConstantI(unsigned int startRegister, const int *constantData, unsigned int count);
-		long __stdcall SetRenderState(D3DRENDERSTATETYPE state, unsigned long value);
-		long __stdcall SetRenderTarget(unsigned long index, IDirect3DSurface9 *renderTarget);
-		long __stdcall SetSamplerState(unsigned long sampler, D3DSAMPLERSTATETYPE state, unsigned long value);
-		long __stdcall SetScissorRect(const RECT *rect);
-		long __stdcall SetSoftwareVertexProcessing(int software);
-		long __stdcall SetStreamSource(unsigned int stream, IDirect3DVertexBuffer9 *data, unsigned int offset, unsigned int stride);
-		long __stdcall SetStreamSourceFreq(unsigned int streamNumber, unsigned int divider);
-		long __stdcall SetTexture(unsigned long sampler, IDirect3DBaseTexture9 *texture);
-		long __stdcall SetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long value);
-		long __stdcall SetTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix);
-		long __stdcall SetVertexDeclaration(IDirect3DVertexDeclaration9 *declaration);
-		long __stdcall SetVertexShader(IDirect3DVertexShader9 *shader);
-		long __stdcall SetVertexShaderConstantB(unsigned int startRegister, const int *constantData, unsigned int count);
-		long __stdcall SetVertexShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count);
-		long __stdcall SetVertexShaderConstantI(unsigned int startRegister, const int *constantData, unsigned int count);
-		long __stdcall SetViewport(const D3DVIEWPORT9 *viewport);
-		int __stdcall ShowCursor(int show);
-		long __stdcall StretchRect(IDirect3DSurface9 *sourceSurface, const RECT *sourceRect, IDirect3DSurface9 *destSurface, const RECT *destRect, D3DTEXTUREFILTERTYPE filter);
-		long __stdcall TestCooperativeLevel();
-		long __stdcall UpdateSurface(IDirect3DSurface9 *sourceSurface, const RECT *sourceRect, IDirect3DSurface9 *destinationSurface, const POINT *destPoint);
-		long __stdcall UpdateTexture(IDirect3DBaseTexture9 *sourceTexture, IDirect3DBaseTexture9 *destinationTexture);
-		long __stdcall ValidateDevice(unsigned long *numPasses);
+		long __stdcall BeginScene() override;
+		long __stdcall BeginStateBlock() override;
+		long __stdcall Clear(unsigned long count, const D3DRECT *rects, unsigned long flags, unsigned long color, float z, unsigned long stencil) override;
+		long __stdcall ColorFill(IDirect3DSurface9 *surface, const RECT *rect, D3DCOLOR color) override;
+		long __stdcall CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS *presentParameters, IDirect3DSwapChain9 **swapChain) override;
+		long __stdcall CreateCubeTexture(unsigned int edgeLength, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DCubeTexture9 **cubeTexture, void **sharedHandle) override;
+		long __stdcall CreateDepthStencilSurface(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, unsigned long multiSampleQuality, int discard, IDirect3DSurface9 **surface, void **sharedHandle) override;
+		long __stdcall CreateIndexBuffer(unsigned int length, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer9 **indexBuffer, void **sharedHandle) override;
+		long __stdcall CreateOffscreenPlainSurface(unsigned int width, unsigned int height, D3DFORMAT format, D3DPOOL pool, IDirect3DSurface9 **surface, void **sharedHandle) override;
+		long __stdcall CreatePixelShader(const unsigned long *function, IDirect3DPixelShader9 **shader) override;
+		long __stdcall CreateQuery(D3DQUERYTYPE type, IDirect3DQuery9 **query) override;
+		long __stdcall CreateRenderTarget(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, unsigned long multiSampleQuality, int lockable, IDirect3DSurface9 **surface, void **sharedHandle) override;
+		long __stdcall CreateStateBlock(D3DSTATEBLOCKTYPE type, IDirect3DStateBlock9 **stateBlock) override;
+		long __stdcall CreateTexture(unsigned int width, unsigned int height, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DTexture9 **texture, void **sharedHandle) override;
+		long __stdcall CreateVertexBuffer(unsigned int length, unsigned long usage, unsigned long FVF, D3DPOOL pool, IDirect3DVertexBuffer9 **vertexBuffer, void **sharedHandle) override;
+		long __stdcall CreateVertexDeclaration(const D3DVERTEXELEMENT9 *vertexElements, IDirect3DVertexDeclaration9 **declaration) override;
+		long __stdcall CreateVertexShader(const unsigned long *function, IDirect3DVertexShader9 **shader) override;
+		long __stdcall CreateVolumeTexture(unsigned int width, unsigned int height, unsigned int depth, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DVolumeTexture9 **volumeTexture, void **sharedHandle) override;
+		long __stdcall DeletePatch(unsigned int handle) override;
+		long __stdcall DrawIndexedPrimitive(D3DPRIMITIVETYPE type, int baseVertexIndex, unsigned int minIndex, unsigned int numVertices, unsigned int startIndex, unsigned int primitiveCount) override;
+		long __stdcall DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE type, unsigned int minVertexIndex, unsigned int numVertexIndices, unsigned int PrimitiveCount, const void *indexData, D3DFORMAT indexDataFormat, const void *vertexStreamZeroData, unsigned int VertexStreamZeroStride) override;
+		long __stdcall DrawPrimitive(D3DPRIMITIVETYPE primitiveType, unsigned int startVertex, unsigned int primiveCount) override;
+		long __stdcall DrawPrimitiveUP(D3DPRIMITIVETYPE primitiveType, unsigned int primitiveCount, const void *vertexStreamZeroData, unsigned int vertexStreamZeroStride) override;
+		long __stdcall DrawRectPatch(unsigned int handle, const float *numSegs, const D3DRECTPATCH_INFO *rectPatchInfo) override;
+		long __stdcall DrawTriPatch(unsigned int handle, const float *numSegs, const D3DTRIPATCH_INFO *triPatchInfo) override;
+		long __stdcall EndScene() override;
+		long __stdcall EndStateBlock(IDirect3DStateBlock9 **stateBlock) override;
+		long __stdcall EvictManagedResources() override;
+		unsigned int __stdcall GetAvailableTextureMem() override;
+		long __stdcall GetBackBuffer(unsigned int swapChain, unsigned int index, D3DBACKBUFFER_TYPE type, IDirect3DSurface9 **backBuffer) override;
+		long __stdcall GetClipPlane(unsigned long index, float *plane) override;
+		long __stdcall GetClipStatus(D3DCLIPSTATUS9 *clipStatus) override;
+		long __stdcall GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *parameters) override;
+		long __stdcall GetCurrentTexturePalette(unsigned int *paletteNumber) override;
+		long __stdcall GetDepthStencilSurface(IDirect3DSurface9 **depthStencilSurface) override;
+		long __stdcall GetDeviceCaps(D3DCAPS9 *caps) override;
+		long __stdcall GetDirect3D(IDirect3D9 **D3D) override;
+		long __stdcall GetDisplayMode(unsigned int swapChain ,D3DDISPLAYMODE *mode) override;
+		long __stdcall GetFrontBufferData(unsigned int swapChain, IDirect3DSurface9 *destSurface) override;
+		long __stdcall GetFVF(unsigned long *FVF) override;
+		void __stdcall GetGammaRamp(unsigned int swapChain, D3DGAMMARAMP *ramp) override;
+		long __stdcall GetIndices(IDirect3DIndexBuffer9 **indexData) override;
+		long __stdcall GetLight(unsigned long index, D3DLIGHT9 *p) override;
+		long __stdcall GetLightEnable(unsigned long index , int *enable) override;
+		long __stdcall GetMaterial(D3DMATERIAL9 *material) override;
+		float __stdcall GetNPatchMode() override;
+		unsigned int __stdcall GetNumberOfSwapChains() override;
+		long __stdcall GetPaletteEntries(unsigned int paletteNumber, PALETTEENTRY *entries) override;
+		long __stdcall GetPixelShader(IDirect3DPixelShader9 **shader) override;
+		long __stdcall GetPixelShaderConstantB(unsigned int startRegister, int *constantData, unsigned int count) override;
+		long __stdcall GetPixelShaderConstantF(unsigned int startRegister, float *constantData, unsigned int count) override;
+		long __stdcall GetPixelShaderConstantI(unsigned int startRegister, int *constantData, unsigned int count) override;
+		long __stdcall GetRasterStatus(unsigned int swapChain, D3DRASTER_STATUS *rasterStatus) override;
+		long __stdcall GetRenderState(D3DRENDERSTATETYPE State, unsigned long *value) override;
+		long __stdcall GetRenderTarget(unsigned long index, IDirect3DSurface9 **renderTarget) override;
+		long __stdcall GetRenderTargetData(IDirect3DSurface9 *renderTarget, IDirect3DSurface9 *destSurface) override;
+		long __stdcall GetSamplerState(unsigned long sampler, D3DSAMPLERSTATETYPE type, unsigned long *value) override;
+		long __stdcall GetScissorRect(RECT *rect) override;
+		int __stdcall GetSoftwareVertexProcessing() override;
+		long __stdcall GetStreamSource(unsigned int streamNumber, IDirect3DVertexBuffer9 **streamData, unsigned int *offset, unsigned int *stride) override;
+		long __stdcall GetStreamSourceFreq(unsigned int streamNumber, unsigned int *divider) override;
+		long __stdcall GetSwapChain(unsigned int index, IDirect3DSwapChain9 **swapChain) override;
+		long __stdcall GetTexture(unsigned long sampler, IDirect3DBaseTexture9 **texture) override;
+		long __stdcall GetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long *value) override;
+		long __stdcall GetTransform(D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) override;
+		long __stdcall GetVertexDeclaration(IDirect3DVertexDeclaration9 **declaration) override;
+		long __stdcall GetVertexShader(IDirect3DVertexShader9 **shader) override;
+		long __stdcall GetVertexShaderConstantB(unsigned int startRegister, int *constantData, unsigned int count) override;
+		long __stdcall GetVertexShaderConstantF(unsigned int startRegister, float *constantData, unsigned int count) override;
+		long __stdcall GetVertexShaderConstantI(unsigned int startRegister, int *constantData, unsigned int count) override;
+		long __stdcall GetViewport(D3DVIEWPORT9 *viewport) override;
+		long __stdcall LightEnable(unsigned long index, int enable) override;
+		long __stdcall MultiplyTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix) override;
+		long __stdcall Present(const RECT *sourceRect, const RECT *destRect, HWND destWindowOverride, const RGNDATA *dirtyRegion) override;
+		long __stdcall ProcessVertices(unsigned int srcStartIndex, unsigned int destIndex, unsigned int vertexCount, IDirect3DVertexBuffer9 *destBuffer, IDirect3DVertexDeclaration9 *vertexDeclaration, unsigned long flags) override;
+		long __stdcall Reset(D3DPRESENT_PARAMETERS *presentParameters) override;
+		long __stdcall SetClipPlane(unsigned long index, const float *plane) override;
+		long __stdcall SetClipStatus(const D3DCLIPSTATUS9 *clipStatus) override;
+		long __stdcall SetCurrentTexturePalette(unsigned int paletteNumber) override;
+		void __stdcall SetCursorPosition(int x, int y, unsigned long flags) override;
+		long __stdcall SetCursorProperties(unsigned int x, unsigned int y, IDirect3DSurface9 *cursorBitmap) override;
+		long __stdcall SetDepthStencilSurface(IDirect3DSurface9 *newDepthStencil) override;
+		long __stdcall SetDialogBoxMode(int enableDialogs) override;
+		long __stdcall SetFVF(unsigned long FVF) override;
+		void __stdcall SetGammaRamp(unsigned int swapChain, unsigned long flags, const D3DGAMMARAMP *ramp) override;
+		long __stdcall SetIndices(IDirect3DIndexBuffer9 *indexData) override;
+		long __stdcall SetLight(unsigned long index, const D3DLIGHT9 *light) override;
+		long __stdcall SetMaterial(const D3DMATERIAL9 *material) override;
+		long __stdcall SetNPatchMode(float segments) override;
+		long __stdcall SetPaletteEntries(unsigned int paletteNumber, const PALETTEENTRY *entries) override;
+		long __stdcall SetPixelShader(IDirect3DPixelShader9 *shader) override;
+		long __stdcall SetPixelShaderConstantB(unsigned int startRegister, const int *constantData, unsigned int count) override;
+		long __stdcall SetPixelShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count) override;
+		long __stdcall SetPixelShaderConstantI(unsigned int startRegister, const int *constantData, unsigned int count) override;
+		long __stdcall SetRenderState(D3DRENDERSTATETYPE state, unsigned long value) override;
+		long __stdcall SetRenderTarget(unsigned long index, IDirect3DSurface9 *renderTarget) override;
+		long __stdcall SetSamplerState(unsigned long sampler, D3DSAMPLERSTATETYPE state, unsigned long value) override;
+		long __stdcall SetScissorRect(const RECT *rect) override;
+		long __stdcall SetSoftwareVertexProcessing(int software) override;
+		long __stdcall SetStreamSource(unsigned int stream, IDirect3DVertexBuffer9 *data, unsigned int offset, unsigned int stride) override;
+		long __stdcall SetStreamSourceFreq(unsigned int streamNumber, unsigned int divider) override;
+		long __stdcall SetTexture(unsigned long sampler, IDirect3DBaseTexture9 *texture) override;
+		long __stdcall SetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long value) override;
+		long __stdcall SetTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix) override;
+		long __stdcall SetVertexDeclaration(IDirect3DVertexDeclaration9 *declaration) override;
+		long __stdcall SetVertexShader(IDirect3DVertexShader9 *shader) override;
+		long __stdcall SetVertexShaderConstantB(unsigned int startRegister, const int *constantData, unsigned int count) override;
+		long __stdcall SetVertexShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count) override;
+		long __stdcall SetVertexShaderConstantI(unsigned int startRegister, const int *constantData, unsigned int count) override;
+		long __stdcall SetViewport(const D3DVIEWPORT9 *viewport) override;
+		int __stdcall ShowCursor(int show) override;
+		long __stdcall StretchRect(IDirect3DSurface9 *sourceSurface, const RECT *sourceRect, IDirect3DSurface9 *destSurface, const RECT *destRect, D3DTEXTUREFILTERTYPE filter) override;
+		long __stdcall TestCooperativeLevel() override;
+		long __stdcall UpdateSurface(IDirect3DSurface9 *sourceSurface, const RECT *sourceRect, IDirect3DSurface9 *destinationSurface, const POINT *destPoint) override;
+		long __stdcall UpdateTexture(IDirect3DBaseTexture9 *sourceTexture, IDirect3DBaseTexture9 *destinationTexture) override;
+		long __stdcall ValidateDevice(unsigned long *numPasses) override;
 
 		// Internal methods
 		long getAdapterDisplayMode(unsigned int adapter, D3DDISPLAYMODE *mode);
diff --git a/src/D3D9/Direct3DDevice9Ex.hpp b/src/D3D9/Direct3DDevice9Ex.hpp
index ce34a95..4a28df5 100644
--- a/src/D3D9/Direct3DDevice9Ex.hpp
+++ b/src/D3D9/Direct3DDevice9Ex.hpp
@@ -49,147 +49,147 @@
 	public:
 		Direct3DDevice9Ex(const HINSTANCE instance, Direct3D9Ex *d3d9ex, unsigned int adapter, D3DDEVTYPE deviceType, HWND focusWindow, unsigned long behaviourFlags, D3DPRESENT_PARAMETERS *presentParameters);
 
-		virtual ~Direct3DDevice9Ex();
+		~Direct3DDevice9Ex() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DDevice9 methods
-		long __stdcall TestCooperativeLevel();
-		unsigned int __stdcall GetAvailableTextureMem();
-		long __stdcall EvictManagedResources();
-		long __stdcall GetDirect3D(IDirect3D9 **D3D);
-		long __stdcall GetDeviceCaps(D3DCAPS9 *caps);
-		long __stdcall GetDisplayMode(unsigned int swapChain ,D3DDISPLAYMODE *mode);
-		long __stdcall GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *parameters);
-		long __stdcall SetCursorProperties(unsigned int x, unsigned int y, IDirect3DSurface9 *cursorBitmap);
-		void __stdcall SetCursorPosition(int x, int y, unsigned long flags);
-		int __stdcall ShowCursor(int show);
-		long __stdcall CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS *presentParameters, IDirect3DSwapChain9 **swapChain);
-		long __stdcall GetSwapChain(unsigned int index, IDirect3DSwapChain9 **swapChain);
-		unsigned int __stdcall GetNumberOfSwapChains();
-		long __stdcall Reset(D3DPRESENT_PARAMETERS *presentParameters);
-		long __stdcall Present(const RECT *sourceRect, const RECT *destRect, HWND destWindowOverride, const RGNDATA *dirtyRegion);
-		long __stdcall GetBackBuffer(unsigned int swapChain, unsigned int index, D3DBACKBUFFER_TYPE type, IDirect3DSurface9 **backBuffer);
-		long __stdcall GetRasterStatus(unsigned int swapChain, D3DRASTER_STATUS *rasterStatus);
-		long __stdcall SetDialogBoxMode(int enableDialogs);
-		void __stdcall SetGammaRamp(unsigned int swapChain, unsigned long flags, const D3DGAMMARAMP *ramp);
-		void __stdcall GetGammaRamp(unsigned int swapChain, D3DGAMMARAMP *ramp);
-		long __stdcall CreateTexture(unsigned int width, unsigned int height, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DTexture9 **texture, void **sharedHandle);
-		long __stdcall CreateVolumeTexture(unsigned int width, unsigned int height, unsigned int depth, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DVolumeTexture9 **volumeTexture, void **sharedHandle);
-		long __stdcall CreateCubeTexture(unsigned int edgeLength, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DCubeTexture9 **cubeTexture, void **sharedHandle);
-		long __stdcall CreateVertexBuffer(unsigned int length, unsigned long usage, unsigned long FVF, D3DPOOL, IDirect3DVertexBuffer9 **vertexBuffer, void **sharedHandle);
-		long __stdcall CreateIndexBuffer(unsigned int length, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer9 **indexBuffer, void **sharedHandle);
-		long __stdcall CreateRenderTarget(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, unsigned long multiSampleQuality, int lockable, IDirect3DSurface9 **surface, void **sharedHandle);
-		long __stdcall CreateDepthStencilSurface(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, unsigned long multiSampleQuality, int discard, IDirect3DSurface9 **surface, void **sharedHandle);
-		long __stdcall UpdateSurface(IDirect3DSurface9 *sourceSurface, const RECT *sourceRect, IDirect3DSurface9 *destinationSurface, const POINT *destPoint);
-		long __stdcall UpdateTexture(IDirect3DBaseTexture9 *sourceTexture, IDirect3DBaseTexture9 *destinationTexture);
-		long __stdcall GetRenderTargetData(IDirect3DSurface9 *renderTarget, IDirect3DSurface9 *destSurface);
-		long __stdcall GetFrontBufferData(unsigned int swapChain, IDirect3DSurface9 *destSurface);
-		long __stdcall StretchRect(IDirect3DSurface9 *sourceSurface, const RECT *sourceRect, IDirect3DSurface9 *destSurface, const RECT *destRect, D3DTEXTUREFILTERTYPE filter);
-		long __stdcall ColorFill(IDirect3DSurface9 *surface, const RECT *rect, D3DCOLOR color);
-		long __stdcall CreateOffscreenPlainSurface(unsigned int width, unsigned int height, D3DFORMAT format, D3DPOOL pool, IDirect3DSurface9 **surface, void **sharedHandle);
-		long __stdcall SetRenderTarget(unsigned long index, IDirect3DSurface9 *renderTarget);
-		long __stdcall GetRenderTarget(unsigned long index, IDirect3DSurface9 **renderTarget);
-		long __stdcall SetDepthStencilSurface(IDirect3DSurface9 *newDepthStencil);
-		long __stdcall GetDepthStencilSurface(IDirect3DSurface9 **depthStencilSurface);
-		long __stdcall BeginScene();
-		long __stdcall EndScene();
-		long __stdcall Clear(unsigned long Count, const D3DRECT *rects, unsigned long Flags, unsigned long Color, float Z, unsigned long Stencil);
-		long __stdcall SetTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix);
-		long __stdcall GetTransform(D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix);
-		long __stdcall MultiplyTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix);
-		long __stdcall SetViewport(const D3DVIEWPORT9 *viewport);
-		long __stdcall GetViewport(D3DVIEWPORT9 *viewport);
-		long __stdcall SetMaterial(const D3DMATERIAL9 *material);
-		long __stdcall GetMaterial(D3DMATERIAL9 *material);
-		long __stdcall SetLight(unsigned long index, const D3DLIGHT9 *light);
-		long __stdcall GetLight(unsigned long index, D3DLIGHT9 *light);
-		long __stdcall LightEnable(unsigned long index, int enable);
-		long __stdcall GetLightEnable(unsigned long index , int *enable);
-		long __stdcall SetClipPlane(unsigned long index, const float *plane);
-		long __stdcall GetClipPlane(unsigned long index, float *plane);
-		long __stdcall SetRenderState(D3DRENDERSTATETYPE state, unsigned long value);
-		long __stdcall GetRenderState(D3DRENDERSTATETYPE State, unsigned long *value);
-		long __stdcall CreateStateBlock(D3DSTATEBLOCKTYPE type, IDirect3DStateBlock9 **stateBlock);
-		long __stdcall BeginStateBlock();
-		long __stdcall EndStateBlock(IDirect3DStateBlock9 **stateBlock);
-		long __stdcall SetClipStatus(const D3DCLIPSTATUS9 *clipStatus);
-		long __stdcall GetClipStatus(D3DCLIPSTATUS9 *clipStatus);
-		long __stdcall GetTexture(unsigned long sampler, IDirect3DBaseTexture9 **texture);
-		long __stdcall SetTexture(unsigned long sampler, IDirect3DBaseTexture9 *texture);
-		long __stdcall GetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long *value);
-		long __stdcall SetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long value);
-		long __stdcall GetSamplerState(unsigned long sampler, D3DSAMPLERSTATETYPE state, unsigned long *value);
-		long __stdcall SetSamplerState(unsigned long sampler, D3DSAMPLERSTATETYPE state, unsigned long value);
-		long __stdcall ValidateDevice(unsigned long *numPasses);
-		long __stdcall SetPaletteEntries(unsigned int paletteNumber, const PALETTEENTRY *entries);
-		long __stdcall GetPaletteEntries(unsigned int paletteNumber, PALETTEENTRY *entries);
-		long __stdcall SetCurrentTexturePalette(unsigned int paletteNumber);
-		long __stdcall GetCurrentTexturePalette(unsigned int *paletteNumber);
-		long __stdcall SetScissorRect(const RECT *rect);
-		long __stdcall GetScissorRect(RECT *rect);
-		long __stdcall SetSoftwareVertexProcessing(int software);
-		int __stdcall GetSoftwareVertexProcessing();
-		long __stdcall SetNPatchMode(float segments);
-		float __stdcall GetNPatchMode();
-		long __stdcall DrawPrimitive(D3DPRIMITIVETYPE primitiveType, unsigned int startVertex, unsigned int primiveCount);
-		long __stdcall DrawIndexedPrimitive(D3DPRIMITIVETYPE type, int baseVertexIndex, unsigned int minIndex, unsigned int numVertices, unsigned int startIndex, unsigned int primitiveCount);
-		long __stdcall DrawPrimitiveUP(D3DPRIMITIVETYPE primitiveType, unsigned int primitiveCount, const void *vertexStreamZeroData, unsigned int vertexStreamZeroStride);
-		long __stdcall DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE type, unsigned int minVertexIndex, unsigned int numVertexIndices, unsigned int PrimitiveCount, const void *indexData, D3DFORMAT indexDataFormat, const void *vertexStreamZeroData, unsigned int VertexStreamZeroStride);
-		long __stdcall ProcessVertices(unsigned int srcStartIndex, unsigned int destIndex, unsigned int vertexCount, IDirect3DVertexBuffer9 *destBuffer, IDirect3DVertexDeclaration9 *vertexDeclaration, unsigned long flags);
-		long __stdcall CreateVertexDeclaration(const D3DVERTEXELEMENT9 *vertexElements, IDirect3DVertexDeclaration9 **declaration);
-		long __stdcall SetVertexDeclaration(IDirect3DVertexDeclaration9 *declaration);
-		long __stdcall GetVertexDeclaration(IDirect3DVertexDeclaration9 **declaration);
-		long __stdcall SetFVF(unsigned long FVF);
-		long __stdcall GetFVF(unsigned long *FVF);
-		long __stdcall CreateVertexShader(const unsigned long *function, IDirect3DVertexShader9 **shader);
-		long __stdcall SetVertexShader(IDirect3DVertexShader9 *shader);
-		long __stdcall GetVertexShader(IDirect3DVertexShader9 **shader);
-		long __stdcall SetVertexShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count);
-		long __stdcall GetVertexShaderConstantF(unsigned int startRegister, float *constantData, unsigned int count);
-		long __stdcall SetVertexShaderConstantI(unsigned int startRegister, const int *constantData, unsigned int count);
-		long __stdcall GetVertexShaderConstantI(unsigned int startRegister, int *constantData, unsigned int count);
-		long __stdcall SetVertexShaderConstantB(unsigned int startRegister, const int *constantData, unsigned int count);
-		long __stdcall GetVertexShaderConstantB(unsigned int startRegister, int *constantData, unsigned int count);
-		long __stdcall SetStreamSource(unsigned int stream, IDirect3DVertexBuffer9 *data, unsigned int offset, unsigned int stride);
-		long __stdcall GetStreamSource(unsigned int streamNumber, IDirect3DVertexBuffer9 **streamData, unsigned int *offset, unsigned int *stride);
-		long __stdcall SetStreamSourceFreq(unsigned int streamNumber, unsigned int divider);
-		long __stdcall GetStreamSourceFreq(unsigned int streamNumber, unsigned int *divider);
-		long __stdcall SetIndices(IDirect3DIndexBuffer9 *indexData);
-		long __stdcall GetIndices(IDirect3DIndexBuffer9 **indexData);
-		long __stdcall CreatePixelShader(const unsigned long *function, IDirect3DPixelShader9 **shader);
-		long __stdcall SetPixelShader(IDirect3DPixelShader9 *shader);
-		long __stdcall GetPixelShader(IDirect3DPixelShader9 **shader);
-		long __stdcall SetPixelShaderConstantI(unsigned int startRegister, const int *constantData, unsigned int count);
-		long __stdcall GetPixelShaderConstantI(unsigned int startRegister, int *constantData, unsigned int count);
-		long __stdcall SetPixelShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count);
-		long __stdcall GetPixelShaderConstantF(unsigned int startRegister, float *constantData, unsigned int count);
-		long __stdcall SetPixelShaderConstantB(unsigned int startRegister, const int *constantData, unsigned int count);
-		long __stdcall GetPixelShaderConstantB(unsigned int startRegister, int *constantData, unsigned int count);
-		long __stdcall DrawRectPatch(unsigned int handle, const float *numSegs, const D3DRECTPATCH_INFO *rectPatchInfo);
-		long __stdcall DrawTriPatch(unsigned int handle, const float *numSegs, const D3DTRIPATCH_INFO *triPatchInfo);
-		long __stdcall DeletePatch(unsigned int handle);
-		long __stdcall CreateQuery(D3DQUERYTYPE type, IDirect3DQuery9 **query);
-		
+		long __stdcall TestCooperativeLevel() override;
+		unsigned int __stdcall GetAvailableTextureMem() override;
+		long __stdcall EvictManagedResources() override;
+		long __stdcall GetDirect3D(IDirect3D9 **D3D) override;
+		long __stdcall GetDeviceCaps(D3DCAPS9 *caps) override;
+		long __stdcall GetDisplayMode(unsigned int swapChain ,D3DDISPLAYMODE *mode) override;
+		long __stdcall GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *parameters) override;
+		long __stdcall SetCursorProperties(unsigned int x, unsigned int y, IDirect3DSurface9 *cursorBitmap) override;
+		void __stdcall SetCursorPosition(int x, int y, unsigned long flags) override;
+		int __stdcall ShowCursor(int show) override;
+		long __stdcall CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS *presentParameters, IDirect3DSwapChain9 **swapChain) override;
+		long __stdcall GetSwapChain(unsigned int index, IDirect3DSwapChain9 **swapChain) override;
+		unsigned int __stdcall GetNumberOfSwapChains() override;
+		long __stdcall Reset(D3DPRESENT_PARAMETERS *presentParameters) override;
+		long __stdcall Present(const RECT *sourceRect, const RECT *destRect, HWND destWindowOverride, const RGNDATA *dirtyRegion) override;
+		long __stdcall GetBackBuffer(unsigned int swapChain, unsigned int index, D3DBACKBUFFER_TYPE type, IDirect3DSurface9 **backBuffer) override;
+		long __stdcall GetRasterStatus(unsigned int swapChain, D3DRASTER_STATUS *rasterStatus) override;
+		long __stdcall SetDialogBoxMode(int enableDialogs) override;
+		void __stdcall SetGammaRamp(unsigned int swapChain, unsigned long flags, const D3DGAMMARAMP *ramp) override;
+		void __stdcall GetGammaRamp(unsigned int swapChain, D3DGAMMARAMP *ramp) override;
+		long __stdcall CreateTexture(unsigned int width, unsigned int height, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DTexture9 **texture, void **sharedHandle) override;
+		long __stdcall CreateVolumeTexture(unsigned int width, unsigned int height, unsigned int depth, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DVolumeTexture9 **volumeTexture, void **sharedHandle) override;
+		long __stdcall CreateCubeTexture(unsigned int edgeLength, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DCubeTexture9 **cubeTexture, void **sharedHandle) override;
+		long __stdcall CreateVertexBuffer(unsigned int length, unsigned long usage, unsigned long FVF, D3DPOOL, IDirect3DVertexBuffer9 **vertexBuffer, void **sharedHandle) override;
+		long __stdcall CreateIndexBuffer(unsigned int length, unsigned long usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer9 **indexBuffer, void **sharedHandle) override;
+		long __stdcall CreateRenderTarget(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, unsigned long multiSampleQuality, int lockable, IDirect3DSurface9 **surface, void **sharedHandle) override;
+		long __stdcall CreateDepthStencilSurface(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSample, unsigned long multiSampleQuality, int discard, IDirect3DSurface9 **surface, void **sharedHandle) override;
+		long __stdcall UpdateSurface(IDirect3DSurface9 *sourceSurface, const RECT *sourceRect, IDirect3DSurface9 *destinationSurface, const POINT *destPoint) override;
+		long __stdcall UpdateTexture(IDirect3DBaseTexture9 *sourceTexture, IDirect3DBaseTexture9 *destinationTexture) override;
+		long __stdcall GetRenderTargetData(IDirect3DSurface9 *renderTarget, IDirect3DSurface9 *destSurface) override;
+		long __stdcall GetFrontBufferData(unsigned int swapChain, IDirect3DSurface9 *destSurface) override;
+		long __stdcall StretchRect(IDirect3DSurface9 *sourceSurface, const RECT *sourceRect, IDirect3DSurface9 *destSurface, const RECT *destRect, D3DTEXTUREFILTERTYPE filter) override;
+		long __stdcall ColorFill(IDirect3DSurface9 *surface, const RECT *rect, D3DCOLOR color) override;
+		long __stdcall CreateOffscreenPlainSurface(unsigned int width, unsigned int height, D3DFORMAT format, D3DPOOL pool, IDirect3DSurface9 **surface, void **sharedHandle) override;
+		long __stdcall SetRenderTarget(unsigned long index, IDirect3DSurface9 *renderTarget) override;
+		long __stdcall GetRenderTarget(unsigned long index, IDirect3DSurface9 **renderTarget) override;
+		long __stdcall SetDepthStencilSurface(IDirect3DSurface9 *newDepthStencil) override;
+		long __stdcall GetDepthStencilSurface(IDirect3DSurface9 **depthStencilSurface) override;
+		long __stdcall BeginScene() override;
+		long __stdcall EndScene() override;
+		long __stdcall Clear(unsigned long Count, const D3DRECT *rects, unsigned long Flags, unsigned long Color, float Z, unsigned long Stencil) override;
+		long __stdcall SetTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix) override;
+		long __stdcall GetTransform(D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) override;
+		long __stdcall MultiplyTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix) override;
+		long __stdcall SetViewport(const D3DVIEWPORT9 *viewport) override;
+		long __stdcall GetViewport(D3DVIEWPORT9 *viewport) override;
+		long __stdcall SetMaterial(const D3DMATERIAL9 *material) override;
+		long __stdcall GetMaterial(D3DMATERIAL9 *material) override;
+		long __stdcall SetLight(unsigned long index, const D3DLIGHT9 *light) override;
+		long __stdcall GetLight(unsigned long index, D3DLIGHT9 *light) override;
+		long __stdcall LightEnable(unsigned long index, int enable) override;
+		long __stdcall GetLightEnable(unsigned long index , int *enable) override;
+		long __stdcall SetClipPlane(unsigned long index, const float *plane) override;
+		long __stdcall GetClipPlane(unsigned long index, float *plane) override;
+		long __stdcall SetRenderState(D3DRENDERSTATETYPE state, unsigned long value) override;
+		long __stdcall GetRenderState(D3DRENDERSTATETYPE State, unsigned long *value) override;
+		long __stdcall CreateStateBlock(D3DSTATEBLOCKTYPE type, IDirect3DStateBlock9 **stateBlock) override;
+		long __stdcall BeginStateBlock() override;
+		long __stdcall EndStateBlock(IDirect3DStateBlock9 **stateBlock) override;
+		long __stdcall SetClipStatus(const D3DCLIPSTATUS9 *clipStatus) override;
+		long __stdcall GetClipStatus(D3DCLIPSTATUS9 *clipStatus) override;
+		long __stdcall GetTexture(unsigned long sampler, IDirect3DBaseTexture9 **texture) override;
+		long __stdcall SetTexture(unsigned long sampler, IDirect3DBaseTexture9 *texture) override;
+		long __stdcall GetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long *value) override;
+		long __stdcall SetTextureStageState(unsigned long stage, D3DTEXTURESTAGESTATETYPE type, unsigned long value) override;
+		long __stdcall GetSamplerState(unsigned long sampler, D3DSAMPLERSTATETYPE state, unsigned long *value) override;
+		long __stdcall SetSamplerState(unsigned long sampler, D3DSAMPLERSTATETYPE state, unsigned long value) override;
+		long __stdcall ValidateDevice(unsigned long *numPasses) override;
+		long __stdcall SetPaletteEntries(unsigned int paletteNumber, const PALETTEENTRY *entries) override;
+		long __stdcall GetPaletteEntries(unsigned int paletteNumber, PALETTEENTRY *entries) override;
+		long __stdcall SetCurrentTexturePalette(unsigned int paletteNumber) override;
+		long __stdcall GetCurrentTexturePalette(unsigned int *paletteNumber) override;
+		long __stdcall SetScissorRect(const RECT *rect) override;
+		long __stdcall GetScissorRect(RECT *rect) override;
+		long __stdcall SetSoftwareVertexProcessing(int software) override;
+		int __stdcall GetSoftwareVertexProcessing() override;
+		long __stdcall SetNPatchMode(float segments) override;
+		float __stdcall GetNPatchMode() override;
+		long __stdcall DrawPrimitive(D3DPRIMITIVETYPE primitiveType, unsigned int startVertex, unsigned int primiveCount) override;
+		long __stdcall DrawIndexedPrimitive(D3DPRIMITIVETYPE type, int baseVertexIndex, unsigned int minIndex, unsigned int numVertices, unsigned int startIndex, unsigned int primitiveCount) override;
+		long __stdcall DrawPrimitiveUP(D3DPRIMITIVETYPE primitiveType, unsigned int primitiveCount, const void *vertexStreamZeroData, unsigned int vertexStreamZeroStride) override;
+		long __stdcall DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE type, unsigned int minVertexIndex, unsigned int numVertexIndices, unsigned int PrimitiveCount, const void *indexData, D3DFORMAT indexDataFormat, const void *vertexStreamZeroData, unsigned int VertexStreamZeroStride) override;
+		long __stdcall ProcessVertices(unsigned int srcStartIndex, unsigned int destIndex, unsigned int vertexCount, IDirect3DVertexBuffer9 *destBuffer, IDirect3DVertexDeclaration9 *vertexDeclaration, unsigned long flags) override;
+		long __stdcall CreateVertexDeclaration(const D3DVERTEXELEMENT9 *vertexElements, IDirect3DVertexDeclaration9 **declaration) override;
+		long __stdcall SetVertexDeclaration(IDirect3DVertexDeclaration9 *declaration) override;
+		long __stdcall GetVertexDeclaration(IDirect3DVertexDeclaration9 **declaration) override;
+		long __stdcall SetFVF(unsigned long FVF) override;
+		long __stdcall GetFVF(unsigned long *FVF) override;
+		long __stdcall CreateVertexShader(const unsigned long *function, IDirect3DVertexShader9 **shader) override;
+		long __stdcall SetVertexShader(IDirect3DVertexShader9 *shader) override;
+		long __stdcall GetVertexShader(IDirect3DVertexShader9 **shader) override;
+		long __stdcall SetVertexShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count) override;
+		long __stdcall GetVertexShaderConstantF(unsigned int startRegister, float *constantData, unsigned int count) override;
+		long __stdcall SetVertexShaderConstantI(unsigned int startRegister, const int *constantData, unsigned int count) override;
+		long __stdcall GetVertexShaderConstantI(unsigned int startRegister, int *constantData, unsigned int count) override;
+		long __stdcall SetVertexShaderConstantB(unsigned int startRegister, const int *constantData, unsigned int count) override;
+		long __stdcall GetVertexShaderConstantB(unsigned int startRegister, int *constantData, unsigned int count) override;
+		long __stdcall SetStreamSource(unsigned int stream, IDirect3DVertexBuffer9 *data, unsigned int offset, unsigned int stride) override;
+		long __stdcall GetStreamSource(unsigned int streamNumber, IDirect3DVertexBuffer9 **streamData, unsigned int *offset, unsigned int *stride) override;
+		long __stdcall SetStreamSourceFreq(unsigned int streamNumber, unsigned int divider) override;
+		long __stdcall GetStreamSourceFreq(unsigned int streamNumber, unsigned int *divider) override;
+		long __stdcall SetIndices(IDirect3DIndexBuffer9 *indexData) override;
+		long __stdcall GetIndices(IDirect3DIndexBuffer9 **indexData) override;
+		long __stdcall CreatePixelShader(const unsigned long *function, IDirect3DPixelShader9 **shader) override;
+		long __stdcall SetPixelShader(IDirect3DPixelShader9 *shader) override;
+		long __stdcall GetPixelShader(IDirect3DPixelShader9 **shader) override;
+		long __stdcall SetPixelShaderConstantI(unsigned int startRegister, const int *constantData, unsigned int count) override;
+		long __stdcall GetPixelShaderConstantI(unsigned int startRegister, int *constantData, unsigned int count) override;
+		long __stdcall SetPixelShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count) override;
+		long __stdcall GetPixelShaderConstantF(unsigned int startRegister, float *constantData, unsigned int count) override;
+		long __stdcall SetPixelShaderConstantB(unsigned int startRegister, const int *constantData, unsigned int count) override;
+		long __stdcall GetPixelShaderConstantB(unsigned int startRegister, int *constantData, unsigned int count) override;
+		long __stdcall DrawRectPatch(unsigned int handle, const float *numSegs, const D3DRECTPATCH_INFO *rectPatchInfo) override;
+		long __stdcall DrawTriPatch(unsigned int handle, const float *numSegs, const D3DTRIPATCH_INFO *triPatchInfo) override;
+		long __stdcall DeletePatch(unsigned int handle) override;
+		long __stdcall CreateQuery(D3DQUERYTYPE type, IDirect3DQuery9 **query) override;
+
 		// IDirect3DDevice9Ex methods
-		long __stdcall SetConvolutionMonoKernel(UINT,UINT,float *,float *);
-		long __stdcall ComposeRects(IDirect3DSurface9 *,IDirect3DSurface9 *,IDirect3DVertexBuffer9 *,UINT,IDirect3DVertexBuffer9 *,D3DCOMPOSERECTSOP,int,int);
-		long __stdcall PresentEx(const RECT *,const RECT *,HWND,const RGNDATA *,DWORD);
-		long __stdcall GetGPUThreadPriority(int *priority);
-		long __stdcall SetGPUThreadPriority(int priority);
-		long __stdcall WaitForVBlank(unsigned int swapChain);
-		long __stdcall CheckResourceResidency(IDirect3DResource9 **resourceArray, unsigned int numResources);
-		long __stdcall SetMaximumFrameLatency(unsigned int maxLatency);
-		long __stdcall GetMaximumFrameLatency(unsigned int *maxLatency);
-		long __stdcall CheckDeviceState(HWND destinationWindow);
-		long __stdcall CreateRenderTargetEx(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSampleType, unsigned long multiSampleQuality, int lockable, IDirect3DSurface9 **surface, void **sharedHandle, unsigned long usage);
-		long __stdcall CreateOffscreenPlainSurfaceEx(unsigned int width, unsigned int height, D3DFORMAT format, D3DPOOL pool, IDirect3DSurface9 **surface, void **sharedHandle, unsigned long usage);
-		long __stdcall CreateDepthStencilSurfaceEx(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSampleType, unsigned long multiSampleQuality, int discard, IDirect3DSurface9 **surface, void **sharedHandle, unsigned long usage);
-		long __stdcall ResetEx(D3DPRESENT_PARAMETERS *presentParameters, D3DDISPLAYMODEEX *fullscreenDisplayMode);
-		long __stdcall GetDisplayModeEx(unsigned int swapChain, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation);
+		long __stdcall SetConvolutionMonoKernel(UINT,UINT,float *,float *) override;
+		long __stdcall ComposeRects(IDirect3DSurface9 *,IDirect3DSurface9 *,IDirect3DVertexBuffer9 *,UINT,IDirect3DVertexBuffer9 *,D3DCOMPOSERECTSOP,int,int) override;
+		long __stdcall PresentEx(const RECT *,const RECT *,HWND,const RGNDATA *,DWORD) override;
+		long __stdcall GetGPUThreadPriority(int *priority) override;
+		long __stdcall SetGPUThreadPriority(int priority) override;
+		long __stdcall WaitForVBlank(unsigned int swapChain) override;
+		long __stdcall CheckResourceResidency(IDirect3DResource9 **resourceArray, unsigned int numResources) override;
+		long __stdcall SetMaximumFrameLatency(unsigned int maxLatency) override;
+		long __stdcall GetMaximumFrameLatency(unsigned int *maxLatency) override;
+		long __stdcall CheckDeviceState(HWND destinationWindow) override;
+		long __stdcall CreateRenderTargetEx(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSampleType, unsigned long multiSampleQuality, int lockable, IDirect3DSurface9 **surface, void **sharedHandle, unsigned long usage) override;
+		long __stdcall CreateOffscreenPlainSurfaceEx(unsigned int width, unsigned int height, D3DFORMAT format, D3DPOOL pool, IDirect3DSurface9 **surface, void **sharedHandle, unsigned long usage) override;
+		long __stdcall CreateDepthStencilSurfaceEx(unsigned int width, unsigned int height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multiSampleType, unsigned long multiSampleQuality, int discard, IDirect3DSurface9 **surface, void **sharedHandle, unsigned long usage) override;
+		long __stdcall ResetEx(D3DPRESENT_PARAMETERS *presentParameters, D3DDISPLAYMODEEX *fullscreenDisplayMode) override;
+		long __stdcall GetDisplayModeEx(unsigned int swapChain, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation) override;
 
 	private:
 		Direct3D9Ex *const d3d9ex;
diff --git a/src/D3D9/Direct3DIndexBuffer9.hpp b/src/D3D9/Direct3DIndexBuffer9.hpp
index 4f6e100..b59e4a9 100644
--- a/src/D3D9/Direct3DIndexBuffer9.hpp
+++ b/src/D3D9/Direct3DIndexBuffer9.hpp
@@ -31,28 +31,28 @@
 	public:
 		Direct3DIndexBuffer9(Direct3DDevice9 *device, unsigned int length, unsigned long usage, D3DFORMAT format, D3DPOOL pool);
 
-		virtual ~Direct3DIndexBuffer9();
+		~Direct3DIndexBuffer9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource9 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		void __stdcall PreLoad();
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		void __stdcall PreLoad() override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DIndexBuffer9 methods
-		long __stdcall GetDesc(D3DINDEXBUFFER_DESC *description);
-		long __stdcall Lock(unsigned int offset, unsigned int size, void **data, unsigned long flags);
-		long __stdcall Unlock();
-		
+		long __stdcall GetDesc(D3DINDEXBUFFER_DESC *description) override;
+		long __stdcall Lock(unsigned int offset, unsigned int size, void **data, unsigned long flags) override;
+		long __stdcall Unlock() override;
+
 		// Internal methods
 		sw::Resource *getResource() const;
 		bool is32Bit() const;
diff --git a/src/D3D9/Direct3DPixelShader9.hpp b/src/D3D9/Direct3DPixelShader9.hpp
index 03c6cd8..42ebf02 100644
--- a/src/D3D9/Direct3DPixelShader9.hpp
+++ b/src/D3D9/Direct3DPixelShader9.hpp
@@ -30,16 +30,16 @@
 	public:
 		Direct3DPixelShader9(Direct3DDevice9 *device, const unsigned long *shaderToken);
 
-		virtual ~Direct3DPixelShader9();
+		~Direct3DPixelShader9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DPixelShader9 methods
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		long __stdcall GetFunction(void *data, unsigned int *size);
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		long __stdcall GetFunction(void *data, unsigned int *size) override;
 
 		// Internal methods
 		const sw::PixelShader *getPixelShader() const;
diff --git a/src/D3D9/Direct3DQuery9.hpp b/src/D3D9/Direct3DQuery9.hpp
index 775e40e..7c522f6 100644
--- a/src/D3D9/Direct3DQuery9.hpp
+++ b/src/D3D9/Direct3DQuery9.hpp
@@ -30,19 +30,19 @@
 	public:
 		Direct3DQuery9(Direct3DDevice9 *device, D3DQUERYTYPE type);
 
-		virtual ~Direct3DQuery9();
+		~Direct3DQuery9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DQuery9 methods
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		D3DQUERYTYPE __stdcall GetType();
-		unsigned long __stdcall GetDataSize();
-		long __stdcall Issue(unsigned long flags);
-		long __stdcall GetData(void *data, unsigned long size, unsigned long flags);
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		D3DQUERYTYPE __stdcall GetType() override;
+		unsigned long __stdcall GetDataSize() override;
+		long __stdcall Issue(unsigned long flags) override;
+		long __stdcall GetData(void *data, unsigned long size, unsigned long flags) override;
 
 	private:
 		// Creation parameters
diff --git a/src/D3D9/Direct3DResource9.hpp b/src/D3D9/Direct3DResource9.hpp
index 525f1a3..e34fa10 100644
--- a/src/D3D9/Direct3DResource9.hpp
+++ b/src/D3D9/Direct3DResource9.hpp
@@ -30,22 +30,22 @@
 	public:
 		Direct3DResource9(Direct3DDevice9 *device, D3DRESOURCETYPE type, D3DPOOL pool, unsigned int size);
 
-		virtual ~Direct3DResource9();
+		~Direct3DResource9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource9 methods
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		long __stdcall FreePrivateData(const GUID &guid);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		void __stdcall PreLoad();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		void __stdcall PreLoad() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// Internal methods
 		static unsigned int getMemoryUsage();
diff --git a/src/D3D9/Direct3DStateBlock9.hpp b/src/D3D9/Direct3DStateBlock9.hpp
index ed709b0..9f5977d 100644
--- a/src/D3D9/Direct3DStateBlock9.hpp
+++ b/src/D3D9/Direct3DStateBlock9.hpp
@@ -37,17 +37,17 @@
 	public:
 		Direct3DStateBlock9(Direct3DDevice9 *device, D3DSTATEBLOCKTYPE type);
 
-		virtual ~Direct3DStateBlock9();
+		~Direct3DStateBlock9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DStateBlock9 methods
-		long __stdcall Apply();
-		long __stdcall Capture();
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
+		long __stdcall Apply() override;
+		long __stdcall Capture() override;
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
 
 		// Internal methods
 		void lightEnable(unsigned long index, int enable);
diff --git a/src/D3D9/Direct3DSurface9.cpp b/src/D3D9/Direct3DSurface9.cpp
index ef4d717..fdbc099 100644
--- a/src/D3D9/Direct3DSurface9.cpp
+++ b/src/D3D9/Direct3DSurface9.cpp
@@ -85,6 +85,16 @@
 	{
 	}
 
+	void *Direct3DSurface9::lockInternal(int x, int y, int z, sw::Lock lock, sw::Accessor client)
+	{
+		return Surface::lockInternal(x, y, z, lock, client);
+	}
+
+	void Direct3DSurface9::unlockInternal()
+	{
+		Surface::unlockInternal();
+	}
+
 	long Direct3DSurface9::QueryInterface(const IID &iid, void **object)
 	{
 		CriticalSection cs(device);
diff --git a/src/D3D9/Direct3DSurface9.hpp b/src/D3D9/Direct3DSurface9.hpp
index f1f40d1..b7060d8 100644
--- a/src/D3D9/Direct3DSurface9.hpp
+++ b/src/D3D9/Direct3DSurface9.hpp
@@ -30,30 +30,34 @@
 	public:
 		Direct3DSurface9(Direct3DDevice9 *device, Unknown *container, int width, int height, D3DFORMAT format, D3DPOOL pool, D3DMULTISAMPLE_TYPE multiSample, unsigned int quality, bool lockableOverride, unsigned long usage);
 
-		virtual ~Direct3DSurface9();
+		~Direct3DSurface9() override;
+
+		// Surface methods
+		void *lockInternal(int x, int y, int z, sw::Lock lock, sw::Accessor client) override;
+		void unlockInternal() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource9 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		void __stdcall PreLoad();
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		void __stdcall PreLoad() override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DSurface9 methods
-		long __stdcall GetDC(HDC *deviceContext);
-		long __stdcall ReleaseDC(HDC deviceContext);
-		long __stdcall LockRect(D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long Flags);
-		long __stdcall UnlockRect();
-		long __stdcall GetContainer(const IID &iid, void **container);
-		long __stdcall GetDesc(D3DSURFACE_DESC *desc);
+		long __stdcall GetDC(HDC *deviceContext) override;
+		long __stdcall ReleaseDC(HDC deviceContext) override;
+		long __stdcall LockRect(D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long Flags) override;
+		long __stdcall UnlockRect() override;
+		long __stdcall GetContainer(const IID &iid, void **container) override;
+		long __stdcall GetDesc(D3DSURFACE_DESC *desc) override;
 
 		// Internal methods
 		static sw::Format translateFormat(D3DFORMAT format);
diff --git a/src/D3D9/Direct3DSwapChain9.hpp b/src/D3D9/Direct3DSwapChain9.hpp
index bdf6407..dd26b3e 100644
--- a/src/D3D9/Direct3DSwapChain9.hpp
+++ b/src/D3D9/Direct3DSwapChain9.hpp
@@ -32,21 +32,21 @@
 	public:
 		Direct3DSwapChain9(Direct3DDevice9 *device, D3DPRESENT_PARAMETERS *presentParameters);
 
-		virtual ~Direct3DSwapChain9();
+		~Direct3DSwapChain9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DSwapChain9 methods
-		long __stdcall Present(const RECT *sourceRect, const RECT *destRect, HWND destWindowOverride, const RGNDATA *dirtyRegion, unsigned long flags);
-		long __stdcall GetFrontBufferData(IDirect3DSurface9 *destSurface);
-		long __stdcall GetBackBuffer(unsigned int index, D3DBACKBUFFER_TYPE type, IDirect3DSurface9 **backBuffer);
-		long __stdcall GetRasterStatus(D3DRASTER_STATUS *rasterStatus);
-		long __stdcall GetDisplayMode(D3DDISPLAYMODE *displayMode);
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		long __stdcall GetPresentParameters(D3DPRESENT_PARAMETERS *presentParameters);
+		long __stdcall Present(const RECT *sourceRect, const RECT *destRect, HWND destWindowOverride, const RGNDATA *dirtyRegion, unsigned long flags) override;
+		long __stdcall GetFrontBufferData(IDirect3DSurface9 *destSurface) override;
+		long __stdcall GetBackBuffer(unsigned int index, D3DBACKBUFFER_TYPE type, IDirect3DSurface9 **backBuffer) override;
+		long __stdcall GetRasterStatus(D3DRASTER_STATUS *rasterStatus) override;
+		long __stdcall GetDisplayMode(D3DDISPLAYMODE *displayMode) override;
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		long __stdcall GetPresentParameters(D3DPRESENT_PARAMETERS *presentParameters) override;
 
 		// Internal methods
 		void reset(D3DPRESENT_PARAMETERS *presentParameters);
diff --git a/src/D3D9/Direct3DTexture9.hpp b/src/D3D9/Direct3DTexture9.hpp
index 506741e..52bba53 100644
--- a/src/D3D9/Direct3DTexture9.hpp
+++ b/src/D3D9/Direct3DTexture9.hpp
@@ -27,40 +27,40 @@
 
 	class Direct3DTexture9 : public IDirect3DTexture9, public Direct3DBaseTexture9
 	{
-	public:	
+	public:
 		Direct3DTexture9(Direct3DDevice9 *device, unsigned int width, unsigned int height, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool);
 
-		virtual ~Direct3DTexture9();
+		~Direct3DTexture9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource9 methods
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		long __stdcall FreePrivateData(const GUID &guid);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		void __stdcall PreLoad();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		void __stdcall PreLoad() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DBaseTexture9 methods
-		unsigned long __stdcall SetLOD(unsigned long newLOD);
-		unsigned long __stdcall GetLOD();
-		unsigned long __stdcall GetLevelCount();
-		long __stdcall SetAutoGenFilterType(D3DTEXTUREFILTERTYPE filterType);
-		D3DTEXTUREFILTERTYPE __stdcall GetAutoGenFilterType();
-		void __stdcall GenerateMipSubLevels();
+		unsigned long __stdcall SetLOD(unsigned long newLOD) override;
+		unsigned long __stdcall GetLOD() override;
+		unsigned long __stdcall GetLevelCount() override;
+		long __stdcall SetAutoGenFilterType(D3DTEXTUREFILTERTYPE filterType) override;
+		D3DTEXTUREFILTERTYPE __stdcall GetAutoGenFilterType() override;
+		void __stdcall GenerateMipSubLevels() override;
 
 		// IDirect3DTexture9 methods
-		long __stdcall GetLevelDesc(unsigned int level, D3DSURFACE_DESC *description);
-		long __stdcall GetSurfaceLevel(unsigned int level, IDirect3DSurface9 **surface);
-		long __stdcall LockRect(unsigned int level, D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long flags);
-		long __stdcall UnlockRect(unsigned int level);
-		long __stdcall AddDirtyRect(const RECT *dirtyRect);
+		long __stdcall GetLevelDesc(unsigned int level, D3DSURFACE_DESC *description) override;
+		long __stdcall GetSurfaceLevel(unsigned int level, IDirect3DSurface9 **surface) override;
+		long __stdcall LockRect(unsigned int level, D3DLOCKED_RECT *lockedRect, const RECT *rect, unsigned long flags) override;
+		long __stdcall UnlockRect(unsigned int level) override;
+		long __stdcall AddDirtyRect(const RECT *dirtyRect) override;
 
 		// Internal methods
 		Direct3DSurface9 *getInternalSurfaceLevel(unsigned int level);
diff --git a/src/D3D9/Direct3DVertexBuffer9.hpp b/src/D3D9/Direct3DVertexBuffer9.hpp
index d35c31e..7a0431f 100644
--- a/src/D3D9/Direct3DVertexBuffer9.hpp
+++ b/src/D3D9/Direct3DVertexBuffer9.hpp
@@ -31,27 +31,27 @@
 	public:
 		Direct3DVertexBuffer9(Direct3DDevice9 *device, unsigned int length, unsigned long usage, long FVF, D3DPOOL pool);
 
-		virtual ~Direct3DVertexBuffer9();
+		~Direct3DVertexBuffer9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource9 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		void __stdcall PreLoad();
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		void __stdcall PreLoad() override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DVertexBuffer9 methods
-		long __stdcall Lock(unsigned int offset, unsigned int size, void **data, unsigned long flags);
-		long __stdcall Unlock();
-		long __stdcall GetDesc(D3DVERTEXBUFFER_DESC *description);
+		long __stdcall Lock(unsigned int offset, unsigned int size, void **data, unsigned long flags) override;
+		long __stdcall Unlock() override;
+		long __stdcall GetDesc(D3DVERTEXBUFFER_DESC *description) override;
 
 		// Internal methods
 		int getLength() const;
diff --git a/src/D3D9/Direct3DVertexDeclaration9.hpp b/src/D3D9/Direct3DVertexDeclaration9.hpp
index ab0621f..3aafd45 100644
--- a/src/D3D9/Direct3DVertexDeclaration9.hpp
+++ b/src/D3D9/Direct3DVertexDeclaration9.hpp
@@ -29,16 +29,16 @@
 		Direct3DVertexDeclaration9(Direct3DDevice9 *device, const D3DVERTEXELEMENT9 *vertexElements);
 		Direct3DVertexDeclaration9(Direct3DDevice9 *device, unsigned long FVF);
 
-		virtual ~Direct3DVertexDeclaration9();
+		~Direct3DVertexDeclaration9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DVertexDeclaration9 methods
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		long __stdcall GetDeclaration(D3DVERTEXELEMENT9 *declaration, unsigned int *numElements);
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		long __stdcall GetDeclaration(D3DVERTEXELEMENT9 *declaration, unsigned int *numElements) override;
 
 		// Internal methods
 		unsigned long getFVF() const;
@@ -50,7 +50,7 @@
 		// Creation parameters
 		Direct3DDevice9 *const device;
 		D3DVERTEXELEMENT9 *vertexElement;
-		
+
 		int numElements;
 		unsigned long FVF;
 		bool preTransformed;
diff --git a/src/D3D9/Direct3DVertexShader9.hpp b/src/D3D9/Direct3DVertexShader9.hpp
index fcd8eed..edc5fbd 100644
--- a/src/D3D9/Direct3DVertexShader9.hpp
+++ b/src/D3D9/Direct3DVertexShader9.hpp
@@ -30,16 +30,16 @@
 	public:
 		Direct3DVertexShader9(Direct3DDevice9 *device, const unsigned long *shaderToken);
 
-		virtual ~Direct3DVertexShader9();
+		~Direct3DVertexShader9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DVertexShader9 methods
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		long __stdcall GetFunction(void *data, unsigned int *size);
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		long __stdcall GetFunction(void *data, unsigned int *size) override;
 
 		// Internal methods
 		const sw::VertexShader *getVertexShader() const;
diff --git a/src/D3D9/Direct3DVolume9.cpp b/src/D3D9/Direct3DVolume9.cpp
index fc67ecd..4bf498b 100644
--- a/src/D3D9/Direct3DVolume9.cpp
+++ b/src/D3D9/Direct3DVolume9.cpp
@@ -41,6 +41,16 @@
 		resource->unbind();
 	}
 
+	void *Direct3DVolume9::lockInternal(int x, int y, int z, sw::Lock lock, sw::Accessor client)
+	{
+		return Surface::lockInternal(x, y, z, lock, client);
+	}
+
+	void Direct3DVolume9::unlockInternal()
+	{
+		Surface::unlockInternal();
+	}
+
 	long __stdcall Direct3DVolume9::QueryInterface(const IID &iid, void **object)
 	{
 		CriticalSection cs(device);
diff --git a/src/D3D9/Direct3DVolume9.hpp b/src/D3D9/Direct3DVolume9.hpp
index eb6e166..0b3fedd 100644
--- a/src/D3D9/Direct3DVolume9.hpp
+++ b/src/D3D9/Direct3DVolume9.hpp
@@ -32,22 +32,26 @@
 	public:
 		Direct3DVolume9(Direct3DDevice9 *device, Direct3DVolumeTexture9 *container, int width, int height, int depth, D3DFORMAT format, D3DPOOL pool, unsigned long usage);
 
-		virtual ~Direct3DVolume9();
+		~Direct3DVolume9() override;
+
+		// Surface methods
+		void *lockInternal(int x, int y, int z, sw::Lock lock, sw::Accessor client) override;
+		void unlockInternal() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DVolume9 methods
-		long __stdcall FreePrivateData(const GUID &guid);
-		long __stdcall GetContainer(const IID &iid, void **container);
-		long __stdcall GetDesc(D3DVOLUME_DESC *description);
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		long __stdcall LockBox(D3DLOCKED_BOX *lockedVolume, const D3DBOX *box, unsigned long flags);
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall UnlockBox();
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		long __stdcall GetContainer(const IID &iid, void **container) override;
+		long __stdcall GetDesc(D3DVOLUME_DESC *description) override;
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		long __stdcall LockBox(D3DLOCKED_BOX *lockedVolume, const D3DBOX *box, unsigned long flags) override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall UnlockBox() override;
 
 	private:
 		static sw::Format translateFormat(D3DFORMAT format);
diff --git a/src/D3D9/Direct3DVolumeTexture9.hpp b/src/D3D9/Direct3DVolumeTexture9.hpp
index d90b637..674e06f 100644
--- a/src/D3D9/Direct3DVolumeTexture9.hpp
+++ b/src/D3D9/Direct3DVolumeTexture9.hpp
@@ -30,37 +30,37 @@
 	public:
 		Direct3DVolumeTexture9(Direct3DDevice9 *device, unsigned int width, unsigned int height, unsigned int depth, unsigned int levels, unsigned long usage, D3DFORMAT format, D3DPOOL pool);
 
-		virtual ~Direct3DVolumeTexture9();
+		~Direct3DVolumeTexture9() override;
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// IDirect3DResource9 methods
-		long __stdcall GetDevice(IDirect3DDevice9 **device);
-		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags);
-		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size);
-		long __stdcall FreePrivateData(const GUID &guid);
-		unsigned long __stdcall SetPriority(unsigned long newPriority);
-		unsigned long __stdcall GetPriority();
-		void __stdcall PreLoad();
-		D3DRESOURCETYPE __stdcall GetType();
+		long __stdcall GetDevice(IDirect3DDevice9 **device) override;
+		long __stdcall SetPrivateData(const GUID &guid, const void *data, unsigned long size, unsigned long flags) override;
+		long __stdcall GetPrivateData(const GUID &guid, void *data, unsigned long *size) override;
+		long __stdcall FreePrivateData(const GUID &guid) override;
+		unsigned long __stdcall SetPriority(unsigned long newPriority) override;
+		unsigned long __stdcall GetPriority() override;
+		void __stdcall PreLoad() override;
+		D3DRESOURCETYPE __stdcall GetType() override;
 
 		// IDirect3DBaseTexture9 methods
-		unsigned long __stdcall SetLOD(unsigned long newLOD);
-		unsigned long __stdcall GetLOD();
-		unsigned long __stdcall GetLevelCount();
-		long __stdcall SetAutoGenFilterType(D3DTEXTUREFILTERTYPE filterType);
-		D3DTEXTUREFILTERTYPE __stdcall GetAutoGenFilterType();
-		void __stdcall GenerateMipSubLevels();
+		unsigned long __stdcall SetLOD(unsigned long newLOD) override;
+		unsigned long __stdcall GetLOD() override;
+		unsigned long __stdcall GetLevelCount() override;
+		long __stdcall SetAutoGenFilterType(D3DTEXTUREFILTERTYPE filterType) override;
+		D3DTEXTUREFILTERTYPE __stdcall GetAutoGenFilterType() override;
+		void __stdcall GenerateMipSubLevels() override;
 
 		// IDirect3DVolumeTexture9 methods
-		long __stdcall GetLevelDesc(unsigned int level, D3DVOLUME_DESC *description);
-		long __stdcall GetVolumeLevel(unsigned int level, IDirect3DVolume9 **volume);
-		long __stdcall LockBox(unsigned int level, D3DLOCKED_BOX *lockedVolume, const D3DBOX *box, unsigned long flags);
-		long __stdcall UnlockBox(unsigned int level);
-		long __stdcall AddDirtyBox(const D3DBOX *dirtyBox);
+		long __stdcall GetLevelDesc(unsigned int level, D3DVOLUME_DESC *description) override;
+		long __stdcall GetVolumeLevel(unsigned int level, IDirect3DVolume9 **volume) override;
+		long __stdcall LockBox(unsigned int level, D3DLOCKED_BOX *lockedVolume, const D3DBOX *box, unsigned long flags) override;
+		long __stdcall UnlockBox(unsigned int level) override;
+		long __stdcall AddDirtyBox(const D3DBOX *dirtyBox) override;
 
 		// Internal methods
 		Direct3DVolume9 *getInternalVolumeLevel(unsigned int level);
diff --git a/src/D3D9/Unknown.hpp b/src/D3D9/Unknown.hpp
index 3064999..076f881 100644
--- a/src/D3D9/Unknown.hpp
+++ b/src/D3D9/Unknown.hpp
@@ -27,9 +27,9 @@
 		virtual ~Unknown();
 
 		// IUnknown methods
-		long __stdcall QueryInterface(const IID &iid, void **object);
-		unsigned long __stdcall AddRef();
-		unsigned long __stdcall Release();
+		long __stdcall QueryInterface(const IID &iid, void **object) override;
+		unsigned long __stdcall AddRef() override;
+		unsigned long __stdcall Release() override;
 
 		// Internal methods
 		virtual void bind();
diff --git a/src/OpenGL/libGL/Image.cpp b/src/OpenGL/libGL/Image.cpp
index 6a8c01d..8126de2 100644
--- a/src/OpenGL/libGL/Image.cpp
+++ b/src/OpenGL/libGL/Image.cpp
@@ -71,6 +71,16 @@
 		unlockExternal();
 	}
 
+	void *Image::lockInternal(int x, int y, int z, sw::Lock lock, sw::Accessor client)
+	{
+		return Surface::lockInternal(x, y, z, lock, client);
+	}
+
+	void Image::unlockInternal()
+	{
+		Surface::unlockInternal();
+	}
+
 	int Image::getWidth()
 	{
 		return width;
diff --git a/src/OpenGL/libGL/Image.hpp b/src/OpenGL/libGL/Image.hpp
index 9192c8e..2b74cf3 100644
--- a/src/OpenGL/libGL/Image.hpp
+++ b/src/OpenGL/libGL/Image.hpp
@@ -39,6 +39,9 @@
 		unsigned int getPitch() const;
 		void unlock();
 
+		void *lockInternal(int x, int y, int z, sw::Lock lock, sw::Accessor client) override;
+		void unlockInternal() override;
+
 		int getWidth();
 		int getHeight();
 		GLenum getFormat();
@@ -53,7 +56,7 @@
 		static sw::Format selectInternalFormat(GLenum format, GLenum type);
 
 	private:
-		virtual ~Image();
+		~Image() override;
 
 		void loadAlphaImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, int inputPitch, const void *input, void *buffer) const;
 		void loadAlphaFloatImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, int inputPitch, const void *input, void *buffer) const;