mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add support for WebGL2 GetFragDataLocation
Adds support for the `GetFragDataLocation` WebGL2 call. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.7
This commit is contained in:
parent
e1f6dfd716
commit
ced67af6b2
9 changed files with 62 additions and 32 deletions
|
@ -1287,6 +1287,12 @@ impl WebGLImpl {
|
|||
Self::shader_precision_format(gl, shader_type, precision_type, chan)
|
||||
},
|
||||
WebGLCommand::GetExtensions(ref chan) => Self::get_extensions(gl, chan),
|
||||
WebGLCommand::GetFragDataLocation(program_id, ref name, ref sender) => {
|
||||
let location =
|
||||
gl.get_frag_data_location(program_id.get(), &to_name_in_compiled_shader(name));
|
||||
assert!(location >= 0);
|
||||
sender.send(location).unwrap();
|
||||
},
|
||||
WebGLCommand::GetUniformLocation(program_id, ref name, ref chan) => {
|
||||
Self::uniform_location(gl, program_id, &name, chan)
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue