mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement WebGL OES_standard_derivatives extension.
This commit is contained in:
parent
d4e43d9d76
commit
1dd3899c37
9 changed files with 127 additions and 20 deletions
|
@ -20,6 +20,7 @@ pub trait WebGLExtensionWrapper: JSTraceable + HeapSizeOf {
|
|||
ext: &WebGLExtensions)
|
||||
-> NonZero<*mut JSObject>;
|
||||
fn is_supported(&self, &WebGLExtensions) -> bool;
|
||||
fn is_enabled(&self) -> bool;
|
||||
fn enable(&self, ext: &WebGLExtensions);
|
||||
fn name(&self) -> &'static str;
|
||||
fn as_any(&self) -> &Any;
|
||||
|
@ -62,7 +63,11 @@ impl<T> WebGLExtensionWrapper for TypedWebGLExtensionWrapper<T>
|
|||
}
|
||||
|
||||
fn is_supported(&self, ext: &WebGLExtensions) -> bool {
|
||||
self.extension.get().is_some() || T::is_supported(ext)
|
||||
self.is_enabled() || T::is_supported(ext)
|
||||
}
|
||||
|
||||
fn is_enabled(&self) -> bool {
|
||||
self.extension.get().is_some()
|
||||
}
|
||||
|
||||
fn enable(&self, ext: &WebGLExtensions) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue