File tree Expand file tree Collapse file tree
src/wrappers/win32/window Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ rust-version = "1.82"
2525[features ]
2626default = []
2727opengl = [
28+ " windows/Win32_Graphics_OpenGL" ,
29+ " windows-sys/Win32_Graphics_OpenGL" ,
2830 " objc2-core-foundation/CFBundle" ,
2931 " objc2-app-kit/NSOpenGL" ,
3032 " objc2-app-kit/NSOpenGLView" ,
@@ -47,15 +49,13 @@ bytemuck = "1.25.0"
4749[target .'cfg(target_os="windows")' .dependencies ]
4850windows = { version = " 0.62.2" , features = [
4951 " Win32_Graphics_Gdi" ,
50- " Win32_Graphics_OpenGL" ,
5152 " Win32_System_Com_StructuredStorage" ,
5253 " Win32_System_Ole" ,
5354 " Win32_System_SystemServices" ,
5455 " Win32_UI_WindowsAndMessaging" ,
5556] }
5657windows-sys = { version = " 0.61.2" , features = [
5758 " Win32_Graphics_Gdi" ,
58- " Win32_Graphics_OpenGL" ,
5959 " Win32_System_Rpc" ,
6060 " Win32_System_LibraryLoader" ,
6161 " Win32_System_Ole" ,
Original file line number Diff line number Diff line change 11use crate :: wrappers:: win32:: style:: WindowStyle ;
22use crate :: wrappers:: win32:: user32:: ExtendedUser32 ;
3- use crate :: wrappers:: win32:: window:: OwnDeviceContext ;
43use crate :: wrappers:: win32:: { Dpi , DpiAwarenessContext , Rect } ;
54use dpi:: { PhysicalPosition , PhysicalSize } ;
65use std:: ffi:: c_void;
@@ -259,7 +258,8 @@ impl HWnd {
259258 Ok ( PhysicalPosition :: new ( pt. x , pt. y ) )
260259 }
261260
262- pub fn get_own_dc ( & self ) -> Result < OwnDeviceContext > {
263- OwnDeviceContext :: from_window ( * self )
261+ #[ cfg( feature = "opengl" ) ]
262+ pub fn get_own_dc ( & self ) -> Result < super :: OwnDeviceContext > {
263+ super :: OwnDeviceContext :: from_window ( * self )
264264 }
265265}
You can’t perform that action at this time.
0 commit comments