mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Implement WEBGL_color_buffer_float and EXT_color_buffer_half_float (fixes #22113)
This commit is contained in:
parent
176d984b3b
commit
e31462c37c
12 changed files with 240 additions and 32 deletions
|
@ -47,12 +47,9 @@ impl WebGLExtension for OESTextureHalfFloat {
|
|||
}
|
||||
|
||||
fn enable(ext: &WebGLExtensions) {
|
||||
// Enable FLOAT text data type
|
||||
let hf = OESTextureHalfFloatConstants::HALF_FLOAT_OES;
|
||||
ext.enable_tex_type(hf);
|
||||
let needs_replace = !ext.supports_gl_extension("GL_OES_texture_float");
|
||||
if needs_replace {
|
||||
// Special internal formats must be used to avoid clamped float values
|
||||
if !ext.supports_gl_extension("GL_OES_texture_half_float") {
|
||||
ext.add_effective_tex_internal_format(webgl::RGBA, hf, gl::RGBA16F);
|
||||
ext.add_effective_tex_internal_format(webgl::RGB, hf, gl::RGB16F);
|
||||
ext.add_effective_tex_internal_format(webgl::LUMINANCE, hf, gl::LUMINANCE16F_ARB);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue