File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,17 @@ pub const Extension = union(enum) {
105105
106106 /// Extension types.
107107 pub const Type = struct {
108- pub const WEBGL_debug_renderer_info = packed struct (u64 ) {
109- UNMASKED_RENDERER_WEBGL : u32 = 0 ,
110- UNMASKED_VENDOR_WEBGL : u32 = 0 ,
108+ pub const WEBGL_debug_renderer_info = struct {
109+ pub const UNMASKED_VENDOR_WEBGL : u64 = 0x9245 ;
110+ pub const UNMASKED_RENDERER_WEBGL : u64 = 0x9246 ;
111+
112+ pub fn get_UNMASKED_VENDOR_WEBGL () u64 {
113+ return UNMASKED_VENDOR_WEBGL ;
114+ }
115+
116+ pub fn get_UNMASKED_RENDERER_WEBGL () u64 {
117+ return UNMASKED_RENDERER_WEBGL ;
118+ }
111119 };
112120 };
113121};
Original file line number Diff line number Diff line change 9090 }
9191}
9292</ script >
93+
94+ < script id =WebGLRenderingCanvas#getExtension >
95+ // WEBGL_debug_renderer_info
96+ {
97+ const element = document . createElement ( "canvas" ) ;
98+ const ctx = element . getContext ( "webgl" ) ;
99+ const rendererInfo = ctx . getExtension ( "WEBGL_debug_renderer_info" ) ;
100+ testing . expectEqual ( true , rendererInfo instanceof WEBGL_debug_renderer_info ) ;
101+
102+ testing . expectEqual ( rendererInfo . UNMASKED_VENDOR_WEBGL , 0x9245 ) ;
103+ testing . expectEqual ( rendererInfo . UNMASKED_RENDERER_WEBGL , 0x9246 ) ;
104+ }
105+ </ script >
You can’t perform that action at this time.
0 commit comments