expose GraphicsDevice.DebugMode
							parent
							
								
									217ae96888
								
							
						
					
					
						commit
						8813a0139d
					
				|  | @ -15,6 +15,7 @@ namespace MoonWorks.Graphics | ||||||
| 	{ | 	{ | ||||||
| 		public IntPtr Handle { get; } | 		public IntPtr Handle { get; } | ||||||
| 		public Backend Backend { get; } | 		public Backend Backend { get; } | ||||||
|  | 		public bool DebugMode { get; } | ||||||
| 
 | 
 | ||||||
| 		private uint windowFlags; | 		private uint windowFlags; | ||||||
| 		public SDL2.SDL.SDL_WindowFlags WindowFlags => (SDL2.SDL.SDL_WindowFlags) windowFlags; | 		public SDL2.SDL.SDL_WindowFlags WindowFlags => (SDL2.SDL.SDL_WindowFlags) windowFlags; | ||||||
|  | @ -61,6 +62,7 @@ namespace MoonWorks.Graphics | ||||||
| 				Conversions.BoolToByte(debugMode) | 				Conversions.BoolToByte(debugMode) | ||||||
| 			); | 			); | ||||||
| 
 | 
 | ||||||
|  | 			DebugMode = debugMode; | ||||||
| 			// TODO: check for CreateDevice fail | 			// TODO: check for CreateDevice fail | ||||||
| 
 | 
 | ||||||
| 			// Check for replacement stock shaders | 			// Check for replacement stock shaders | ||||||
|  |  | ||||||
|  | @ -23,11 +23,15 @@ namespace MoonWorks.Graphics | ||||||
| 
 | 
 | ||||||
| 			set | 			set | ||||||
| 			{ | 			{ | ||||||
| 				Refresh.Refresh_SetGpuBufferName( | 				if (Device.DebugMode) | ||||||
| 					Device.Handle, | 				{ | ||||||
| 					Handle, | 					Refresh.Refresh_SetGpuBufferName( | ||||||
| 					value | 						Device.Handle, | ||||||
| 				); | 						Handle, | ||||||
|  | 						value | ||||||
|  | 					); | ||||||
|  | 				} | ||||||
|  | 
 | ||||||
| 				name = value; | 				name = value; | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | @ -27,11 +27,15 @@ namespace MoonWorks.Graphics | ||||||
| 
 | 
 | ||||||
| 			set | 			set | ||||||
| 			{ | 			{ | ||||||
| 				Refresh.Refresh_SetTextureName( | 				if (Device.DebugMode) | ||||||
| 					Device.Handle, | 				{ | ||||||
| 					Handle, | 					Refresh.Refresh_SetTextureName( | ||||||
| 					value | 						Device.Handle, | ||||||
| 				); | 						Handle, | ||||||
|  | 						value | ||||||
|  | 					); | ||||||
|  | 				} | ||||||
|  | 
 | ||||||
| 				name = value; | 				name = value; | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue