Commit graph

80 commits

Author SHA1 Message Date
Kagami Sascha Rosylight
52ea5204a2 Convert Web IDL void to undefined
Fixes #27660
2022-01-05 03:39:33 +01:00
Josh Matthews
795560ad52 webgl: Add stub isContextLost API. 2020-07-03 14:47:06 -04:00
Josh Matthews
1ce68eb4ea webgl: Update IDL from upstream to avoid overloading issues. 2020-04-23 16:13:56 -04:00
Mátyás Mustoha
7d5048f885 Add support for WebGL2 uniform matrix operations
Adds support for the `uniformMatrix[234]x[234]fv` WebGL2 functions.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.8
2020-01-17 11:42:45 +01:00
Mátyás Mustoha
0650fc3199 Add support for WebGL2 uniform array operations
Adds support for the WebGL2 overloads of `uniform[1234][if]v`.
2020-01-16 12:09:23 +01:00
Kagami Sascha Rosylight
d6c58b8226 Migrate to IDL mixin syntax 2019-10-01 18:45:26 +09:00
Jan Andre Ikenmeyer
6b0c111126
Update MPL license to https (part 2) 2018-11-19 14:46:57 +01:00
Anthony Ramine
900a19058e Support unions of objects in overloads
Part of #20513, implementing the parts useful for WebGL.
2018-08-30 16:15:40 +02:00
Anthony Ramine
83e27e4167 Remove WebGLRenderingContext.STENCIL_INDEX 2018-08-30 16:15:38 +02:00
Anthony Ramine
3e8c2d659a Implement gl.getUniform() 2018-07-18 21:37:41 +02:00
Anthony Ramine
0e2e834d18 Fix gl.linkProgram() signature 2018-07-05 14:20:47 +02:00
Fausto Núñez Alberro
58760d91d1
Implement WebGL GetRenderbufferParameter
This needed a bump of gleam to version 0.4.33
2018-04-24 18:16:51 +02:00
Anthony Ramine
93d2082acb Move some methods out of the WebGLRenderingContextBase mixin
Those methods are to be overloaded in WebGL2, but this can't be done with
their current definitions, thanks to https://github.com/KhronosGroup/WebGL/issues/2216.
2018-04-04 13:12:43 +02:00
Anthony Ramine
bb2b6a7a41 Fix the signature of WebGLRenderingContext::BufferSubData 2018-04-04 13:12:42 +02:00
Anthony Ramine
866a523914 Properly use Float32List and Int32List for WebGL uniform methods 2018-04-03 12:22:32 +02:00
Anthony Ramine
088ebcb095 Remove obsolete BufferDataSource 2018-04-03 11:15:54 +02:00
Anthony Ramine
84adede785 Clean up WebGLRenderingContext.webidl 2018-04-03 10:51:26 +02:00
Anthony Ramine
a62bed82e4 Implement WebGLRenderingContextBase.getAttachedShaders 2018-03-24 13:58:07 +01:00
Igor Matuszewski
20f21cb5f8 Adapt uniform[fv] and similar to accept typed array args 2018-03-23 19:25:19 +01:00
Igor Matuszewski
36f39ce27a Change WebGL function signatures accepting typed arrays 2018-03-23 19:25:19 +01:00
Anthony Ramine
8061d8c3d2 Fix some more WebGL methods 2018-03-23 01:23:39 +01:00
Anthony Ramine
f532e79dc1 Make some WebGL parameters non-optional (fixes #8753)
Those parameters aren't optional in the current spec.

The test element-array-buffer-delete-recreate.html now fails because we don't
actually implement gl.getParameter(gl.CURRENT_PROGRAM).
2018-03-22 19:17:35 +01:00
Igor Gutorov
ee5bdbbd8b Implement WebGL getFramebufferAttachmentParameter API 2018-03-22 18:26:18 +02:00
Martina Kollarova
288ef50fb7 Add WebGL function glGetTexParameter
Set the expected result of the test `tex-input-validation.html` to CRASH, since
that is caused by unrelated problems. The test was previously not executing
completely, because it stopped when it didn't find the implementation of
getTexParameter.
2018-03-06 15:28:10 +02:00
Imanol Fernandez
8ae0739bab Implement DOM to texture 2017-10-16 20:56:53 +02:00
Imanol Fernandez
32e23c4db4 Implement WebGL extensions. 2017-05-18 18:44:07 +02:00
Imanol Fernandez
6b0c898e1a Fix highp precision in shaders & Implement WebGL::GetShaderPrecisionFormat 2017-04-21 20:23:55 +02:00
Eric Anholt
4c656f1f61 webgl: Add missing overload of bufferData().
I was writing this to fix the error in gl-enum-tests.html test (it now
gets farther along before it fails due to us missing
getTexParameter()), but it turned out that a lot of the conformance
tests were failing due to it.
2017-01-04 18:02:32 -08:00
Anthony Ramine
8af2327e95 Expose WebGL-related interfaces only in Window 2016-11-30 23:23:39 +01:00
Eric Anholt
6c10d5ca75 webgl: Add support for FBO attachments.
This allows many FBO tests to start running as their framebuffers
start coming back as framebuffer complete.
2016-10-25 22:18:29 -07:00
Eric Anholt
989c936e67 webgl: Add support for renderbufferStorage().
This is not a complete implementation yet: It doesn't clear the
contents of the renderbuffer on creation.  However, Gecko's plan to
only clear renderbuffers when the first FBO using them is the
simplest.
2016-10-25 22:18:28 -07:00
Eric Anholt
8a0ca2efba webgl: Add support for checkFramebufferStatus().
For now it's returning the default UNSUPPORTED on user FBOs.

object-deletion-behaviour.html starts running a bunch more subtets.
2016-10-25 22:18:27 -07:00
bors-servo
a466f43fe5 Auto merge of #13493 - scotttrinh:webgl-idl, r=jdm
Partial fix for #12415: expose WebGL interfaces

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes partially fix #12415  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they do not add any features

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13493)
<!-- Reviewable:end -->
2016-10-12 06:53:17 -05:00
Scott Trinh
5bdc8c806d Partial fix for #12415: expose WebGL interfaces 2016-10-11 06:33:04 -04:00
Eric Anholt
61debe5c01 webgl: Implement uniformMatrix*fv.
These new functions are derived from the existing uniform*fv
functions.  They get used in a lot of demo code, so it should greatly
improve our compatibility.

This regresses uniformMatrixBadArgs.html, which gets at an existing
problem in our uniform matrix support (failure to validate that the
uniform is a matrix before calling down) but previously just failed
because it only called the 'fv' variants and never the existing 'f'
variants.
2016-10-09 15:49:59 -07:00
Emilio Cobos Álvarez
f985a73cae
webgl: Handle both sequences and typed arrays, managing the type error ourselves.
This is a step with multiple intentions:

 * Be correct.
 * Unlock tests that are blocking @anholt.
 * Ease the transition to typed arrays once the changes by @Ms2ger start rolling
   in, since I expect the amount of test expectations to update to be
   non-trivial.
2016-10-09 12:41:13 +02:00
Emilio Cobos Álvarez
ea8f115b8c
webgl: A few fixes regarding the nullability of WebGL parameters. 2016-10-09 12:32:37 +02:00
Imanol Fernandez
a07d6b37cc Fix WebGL tests & Implement WebGLRenderingContext::{validateProgram, getProgramInfoLog, disableVertexAttribArray}, r=emilio 2016-10-03 16:17:19 +02:00
Ofek
ee149cdac7 implement WebGLRenderingContext::isEnabled 2016-09-22 13:44:35 +03:00
Eric Anholt
847ab63de6 webgl: Add isProgram() support.
There's one failure still, where a deleted program should still be
considered to be a program until it's unbound.  However, I recently
made it so that we unbind at delete time, and we may need to partially
back that change out.
2016-08-28 17:18:09 -07:00
Ms2ger
ed743bb50c Explicitly expose everything everywhere. 2016-07-12 13:06:48 +02:00
Daosheng Mu
9dab669124 Enable texSubImage2D API 2016-06-02 02:43:28 +08:00
Daniel
c017438428 Implement IsBuffer, IsFramebuffer and IsRenderbuffer for WebGLRenderingContext 2016-05-29 17:08:10 -04:00
bors-servo
846517342b Auto merge of #11147 - danlrobertson:webgl-tex, r=emilio
Impl copyTexImage2D and copyTexSubImage2D

- [X] `./mach build` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

Implement copyTexImage2D and copyTexSubImage2D for WebGLRenderingContext. Feedback would be appreciated. I did my best to follow the [spec](https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8). Please let me know if I missed anything. I couldn't find tests for this. Let me know if I should create one. I'm more than happy to do so. As always any feedback, comments,or critiques are very welcome 😄

Part of #10209

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11147)
<!-- Reviewable:end -->
2016-05-23 20:07:52 -07:00
Daniel Robertson
867cd9be29 Impl copyTexImage2D and copyTexSubImage2D
Implement copyTexImage2D and copyTexSubImage2D for
WebGLRenderingContext.
2016-05-23 22:29:23 -04:00
David Zbarsky
abfbeca670 Implement SampleCoverage 2016-05-22 00:23:29 -07:00
bors-servo
fe116b4bd7 Auto merge of #10776 - dzbarsky:getVertexAttrib, r=emilio
Implement GetVertexAttrib

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10776)
<!-- Reviewable:end -->
2016-05-18 14:40:32 -07:00
David Zbarsky
2bf016ff14 Implement GetVertexAttrib 2016-05-12 23:56:10 -07:00
David Zbarsky
2f416baa11 Implement ReadPixels 2016-05-12 23:50:36 -07:00
Daniel
8a5b0b8972 Implement IsShader fn and IsTexture fn for WebGLRenderingContext 2016-05-09 20:54:57 -04:00