mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-14 23:38:57 +00:00
add WEBGL_debug_renderer_info
This commit is contained in:
@@ -105,9 +105,17 @@ pub const Extension = union(enum) {
|
||||
|
||||
/// Extension types.
|
||||
pub const Type = struct {
|
||||
pub const WEBGL_debug_renderer_info = packed struct(u64) {
|
||||
UNMASKED_RENDERER_WEBGL: u32 = 0,
|
||||
UNMASKED_VENDOR_WEBGL: u32 = 0,
|
||||
pub const WEBGL_debug_renderer_info = struct {
|
||||
pub const UNMASKED_VENDOR_WEBGL: u64 = 0x9245;
|
||||
pub const UNMASKED_RENDERER_WEBGL: u64 = 0x9246;
|
||||
|
||||
pub fn get_UNMASKED_VENDOR_WEBGL() u64 {
|
||||
return UNMASKED_VENDOR_WEBGL;
|
||||
}
|
||||
|
||||
pub fn get_UNMASKED_RENDERER_WEBGL() u64 {
|
||||
return UNMASKED_RENDERER_WEBGL;
|
||||
}
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -90,3 +90,16 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id=WebGLRenderingCanvas#getExtension>
|
||||
// WEBGL_debug_renderer_info
|
||||
{
|
||||
const element = document.createElement("canvas");
|
||||
const ctx = element.getContext("webgl");
|
||||
const rendererInfo = ctx.getExtension("WEBGL_debug_renderer_info");
|
||||
testing.expectEqual(true, rendererInfo instanceof WEBGL_debug_renderer_info);
|
||||
|
||||
testing.expectEqual(rendererInfo.UNMASKED_VENDOR_WEBGL, 0x9245);
|
||||
testing.expectEqual(rendererInfo.UNMASKED_RENDERER_WEBGL, 0x9246);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user