Platform/GFX/WebGL2: Difference between revisions

From MozillaWiki
< Platform‎ | GFX
Jump to navigation Jump to search
(Replace with link to MDN.)
 
(129 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=== Design ===
Please see https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API#WebGL_2.
 
* All WebGL functions must be implemented in WebGLContext
* WebGL function member definitions of WebGLContext should be group by feature as OpenGL ES 3.0 quick reference card do into differents .cpp files
 
=== Preliminary ===
 
* {{done|Add WebGL1Context inheriting from WebGLContext}}
* {{done|Add WebGL2Context C++ class inheriting WebGLContext}}
** Enable with about:config flag (webgl.enable-ensecure-webgl2)
** Add virtual func WebGLContext::IsWebGL2
** Add WebGL2 IDL inheriting WebGL 1 IDL
** Edit HTMLCanvasElement::GetContextHelper to allow experimental-webgl2
** gl.getParameter(gl.VERSION) return "WebGL 2"
* {{prev|Edit GLContext to allow getting a GL3 context; let WebGL 2 use it}}
** On mac, all OpenGL contexts are shared to each others, therefor they all have to be the same version.
*** This is getting fixed in {{bug|895597}}.
** Current GFX shader not compatible with OpenGL 3.2 core profile
** Would need to convert shader with ANGLE to the GLSL version we use.
* {{done|Bypass ANGLE shader compilation}}
** Bypass only when the shader code contains #version experimental-webgl2
** Add automatic provide GL_EXT_gpu_shader4
** Add in/out qualifiers in vertex shaders
** Add in qualifiers in fragment shaders
 
=== High Priority Features ===
 
* {{done|Add existing WebGL 1 extensions as WebGL 2 features}}
** WEBGL_draw_buffers
** OES_vertex-array_object
* {{deferred|ECT2 texture (need OpenGL 4.3 on mac)}}
* {{deferred|EAC textures (need OpenGL 4.3 on mac)}}
* {{ok|sRGB textures (GL_EXT_texture_sRGB)}}
* {{ok|Multisample renderbuffers (GL_EXT_framebuffer_multisample)}}
* {{deferred|Primitive restart with fixed index (need OpenGL 3.2 on mac)}}
* {{done|Min/max blend equations (GL_EXT_blend_minmax)}}
* {{done|Query objects}}
** GL_ARB_occlusion_query
** GL_EXT_occlusion_query_boolean
* {{ok|Transform feedback (GL_EXT_transform_feedback)}}
* {{done|Instanced Rendering (GL_ARB_draw_instanced)}}
* {{wishlist|gl.vertexAttribDivisor (GL_ARB_instanced_array)}}
* {{wishlist|gl.drawRangeElements (GL_EXT_draw_range_elements)}}
 
=== Low Priority Features ===
 
* {{deferred|Uniform buffer objects (need OpenGL 3.2 on mac)}}
* {{deferred|Sampler objects (need OpenGL 4.3 on mac)}}
* {{ok|3D textures}}
* {{ok|Shadow comparisons}}
* {{ok|Non-square and transposable uniform matrices}}
* {{ok|R and RG textures (GL_ARB_texture_rg)}}
* {{deferred|Texture swizzles (need OpenGL 4.3 on mac)}}
* {{ok|Unrestricted NPOT textures (GL_ARB_texture_non_power_of_two)}}
* {{ok|Mipmap level/LOD tricks}}
* {{ok|New renderbuffer/texture formats}}
* {{ok|Half-float vertex attributes (GL_ARB_half_float_vertex)}}
* {{ok|Stretch blits}}
* {{ok|Framebuffer invalidation hints}}
* {{ok|Attach any mipmap level to a framebuffer}}
* {{ok|Additional pixel store data}}
* {{ok|Buffer to buffer copies}}
* {{ok|Texture storage}}
 
=== Refactoring ===
 
* {{ok|Move functions definition from WebGLContextGL.cpp to distinct cpp files grouped as same as quick reference card do}}
 
=== Implementation Bugs (Meta WebGL2 {{nbug|889977}}) ===
 
<onlyinclude>
<bugzilla>
{
    "blocks": "889977",
    "include_fields": "id, priority, summary, status, assigned_to",
    "order": "bug_id"
}
</bugzilla>
</onlyinclude>
 
=== WebGL  for contributors ===
 
==== Updates feed ====
 
Anyone one who wants to tests and play with our WebGL 2 prototype, just get follow this bug to get all landed updates.
 
* {{nbug|894482}} Contributor & pre-alpha testers feed about WebGL 2 prototype updates
 
Feel free to report any WebGL 2 prototype's bugs by blocking {{nbug|894492}}.
 
==== WebGL 2 Bugs reported ====
 
<onlyinclude>
<bugzilla>
{
    "blocks": "894492",
    "include_fields": "id, priority, summary, status, assigned_to",
    "order": "bug_id"
}
</bugzilla>
</onlyinclude>

Latest revision as of 00:06, 3 March 2020