Răsfoiți Sursa

Added missing overrides.

woollybah 5 ani în urmă
părinte
comite
ed7638bcce

+ 10 - 10
d3d9sdlgraphics.mod/d3d9sdlgraphics.bmx

@@ -246,18 +246,18 @@ Type TD3D9SDLGraphics Extends TGraphics
 		
 	End Method
 
-	Method Driver:TGraphicsDriver()
+	Method Driver:TGraphicsDriver() Override
 		Return _driver
 	End Method
 	
-	Method GetSettings:Int( width:Int Var,height:Int Var,depth:Int Var,hertz:Int Var,flags:Int Var,x:Int Var,y:Int Var )
+	Method GetSettings:Int( width:Int Var,height:Int Var,depth:Int Var,hertz:Int Var,flags:Int Var,x:Int Var,y:Int Var ) Override
 		'
 		ValidateSize
 		'
 		_g.GetSettings(width, height, depth, hertz, flags, x, y)
 	End Method
 
-	Method Close:Int()
+	Method Close:Int() Override
 		If Not _hwnd Return False
 		CloseD3DDevice
 		If Not _attached Then
@@ -282,11 +282,11 @@ Type TD3D9SDLGraphics Extends TGraphics
 		Next
 	End Method
 
-	Method Resize(width:Int, height:Int)
+	Method Resize(width:Int, height:Int) Override
 		_g.Resize(width, height)
 	End Method
 
-	Method Position(x:Int, y:Int)
+	Method Position(x:Int, y:Int) Override
 		_g.Position(x, y)
 	End Method
 	
@@ -355,15 +355,15 @@ Type TD3D9SDLGraphicsDriver Extends TGraphicsDriver
 		Return Self
 	End Method
 	
-	Method GraphicsModes:TGraphicsMode[]()
+	Method GraphicsModes:TGraphicsMode[]() Override
 		Return _modes
 	End Method
 	
-	Method AttachGraphics:TD3D9SDLGraphics( widget:Byte Ptr,flags:Int )
+	Method AttachGraphics:TD3D9SDLGraphics( widget:Byte Ptr,flags:Int ) Override
 		Return New TD3D9SDLGraphics.Attach( widget:Byte Ptr,flags:Int )
 	End Method
 	
-	Method CreateGraphics:TD3D9SDLGraphics( width:Int,height:Int,depth:Int,hertz:Int,flags:Int,x:Int,y:Int)
+	Method CreateGraphics:TD3D9SDLGraphics( width:Int,height:Int,depth:Int,hertz:Int,flags:Int,x:Int,y:Int) Override
 		Return New TD3D9SDLGraphics.Create( width,height,depth,hertz,flags,x,y )
 	End Method
 
@@ -371,11 +371,11 @@ Type TD3D9SDLGraphicsDriver Extends TGraphicsDriver
 		Return _graphics
 	End Method
 		
-	Method SetGraphics( g:TGraphics )
+	Method SetGraphics( g:TGraphics ) Override
 		_graphics=TD3D9SDLGraphics( g )
 	End Method
 	
-	Method Flip( sync:Int )
+	Method Flip( sync:Int ) Override
 		Local present:Int = _graphics.Flip(sync)
 		If UseDX9RenderLagFix Then
 			Local pixelsdrawn:Int

+ 24 - 24
d3d9sdlmax2d.mod/d3d9sdlmax2d.bmx

@@ -181,7 +181,7 @@ Type TD3D9ImageFrame Extends TImageFrame
 		Return Self
 	End Method
 	
-	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# )
+	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# ) Override
 		Local u0#=sx * _uscale
 		Local v0#=sy * _vscale
 		Local u1#=(sx+sw) * _uscale
@@ -238,7 +238,7 @@ End Type
 
 Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 
-	Method ToString$()
+	Method ToString$() Override
 		Return "DirectX9"
 	End Method
 
@@ -256,22 +256,22 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 	End Method
 
 	'***** TGraphicsDriver *****
