mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Format script component
This commit is contained in:
parent
2ca7a13473
commit
c37a345dc9
357 changed files with 25485 additions and 18076 deletions
|
@ -26,9 +26,11 @@ impl OESTextureFloat {
|
|||
impl WebGLExtension for OESTextureFloat {
|
||||
type Extension = OESTextureFloat;
|
||||
fn new(ctx: &WebGLRenderingContext) -> DomRoot<OESTextureFloat> {
|
||||
reflect_dom_object(Box::new(OESTextureFloat::new_inherited()),
|
||||
&*ctx.global(),
|
||||
OESTextureFloatBinding::Wrap)
|
||||
reflect_dom_object(
|
||||
Box::new(OESTextureFloat::new_inherited()),
|
||||
&*ctx.global(),
|
||||
OESTextureFloatBinding::Wrap,
|
||||
)
|
||||
}
|
||||
|
||||
fn spec() -> WebGLExtensionSpec {
|
||||
|
@ -36,9 +38,11 @@ impl WebGLExtension for OESTextureFloat {
|
|||
}
|
||||
|
||||
fn is_supported(ext: &WebGLExtensions) -> bool {
|
||||
ext.supports_any_gl_extension(&["GL_OES_texture_float",
|
||||
"GL_ARB_texture_float",
|
||||
"GL_EXT_color_buffer_float"])
|
||||
ext.supports_any_gl_extension(&[
|
||||
"GL_OES_texture_float",
|
||||
"GL_ARB_texture_float",
|
||||
"GL_EXT_color_buffer_float",
|
||||
])
|
||||
}
|
||||
|
||||
fn enable(ext: &WebGLExtensions) {
|
||||
|
@ -49,10 +53,17 @@ impl WebGLExtension for OESTextureFloat {
|
|||
// Special internal formats must be used to avoid clamped float values
|
||||
ext.add_effective_tex_internal_format(webgl::RGBA, webgl::FLOAT, gl::RGBA32F);
|
||||
ext.add_effective_tex_internal_format(webgl::RGB, webgl::FLOAT, gl::RGB32F);
|
||||
ext.add_effective_tex_internal_format(webgl::LUMINANCE, webgl::FLOAT, gl::LUMINANCE32F_ARB);
|
||||
ext.add_effective_tex_internal_format(
|
||||
webgl::LUMINANCE,
|
||||
webgl::FLOAT,
|
||||
gl::LUMINANCE32F_ARB,
|
||||
);
|
||||
ext.add_effective_tex_internal_format(webgl::ALPHA, webgl::FLOAT, gl::ALPHA32F_ARB);
|
||||
ext.add_effective_tex_internal_format(webgl::LUMINANCE_ALPHA, webgl::FLOAT,
|
||||
gl::LUMINANCE_ALPHA32F_ARB);
|
||||
ext.add_effective_tex_internal_format(
|
||||
webgl::LUMINANCE_ALPHA,
|
||||
webgl::FLOAT,
|
||||
gl::LUMINANCE_ALPHA32F_ARB,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue