Richard Davey
5d1d379991
Updated version to 3.85.0
2024-05-15 15:02:04 +01:00
Ben Richards
7eede9d236
Standardise texture update in Shader.initSampler2D
.
2024-02-26 16:19:24 +13:00
Ben Richards
9a5b51dd27
Eliminate duplicate code in WebGL texture creation/update.
...
This should make the code lighter and more maintainable.
`UNPACK_FLIP_Y_WEBGL` is now always set, where previously it was allowed
to just remain default (false); this is necessary for the new code path.
`Uint8Array` sources are now allowed to generate MIPMaps.
`WebGLTextureWrapper.update` now checks the type of `pixels`, although
it should only ever be the final case.
2024-02-23 18:43:27 +13:00
Ben Richards
3cd756dbe9
Fix new WebGLTextures remaining bound after creation.
...
This caused an error when calling `Shader.setRenderToTexture()`
after the game started running.
The leftover texture caused a temporary cyclic reference with the new
Framebuffer. The actual rendering pipeline was not affected.
2024-02-22 19:01:03 +13:00
Ben Richards
198598882e
Document non-optional texture update flags correctly.
2024-02-22 09:56:17 +13:00
Ben Richards
13d6defb33
Fix rare text sizes failing to render.
...
If initialized at a power-of-two resolution, then resized to a
non-power-of-two resolution, some extra parameters must be updated.
2024-02-21 11:48:59 +13:00
Richard Davey
1f8276ac76
Updated copyright year, company and author
2024-02-19 17:12:24 +00:00
Richard Davey
82b1a3e2aa
Added missing copyright block
2024-02-19 15:01:56 +00:00
Ben Richards
6d56791568
Fix incorrect type on WebGLAttribLocationWrapper.wegGLAttribLocation
.
...
A uniform uses a `WebGLUniformLocation`, but an attrib uses a `GLint`.
2024-02-09 11:06:47 +13:00
Ben Richards
7ed40fdf7d
Allow WebGL wrapper operations during context loss.
2024-02-05 16:40:16 +13:00
Richard Davey
604c34c13b
Stop tsgen from crashing!
2024-02-02 13:56:24 +00:00
Richard Davey
e00d12195d
Fixed incorrect jsdocs
2024-02-02 13:03:38 +00:00
Richard Davey
7bac75a2f4
Fixed some jsdoc name references and minor lint errors
2024-02-02 13:01:03 +00:00
Ben Richards
4c849cb2f7
Tidy up WebGL Wrappers.
...
Dispose of all references on destroy.
Properly name WebGLProgramWrapper#initialize.
Remove renderer dependence in WebGLFramebufferWrapper.
2024-02-02 15:30:38 +13:00
Ben Richards
a0f066c543
Restore WebGL context.
...
All textures and shaders should automatically recover from WebGL
context loss.
Dynamic textures will lose their contents, unfortunately, as the texture
was stored on the GPU.
Frame buffers still have some bugs to work out.
2024-02-01 16:59:00 +13:00
Ben Richards
e920b1a961
Create and use wrappers for WebGLUniformLocation and WebGLAttribLocation.
2024-01-30 22:13:51 +13:00
Ben Richards
2382f7c1eb
Create and use WebGLProgramWrapper.
...
This handles shader programs.
Also tweak the documentation in WebGLBufferWrapper and
WebGLFramebufferWrapper to better reflect purpose.
2024-01-29 17:35:57 +13:00
Ben Richards
377221de35
Create and use WebGLBufferWrapper.
...
This mostly handles VertexBuffers, but there's an IndexBuffer which
is not internally used that uses the same wrapper.
2024-01-29 16:40:18 +13:00
Ben Richards
842d666ebf
Use and document WebGLFramebufferWrapper.
...
Also tweak WebGLTextureWrapper to have more standard destroyers
in itself and WebGLRenderer.
2024-01-29 14:53:23 +13:00
Ben Richards
68671f0d8a
Create WebGLFramebufferWrapper to encapsulate state.
2024-01-29 14:48:28 +13:00
Ben Richards
3b2aeaf18b
Create WebGLTextureWrapper to encapsulate texture state.
2024-01-29 11:08:16 +13:00