aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webgl_extensions/ext/oestexturefloat.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2020-04-09 17:18:35 -0400
committerJosh Matthews <josh@joshmatthews.net>2020-04-30 00:21:49 -0400
commit29ab55d076eedff3847b13885f8ea8b2374af45c (patch)
tree4ae01efe7899c34caf06a0ba8d37483a46600c66 /components/script/dom/webgl_extensions/ext/oestexturefloat.rs
parent8789a6a8d8186416a766f7ef2a71af217e20f9fb (diff)
downloadservo-29ab55d076eedff3847b13885f8ea8b2374af45c.tar.gz
servo-29ab55d076eedff3847b13885f8ea8b2374af45c.zip
webgl: Fix support for float/half-float texture formats.
Diffstat (limited to 'components/script/dom/webgl_extensions/ext/oestexturefloat.rs')
-rw-r--r--components/script/dom/webgl_extensions/ext/oestexturefloat.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/components/script/dom/webgl_extensions/ext/oestexturefloat.rs b/components/script/dom/webgl_extensions/ext/oestexturefloat.rs
index fbcfcdeafeb..c568f88039b 100644
--- a/components/script/dom/webgl_extensions/ext/oestexturefloat.rs
+++ b/components/script/dom/webgl_extensions/ext/oestexturefloat.rs
@@ -3,12 +3,12 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use super::{
- constants as webgl, ext_constants as gl, WebGLExtension, WebGLExtensionSpec, WebGLExtensions,
+ constants as webgl, WebGLExtension, WebGLExtensionSpec, WebGLExtensions,
};
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
use crate::dom::bindings::root::DomRoot;
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
-use canvas_traits::webgl::WebGLVersion;
+use canvas_traits::webgl::{TexFormat, WebGLVersion};
use dom_struct::dom_struct;
#[dom_struct]
@@ -44,14 +44,14 @@ impl WebGLExtension for OESTextureFloat {
fn enable(ext: &WebGLExtensions) {
ext.enable_tex_type(webgl::FLOAT);
- 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::ALPHA, webgl::FLOAT, gl::ALPHA32F_ARB);
+ ext.add_effective_tex_internal_format(TexFormat::RGBA, webgl::FLOAT, TexFormat::RGBA32f);
+ ext.add_effective_tex_internal_format(TexFormat::RGB, webgl::FLOAT, TexFormat::RGB32f);
+ ext.add_effective_tex_internal_format(TexFormat::Luminance, webgl::FLOAT, TexFormat::Luminance32f);
+ ext.add_effective_tex_internal_format(TexFormat::Alpha, webgl::FLOAT, TexFormat::Alpha32f);
ext.add_effective_tex_internal_format(
- webgl::LUMINANCE_ALPHA,
+ TexFormat::LuminanceAlpha,
webgl::FLOAT,
- gl::LUMINANCE_ALPHA32F_ARB,
+ TexFormat::LuminanceAlpha32f,
);
}