-	Method GraphicsModes:TGraphicsMode[]()
+	Method GraphicsModes:TGraphicsMode[]() Override
 		Return D3D9SDLGraphicsDriver().GraphicsModes()
 	End Method
 	
-	Method AttachGraphics:TGraphics( widget:Byte Ptr,flags )
+	Method AttachGraphics:TGraphics( widget:Byte Ptr,flags ) Override
 		Local g:TD3D9SDLGraphics=D3D9SDLGraphicsDriver().AttachGraphics( widget,flags )
 		If g Return TMax2DGraphics.Create( g,Self )
 	End Method
 	
-	Method CreateGraphics:TGraphics( width,height,depth,hertz,flags,x,y )
+	Method CreateGraphics:TGraphics( width,height,depth,hertz,flags,x,y ) Override
 		Local g:TD3D9SDLGraphics=D3D9SDLGraphicsDriver().CreateGraphics( width,height,depth,hertz,flags,x,y )
 		If Not g Return Null
 		Return TMax2DGraphics.Create( g,Self )
 	End Method
 	
-	Method SetGraphics( g:TGraphics )
+	Method SetGraphics( g:TGraphics ) Override
 
 		If Not g
 			If _d3dDev
@@ -305,7 +305,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		
 	End Method
 	
-	Method Flip( sync )
+	Method Flip( sync ) Override
 		_d3dDev.EndScene
 		If D3D9SDLGraphicsDriver().Flip( sync )
 			_d3dDev.BeginScene
@@ -363,11 +363,11 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 	End Method
 
 	'***** TMax2DDriver *****
-	Method CreateFrameFromPixmap:TImageFrame( pixmap:TPixmap,flags )
+	Method CreateFrameFromPixmap:TImageFrame( pixmap:TPixmap,flags ) Override
 		Return New TD3D9ImageFrame.Create( pixmap,flags )
 	End Method
 	
-	Method SetBlend( blend )
+	Method SetBlend( blend ) Override
 		If blend=_active_blend Return
 		Select blend
 		Case SOLIDBLEND
@@ -395,7 +395,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_active_blend=blend
 	End Method
 	
