pub struct WebGlProfile {
pub vendor: String,
pub renderer: String,
pub max_texture_size: u32,
pub max_viewport_dims: (u32, u32),
pub max_renderbuffer_size: u32,
pub max_vertex_attribs: u32,
pub max_varying_vectors: u32,
pub max_fragment_uniform_vectors: u32,
pub max_vertex_uniform_vectors: u32,
pub extensions: Vec<String>,
pub shader_precision: ShaderPrecisionProfile,
pub context_attributes: ContextAttributes,
}Expand description
A complete WebGL device identity profile.
Used to present a consistent, plausible GPU identity to fingerprinting scripts.
§Example
use stygian_browser::webgl_noise::WebGlProfile;
let profile = WebGlProfile::nvidia_rtx_3060();
assert!(profile.renderer.contains("RTX 3060"));
assert!(profile.max_texture_size >= 16384);Fields§
§vendor: StringUNMASKED_VENDOR_WEBGL / getParameter(GL_VENDOR) value.
renderer: StringUNMASKED_RENDERER_WEBGL / getParameter(GL_RENDERER) value.
max_texture_size: u32MAX_TEXTURE_SIZE in pixels.
max_viewport_dims: (u32, u32)MAX_VIEWPORT_DIMS as [width, height].
max_renderbuffer_size: u32MAX_RENDERBUFFER_SIZE.
max_vertex_attribs: u32MAX_VERTEX_ATTRIBS.
max_varying_vectors: u32MAX_VARYING_VECTORS.
max_fragment_uniform_vectors: u32MAX_FRAGMENT_UNIFORM_VECTORS.
max_vertex_uniform_vectors: u32MAX_VERTEX_UNIFORM_VECTORS.
extensions: Vec<String>Ordered list of supported WebGL extensions.
shader_precision: ShaderPrecisionProfileShader precision format.
context_attributes: ContextAttributesContext attributes.
Implementations§
Source§impl WebGlProfile
impl WebGlProfile
Sourcepub fn nvidia_rtx_3060() -> Self
pub fn nvidia_rtx_3060() -> Self
Return the NVIDIA RTX 3060 profile with all fields populated.
§Example
use stygian_browser::webgl_noise::WebGlProfile;
let p = WebGlProfile::nvidia_rtx_3060();
assert!(p.renderer.contains("RTX 3060"));
assert_eq!(p.max_texture_size, 16384);Sourcepub fn nvidia_gtx_1660() -> Self
pub fn nvidia_gtx_1660() -> Self
Return the NVIDIA GTX 1660 profile.
§Example
use stygian_browser::webgl_noise::WebGlProfile;
let p = WebGlProfile::nvidia_gtx_1660();
assert!(p.renderer.contains("GTX 1660"));Sourcepub fn amd_rx_6700() -> Self
pub fn amd_rx_6700() -> Self
Return the AMD RX 6700 profile.
§Example
use stygian_browser::webgl_noise::WebGlProfile;
let p = WebGlProfile::amd_rx_6700();
assert!(p.renderer.contains("RX 6700"));Sourcepub fn intel_uhd_630() -> Self
pub fn intel_uhd_630() -> Self
Return the Intel UHD 630 profile (integrated graphics).
§Example
use stygian_browser::webgl_noise::WebGlProfile;
let p = WebGlProfile::intel_uhd_630();
assert!(p.renderer.contains("UHD Graphics 630"));Sourcepub fn assert_consistent(&self)
pub fn assert_consistent(&self)
Assert basic internal consistency: texture size ≤ viewport dims, etc.
§Example
use stygian_browser::webgl_noise::WebGlProfile;
let p = WebGlProfile::nvidia_rtx_3060();
p.assert_consistent();Trait Implementations§
Source§impl Clone for WebGlProfile
impl Clone for WebGlProfile
Source§fn clone(&self) -> WebGlProfile
fn clone(&self) -> WebGlProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more