mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 21:51:22 +00:00 
			
		
		
		
	Windows: Update ANGLE surface size when window is resized
ANGLE needs to be told to resize the DXGI swap chain using `eglWaitNative`. Otherwise the resize will only happen in `eglSwapBuffers`, which causes some janky stretching during window resize.
This commit is contained in:
		
							parent
							
								
									d7f023ab73
								
							
						
					
					
						commit
						a1a0acff7c
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		|  | @ -67,4 +67,9 @@ Vector<EGLint> GLManagerANGLE_Windows::_get_platform_context_attribs() const { | ||||||
| 	return ret; | 	return ret; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void GLManagerANGLE_Windows::window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height) { | ||||||
|  | 	window_make_current(p_window_id); | ||||||
|  | 	eglWaitNative(EGL_CORE_NATIVE_ENGINE); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| #endif // WINDOWS_ENABLED && GLES3_ENABLED
 | #endif // WINDOWS_ENABLED && GLES3_ENABLED
 | ||||||
|  |  | ||||||
|  | @ -50,7 +50,7 @@ private: | ||||||
| 	virtual Vector<EGLint> _get_platform_context_attribs() const override; | 	virtual Vector<EGLint> _get_platform_context_attribs() const override; | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
| 	void window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height) {} | 	void window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height); | ||||||
| 
 | 
 | ||||||
| 	GLManagerANGLE_Windows(){}; | 	GLManagerANGLE_Windows(){}; | ||||||
| 	~GLManagerANGLE_Windows(){}; | 	~GLManagerANGLE_Windows(){}; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alvin Wong
						Alvin Wong