-	Method SetAlpha( alpha# )
+	Method SetAlpha( alpha# ) Override
 		alpha=Max(Min(alpha,1),0)
 		_color=(Int(255*alpha) Shl 24)|(_color&$ffffff)
 		_iverts[3]=_color
@@ -404,7 +404,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_iverts[21]=_color
 	End Method
 	
-	Method SetColor( red,green,blue )
+	Method SetColor( red,green,blue ) Override
 		red=Max(Min(red,255),0)
 		green=Max(Min(green,255),0)
 		blue=Max(Min(blue,255),0)
@@ -415,14 +415,14 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_iverts[21]=_color
 	End Method
 	
-	Method SetClsColor( red,green,blue )
+	Method SetClsColor( red,green,blue ) Override
 		red=Max(Min(red,255),0)
 		green=Max(Min(green,255),0)
 		blue=Max(Min(blue,255),0)
 		_clscolor=$ff000000|(red Shl 16)|(green Shl 8)|blue
 	End Method
 	
-	Method SetViewport( x,y,width,height )
+	Method SetViewport( x,y,width,height ) Override
 		If x=0 And y=0 And width=_gw And height=_gh 'GraphicsWidth() And height=GraphicsHeight()
 			_d3dDev.SetRenderState D3DRS_SCISSORTESTENABLE,False
 		Else
@@ -432,29 +432,29 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		EndIf
 	End Method
 	
-	Method SetTransform( xx#,xy#,yx#,yy# )
+	Method SetTransform( xx#,xy#,yx#,yy# ) Override
 		_ix=xx
 		_iy=xy
 		_jx=yx
 		_jy=yy		
 	End Method
 	
-	Method SetLineWidth( width# )
+	Method SetLineWidth( width# ) Override
 		_lineWidth=width
 	End Method
 	
-	Method Cls()
+	Method Cls() Override
 		_d3dDev.Clear 0,Null,D3DCLEAR_TARGET,_clscolor,0,0
 	End Method
 	
-	Method Plot( x#,y# )
+	Method Plot( x#,y# ) Override
 		_fverts[0]=x+.5
 		_fverts[1]=y+.5
 		DisableTex
 		_d3dDev.DrawPrimitiveUP D3DPT_POINTLIST,1,_fverts,24
 	End Method
 	
-	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# )
+	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# ) Override
 		Local lx0# = x0*_ix + y0*_iy + tx
 		Local ly0# = x0*_jx + y0*_jy + ty
 		Local lx1# = x1*_ix + y1*_iy + tx
@@ -492,7 +492,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_d3dDev.DrawPrimitiveUP D3DPT_TRIANGLESTRIP,2,_fverts,24
 	End Method
 	
-	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# )
+	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# ) Override
 		_fverts[0]  = x0*_ix + y0*_iy + tx
 		_fverts[1]  = x0*_jx + y0*_jy + ty
 		_fverts[6]  = x1*_ix + y0*_iy + tx
@@ -505,7 +505,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_d3dDev.DrawPrimitiveUP D3DPT_TRIANGLESTRIP,2,_fverts,24
 	End Method
 	
-	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# )
+	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# ) Override
 		Local xr#=(x1-x0)*.5
 		Local yr#=(y1-y0)*.5
 		Local segs=Abs(xr)+Abs(yr)
@@ -526,7 +526,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_d3dDev.DrawPrimitiveUP D3DPT_TRIANGLEFAN,segs-2,fverts,24
 	End Method
 	
-	Method DrawPoly( verts#[],handlex#,handley#,tx#,ty# )
+	Method DrawPoly( verts#[],handlex#,handley#,tx#,ty# ) Override
 		If verts.length<6 Or (verts.length&1) Return
 		Local segs=verts.length/2
 		Local fverts#[segs*6]
@@ -543,7 +543,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 	End Method
 		
 	'GetDC/BitBlt MUCH faster than locking backbuffer!	
-	Method DrawPixmap( pixmap:TPixmap,x,y )
+	Method DrawPixmap( pixmap:TPixmap,x,y ) Override
 		Local width=pixmap.width,height=pixmap.height
 	
 		Local dstsurf:IDirect3DSurface9' = New IDirect3DSurface9
@@ -574,7 +574,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 	End Method
 
 	'GetDC/BitBlt MUCH faster than locking backbuffer!	
-	Method GrabPixmap:TPixmap( x,y,width,height )
+	Method GrabPixmap:TPixmap( x,y,width,height ) Override
 	
 		Local srcsurf:IDirect3DSurface9
 		If _d3dDev.GetRenderTarget( 0,srcsurf )<0
@@ -623,7 +623,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		Return pixmap
 	End Method
 	
-	Method SetResolution( width#,height# )
+	Method SetResolution( width#,height# ) Override
 		Local matrix#[]=[..
 		2.0/width,0.0,0.0,0.0,..
 		 0.0,-2.0/height,0.0,0.0,..

+ 24 - 24
gl2sdlmax2d.mod/main.bmx

@@ -310,7 +310,7 @@ Type TGLImageFrame Extends TImageFrame
 
 	End Method
 
-	Method Draw( x0#, y0#, x1#, y1#, tx#, ty#, sx#, sy#, sw#, sh# )
+	Method Draw( x0#, y0#, x1#, y1#, tx#, ty#, sx#, sy#, sw#, sh# ) Override
 
 		Assert seq = GraphicsSeq Else "Image does not exist"
 
@@ -719,13 +719,13 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 	End Method
 
 	'graphics driver overrides
-	Method GraphicsModes:TGraphicsMode[]()
+	Method GraphicsModes:TGraphicsMode[]() Override
 
 		Return SDLGraphicsDriver().GraphicsModes()
 
 	End Method
 
-	Method AttachGraphics:TMax2DGraphics( widget:Byte Ptr, flags )
+	Method AttachGraphics:TMax2DGraphics( widget:Byte Ptr, flags ) Override
 
 		Local g:TSDLGraphics = SDLGraphicsDriver().AttachGraphics( widget, flags )
 
@@ -733,7 +733,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 	
-	Method CreateGraphics:TMax2DGraphics( width, height, depth, hertz, flags, x, y )
+	Method CreateGraphics:TMax2DGraphics( width, height, depth, hertz, flags, x, y ) Override
 
 		Local g:TSDLGraphics = SDLGraphicsDriver().CreateGraphics( width, height, depth, hertz, flags | SDL_GRAPHICS_GL, x, y )
 		
@@ -741,7 +741,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetGraphics( g:TGraphics )
+	Method SetGraphics( g:TGraphics ) Override
 
 		If Not g
 			TMax2DGraphics.ClearCurrent
@@ -792,7 +792,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 	
-	Method Flip( sync )
+	Method Flip( sync ) Override
 
 		Flush()
 
@@ -802,13 +802,13 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 ?
 	End Method
 
-	Method ToString$()
+	Method ToString$() Override
 
 		Return "OpenGL"
 
 	End Method
 
-	Method CreateFrameFromPixmap:TGLImageFrame( pixmap:TPixmap, flags )
+	Method CreateFrameFromPixmap:TGLImageFrame( pixmap:TPixmap, flags ) Override
 
 		Local frame:TGLImageFrame
 		frame = TGLImageFrame.CreateFromPixmap( pixmap, flags )
@@ -816,7 +816,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetBlend( blend )
+	Method SetBlend( blend ) Override
 
 		If state_blend = blend Return
 		state_blend=blend
@@ -860,7 +860,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetAlpha( alpha# )
+	Method SetAlpha( alpha# ) Override
 
 		If alpha > 1.0 Then alpha = 1.0
 		If alpha < 0.0 Then alpha = 0.0
@@ -868,13 +868,13 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetLineWidth( width# )
+	Method SetLineWidth( width# ) Override
 
 		glLineWidth( width )
 
 	End Method
 
-	Method SetColor( red, green, blue )
+	Method SetColor( red, green, blue ) Override
 
 		color4f[0] = Min( Max( red, 0 ), 255 ) / 255.0
 		color4f[1] = Min( Max( green, 0 ), 255 ) / 255.0
@@ -882,7 +882,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetClsColor( red, green, blue )
+	Method SetClsColor( red, green, blue ) Override
 
 		red = Min( Max( red, 0 ), 255 )
 		green = Min( Max( green, 0 ), 255 )
@@ -891,7 +891,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 	
-	Method SetViewport( x, y, w, h )
+	Method SetViewport( x, y, w, h ) Override
 		'render what has been batched till now
 		FlushTest( PRIMITIVE_VIEWPORT )
 
@@ -904,7 +904,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetTransform( xx#, xy#, yx#, yy# )
+	Method SetTransform( xx#, xy#, yx#, yy# ) Override
 
 		ix = xx
 		iy = xy
@@ -913,7 +913,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method Cls()
+	Method Cls() Override
 		'render what has been batched till now - maybe this happens
 		'with an restricted viewport
 		FlushTest( PRIMITIVE_CLS )
@@ -922,7 +922,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method Plot( px#, py# )
+	Method Plot( px#, py# ) Override
 
 		FlushTest( PRIMITIVE_DOT )
 
@@ -942,7 +942,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawLine( x0#, y0#, x1#, y1#, tx#, ty# )
+	Method DrawLine( x0#, y0#, x1#, y1#, tx#, ty# ) Override
 
 		FlushTest( PRIMITIVE_LINE )
 
@@ -970,7 +970,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawRect( x0#, y0#, x1#, y1#, tx#, ty# )
+	Method DrawRect( x0#, y0#, x1#, y1#, tx#, ty# ) Override
 
 		FlushTest( PRIMITIVE_PLAIN_TRIANGLE )
 
@@ -1012,7 +1012,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawOval( x0#, y0#, x1#, y1#, tx#, ty# )
+	Method DrawOval( x0#, y0#, x1#, y1#, tx#, ty# ) Override
 
 		' TRIANGLE_FAN (no batching)
 		FlushTest( PRIMITIVE_TRIANGLE_FAN )
@@ -1063,7 +1063,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawPoly( xy#[], handle_x#, handle_y#, origin_x#, origin_y# )
+	Method DrawPoly( xy#[], handle_x#, handle_y#, origin_x#, origin_y# ) Override
 
 		If xy.length < 6 Or ( xy.length & 1 ) Then Return
 
@@ -1092,7 +1092,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawPixmap( p:TPixmap, x, y )
+	Method DrawPixmap( p:TPixmap, x, y ) Override
 
 		Local blend = state_blend
 		SetBlend( SOLIDBLEND )
@@ -1162,7 +1162,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method GrabPixmap:TPixmap( x, y, w, h )
+	Method GrabPixmap:TPixmap( x, y, w, h ) Override
 
 		Local blend = state_blend
 		SetBlend( SOLIDBLEND )
@@ -1176,7 +1176,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetResolution( width#, height# )
+	Method SetResolution( width#, height# ) Override
 
 		u_pmatrix.SetOrthographic( 0, width, 0, height, -1, 1 )
 		'glMatrixMode( GL_PROJECTION )

+ 24 - 24
glsdlmax2d.mod/glsdlmax2d.bmx

@@ -214,7 +214,7 @@ Type TGLImageFrame Extends TImageFrame
 		seq=0
 	End Method
 	
-	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# )
+	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# ) Override
 		Assert seq=GraphicsSeq Else "Image does not exist"
 
 		Local u0#=sx * uscale
@@ -294,21 +294,21 @@ Type TGLMax2DDriver Extends TMax2DDriver
 	End Method
 
 	'graphics driver overrides
-	Method GraphicsModes:TGraphicsMode[]()
+	Method GraphicsModes:TGraphicsMode[]() Override
 		Return SDLGraphicsDriver().GraphicsModes()
 	End Method
 	
-	Method AttachGraphics:TMax2DGraphics( widget:Byte Ptr,flags )
+	Method AttachGraphics:TMax2DGraphics( widget:Byte Ptr,flags ) Override
 		Local g:TSDLGraphics=SDLGraphicsDriver().AttachGraphics( widget,flags )
 		If g Return TMax2DGraphics.Create( g,Self )
 	End Method
 	
-	Method CreateGraphics:TMax2DGraphics( width,height,depth,hertz,flags,x,y )
+	Method CreateGraphics:TMax2DGraphics( width,height,depth,hertz,flags,x,y ) Override
 		Local g:TSDLGraphics=SDLGraphicsDriver().CreateGraphics( width,height,depth,hertz,flags | SDL_GRAPHICS_GL,x,y )
 		If g Return TMax2DGraphics.Create( g,Self )
 	End Method
 	
-	Method SetGraphics( g:TGraphics )
+	Method SetGraphics( g:TGraphics ) Override
 		If Not g
 			TMax2DGraphics.ClearCurrent
 			SDLGraphicsDriver().SetGraphics Null
@@ -341,21 +341,21 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		glViewport 0,0,gw,gh
 	End Method
 	
-	Method Flip( sync )
+	Method Flip( sync ) Override
 		SDLGraphicsDriver().Flip sync
 	End Method
 	
-	Method ToString$()
+	Method ToString$() Override
 		Return "OpenGL"
 	End Method
 
-	Method CreateFrameFromPixmap:TGLImageFrame( pixmap:TPixmap,flags )
+	Method CreateFrameFromPixmap:TGLImageFrame( pixmap:TPixmap,flags ) Override
 		Local frame:TGLImageFrame
 		frame=TGLImageFrame.CreateFromPixmap( pixmap,flags )
 		Return frame
 	End Method
 
-	Method SetBlend( blend )
+	Method SetBlend( blend ) Override
 		If blend=state_blend Return
 		state_blend=blend
 		Select blend
@@ -384,32 +384,32 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		End Select
 	End Method
 
-	Method SetAlpha( alpha# )
+	Method SetAlpha( alpha# ) Override
 		If alpha>1.0 alpha=1.0
 		If alpha<0.0 alpha=0.0
 		color4ub[3]=alpha*255
 		glColor4ubv color4ub
 	End Method
 
-	Method SetLineWidth( width# )
+	Method SetLineWidth( width# ) Override
 		glLineWidth width
 	End Method
 	
-	Method SetColor( red,green,blue )
+	Method SetColor( red,green,blue ) Override
 		color4ub[0]=Min(Max(red,0),255)
 		color4ub[1]=Min(Max(green,0),255)
 		color4ub[2]=Min(Max(blue,0),255)
 		glColor4ubv color4ub
 	End Method
 
-	Method SetClsColor( red,green,blue )
+	Method SetClsColor( red,green,blue ) Override
 		red=Min(Max(red,0),255)
 		green=Min(Max(green,0),255)
 		blue=Min(Max(blue,0),255)
 		glClearColor red/255.0,green/255.0,blue/255.0,1.0
 	End Method
 	
-	Method SetViewport( x,y,w,h )
+	Method SetViewport( x,y,w,h ) Override
 		If x=0 And y=0 And w=GraphicsWidth() And h=GraphicsHeight()
 			glDisable GL_SCISSOR_TEST
 		Else
@@ -418,25 +418,25 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		EndIf
 	End Method
 
-	Method SetTransform( xx#,xy#,yx#,yy# )
+	Method SetTransform( xx#,xy#,yx#,yy# ) Override
 		ix=xx
 		iy=xy
 		jx=yx
 		jy=yy
 	End Method
 
-	Method Cls()
+	Method Cls() Override
 		glClear GL_COLOR_BUFFER_BIT
 	End Method
 
-	Method Plot( x#,y# )
+	Method Plot( x#,y# ) Override
 		DisableTex
 		glBegin GL_POINTS
 		glVertex2f x+.5,y+.5
 		glEnd
 	End Method
 
-	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# )
+	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# ) Override
 		DisableTex
 		glBegin GL_LINES
 		glVertex2f x0*ix+y0*iy+tx+.5,x0*jx+y0*jy+ty+.5
@@ -444,7 +444,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		glEnd
 	End Method
 
-	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# )
+	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# ) Override
 		DisableTex
 		glBegin GL_QUADS
 		glVertex2f x0*ix+y0*iy+tx,x0*jx+y0*jy+ty
@@ -454,7 +454,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		glEnd
 	End Method
 	
-	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# )
+	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# ) Override
 	
 		Local xr#=(x1-x0)*.5
 		Local yr#=(y1-y0)*.5
@@ -477,7 +477,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		
 	End Method
 	
-	Method DrawPoly( xy#[],handle_x#,handle_y#,origin_x#,origin_y# )
+	Method DrawPoly( xy#[],handle_x#,handle_y#,origin_x#,origin_y# ) Override
 		If xy.length<6 Or (xy.length&1) Return
 		
 		DisableTex
@@ -490,7 +490,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		glEnd
 	End Method
 		
-	Method DrawPixmap( p:TPixmap,x,y )
+	Method DrawPixmap( p:TPixmap,x,y ) Override
 		Local blend=state_blend
 		DisableTex
 		SetBlend SOLIDBLEND
@@ -509,7 +509,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		SetBlend blend
 	End Method
 
-	Method GrabPixmap:TPixmap( x,y,w,h )
+	Method GrabPixmap:TPixmap( x,y,w,h ) Override
 		Local blend=state_blend
 		SetBlend SOLIDBLEND
 		Local p:TPixmap=CreatePixmap( w,h,PF_RGBA8888 )
@@ -519,7 +519,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		Return p
 	End Method
 	
-	Method SetResolution( width#,height# )
+	Method SetResolution( width#,height# ) Override
 		glMatrixMode GL_PROJECTION
 		glLoadIdentity
 		glOrtho 0,width,height,0,-1,1

+ 9 - 9
sdlgraphics.mod/sdlgraphics.bmx

@@ -63,12 +63,12 @@ End Type
 
 Type TSDLGraphics Extends TGraphics
 
-	Method Driver:TSDLGraphicsDriver()
+	Method Driver:TSDLGraphicsDriver() Override
 		Assert _context
 		Return SDLGraphicsDriver()
 	End Method
 
-	Method GetSettings( width:Int Var,height:Int Var,depth:Int Var,hertz:Int Var,flags:Int Var,x:Int Var,y:Int Var )
+	Method GetSettings( width:Int Var,height:Int Var,depth:Int Var,hertz:Int Var,flags:Int Var,x:Int Var,y:Int Var ) Override
 		Assert _context
 		'Local w:Int,h:Int,d:Int,r:Int,f:Int
 		'bbSDLGraphicsGetSettings _context,w,h,d,r,f
@@ -81,7 +81,7 @@ Type TSDLGraphics Extends TGraphics
 		y=_context.y
 	End Method
 
-	Method Close()
+	Method Close() Override
 		If Not _context Return
 		'bbSDLGraphicsClose( _context )
 		If _currentContext = _context Then
@@ -126,7 +126,7 @@ Type TSDLGraphicsDriver Extends TGraphicsDriver
 	Const MODE_SIZE:Int = 6
 ?
 
-	Method GraphicsModes:TGraphicsMode[]()
+	Method GraphicsModes:TGraphicsMode[]() Override
 		Local buf:Int[1024*MODE_SIZE]
 ?Not raspberrypi
 		Local count:Int=bbSDLGraphicsGraphicsModes( 0, buf,1024 )
@@ -152,13 +152,13 @@ Type TSDLGraphicsDriver Extends TGraphicsDriver
 		Return modes
 	End Method
 
-	Method AttachGraphics:TSDLGraphics( widget:Byte Ptr,flags:Int )
+	Method AttachGraphics:TSDLGraphics( widget:Byte Ptr,flags:Int ) Override
 		Local t:TSDLGraphics=New TSDLGraphics
 		't._context=bbGLGraphicsAttachGraphics( widget,flags )
 		Return t
 	End Method
 
-	Method CreateGraphics:TSDLGraphics( width:Int,height:Int,depth:Int,hertz:Int,flags:Int,x:Int,y:Int )
+	Method CreateGraphics:TSDLGraphics( width:Int,height:Int,depth:Int,hertz:Int,flags:Int,x:Int,y:Int ) Override
 		Local t:TSDLGraphics=New TSDLGraphics
 		t._context=SDLGraphicsCreateGraphics( width,height,depth,hertz,flags,x,y )
 		Return t
@@ -239,7 +239,7 @@ Type TSDLGraphicsDriver Extends TGraphicsDriver
 		Return context
 	End Method
 
-	Method SetGraphics( g:TGraphics )
+	Method SetGraphics( g:TGraphics ) Override
 		Local context:TGraphicsContext
 		Local t:TSDLGraphics=TSDLGraphics( g )
 		If t context=t._context
@@ -250,7 +250,7 @@ Type TSDLGraphicsDriver Extends TGraphicsDriver
 		_currentContext = context
 	End Method
 
-	Method Flip( sync:Int )
+	Method Flip( sync:Int ) Override
 		'BRL  SDL
 		'-1   -1   sdl: adaptive vsync, brl: "use graphics object's refresh rate"
 		' 1    1   vsync
@@ -301,7 +301,7 @@ Type TSDLGraphicsDriver Extends TGraphicsDriver
 		Return data
 	End Function
 
-	Method CanResize:Int()
+	Method CanResize:Int() Override
 		Return True
 	End Method