Commit graph

333 commits

Author SHA1 Message Date
Richard Davey
a95c34ce92 WebGLRenderer.deleteTexture will now run resetTextures(true) first, incase the requested texture to be deleted is currently bound. Previously, it would delete the texture and then reset them. 2021-02-17 13:10:10 +00:00
Richard Davey
c5cbb413d2 You can now set the boolean preserveDrawingBuffer in the Game Config (either directly, or in the Render Config). This is passed to the WebGL context during creation and controls if the buffers are automatically cleared each frame or not. The default is to clear them. Set to true to retain them. 2021-02-04 15:58:41 +00:00
Richard Davey
a765b7edfc WebGLRenderer.isTextureClean is a new boolean property that tracks of all of the multi-textures are in a clean 'default' state, to avoid lots of gl texture binds and activations during a Scene restart or destruction process. 2021-01-04 15:49:39 +00:00
Richard Davey
519afd031b Fixed Camera Fade Effect check. Fix #5438 2020-12-11 11:29:16 +00:00
Richard Davey
69f4a6d8fb Added getAspectRatio method 2020-12-11 11:05:20 +00:00
Richard Davey
11990bccb4 Added global projection matrix back and removed events 2020-12-11 10:26:15 +00:00
Richard Davey
7acbd816f3 Added new Projection Update event and respond to it 2020-12-10 18:07:25 +00:00
Richard Davey
f1dbea4ead beginCapture can accept dimensions. Reset scissor enables even if same size. Always set drawing height. 2020-12-10 16:55:00 +00:00
Richard Davey
197aa9df0f Update WebGLRenderer.js 2020-12-09 15:55:02 +00:00
Richard Davey
5f279bf4a4 Added RenderTarget, begingCapture, endCapture, resetScissor and resetViewport 2020-12-08 17:37:59 +00:00
Richard Davey
402e6d23b1 Testing making the pipeline responsible for setting the buffer to cut down on potential points of failure 2020-12-04 18:06:16 +00:00
Richard Davey
08b304372c Made the Render Events global, not WebGL specific and allowed Canvas Renderer to emit them too 2020-12-04 15:07:26 +00:00
Richard Davey
3149bb5dfa JSDoc fix 2020-11-26 14:19:29 +00:00
Richard Davey
a0a32f45e5 Using a Bitmap Mask and a Blend Mode in WebGL would reset the blend mode when the mask was rendered, causing the Game Object to have no blend mode. Fix #5409 2020-11-26 10:14:13 +00:00
Richard Davey
3f511a73cd Replace integer[] with number[] 2020-11-23 10:23:10 +00:00
Richard Davey
02c34cd64e Replace integer with number 2020-11-23 10:22:13 +00:00
Richard Davey
6f6fbadfdd Don't adjust viewport unless needed 2020-11-19 16:40:07 +00:00
Richard Davey
916bfa78b2 Missing flush 2020-11-18 10:26:44 +00:00
Richard Davey
629eefb7d5 Now extends event emitter, new events and new isBooted property 2020-11-17 14:09:02 +00:00
Richard Davey
2008d3b880 Added popFBO parameters and setViewport parameter 2020-11-16 17:43:04 +00:00
Richard Davey
c12b4cff3f Swizzle RGB 2020-11-16 15:45:45 +00:00
Richard Davey
cfce8062e6 Call the new camera methods 2020-11-13 14:19:55 +00:00
Richard Davey
92eca8d3d2 Use the new Camera post pipeline feature 2020-11-06 15:35:29 +00:00
Richard Davey
554e9214e0 Smaller error 2020-11-06 11:46:06 +00:00
Richard Davey
6e90d8ed59 Corrected docs and resetTextures 2020-11-06 11:42:25 +00:00
Richard Davey
02bde43772 Added fboStack, pushFramebuffer, popFramebuffer and resetTextures parameter 2020-11-06 10:19:26 +00:00
Richard Davey
d3c70002ea Removed use of _tempMatrix from all renderers 2020-11-06 09:44:29 +00:00
Richard Davey
883402da8a Added forceZero method and used it 2020-11-05 10:50:40 +00:00
Richard Davey
f94e7b4f75 Set dimensions before resizing. Validate gl objects before deleting them. 2020-11-04 18:01:39 +00:00
Richard Davey
5dbec83a8b Using new Camera Pipeline (renderTexture todo) 2020-10-30 17:50:19 +00:00
Richard Davey
4badd54160 Added resetProgram and changed return values 2020-10-29 14:40:33 +00:00
Richard Davey
a5d6016e64 Move sequence so the renderer is clean 2020-10-27 18:06:13 +00:00
Richard Davey
7b5d6076b2 Added max size value 2020-10-27 14:41:43 +00:00
Richard Davey
f50560eba8 The WebGLRenderer.getMaxTextures method has been removed. This is no longer needed as you can use the WebGLRenderer.maxTextures property instead. 2020-10-27 14:36:43 +00:00
Richard Davey
59a215d643 * Types.Core.PipelineConfig is a new configuration object that you can set in the Game Config under the pipeline property. It allows you to define custom WebGL pipelines as part of the Game Config, so they're automatically installed and ready for use by all Scenes in your game. You can either set the pipeline object, or set it under the render sub-config. 2020-10-27 13:44:58 +00:00
Richard Davey
4ebdc637a9 Tidied up method flow 2020-10-27 12:25:53 +00:00
Richard Davey
2b3863272e Removed 'nativeTextures' and added new reset parameter
* The `WebGLRenderer.nativeTextures` array has been removed and any WebGLTextures created by the renderer are no longer stored within it. All WebGLTexture instances are stored in the `TextureSource` objects anyway, or by local classes such as RenderTexture, so there was no need to have another array taking up memroy.
* The `WebGLRenderer.deleteTexture` method has a new optional boolean parameter `reset` which allows you to control if the `WebGLRenderer.resetTextures` method is called, or not, after the texture is deleted.
2020-10-27 11:38:21 +00:00
Richard Davey
1e80f53f1d Better docs 2020-10-26 15:00:25 +00:00
Richard Davey
f87bd7d384 Removed all of the shader setters. This should be done via the WebGLShader class now. 2020-10-26 14:24:06 +00:00
Richard Davey
1e8b1cc583 Removed ProjectOrtho and optimized setters 2020-10-26 14:05:26 +00:00
Richard Davey
9531124903 Typo fix 2020-10-21 18:15:19 +01:00
Richard Davey
75f857b645 Update WebGLRenderer.js 2020-10-16 14:11:21 +01:00
Richard Davey
d35ff331b2 Now takes a pre-filtered list of children to render 2020-10-16 11:36:00 +01:00
Richard Davey
2d43561e1a WebGLRenderer.vaoExtension is a new property that holds a reference to the Vertex Array Object WebGL Extension, if supported by the browser. 2020-10-01 13:48:27 +01:00
Richard Davey
d8992ccf9d WebGLRenderer.instancedArraysExtension is a new property that holds the WebGL Extension for instanced array drawing, if supported by the browser. 2020-10-01 10:57:13 +01:00
Richard Davey
8119ce7da1 Fixed use of old camera private properties 2020-09-29 16:44:11 +01:00
Richard Davey
4748c7c7fc WebGLRenderer.defaultScissor is a new property that holds the default scissor dimensions for the renderer. This is modified during resize and avoids continuous array generation in the preRender loop. 2020-09-24 09:26:41 +01:00
Richard Davey
f2f3aea79a Shorter errors 2020-09-21 14:05:38 +01:00
Richard Davey
6a966e3f3b Removed interpolationPercentage parameter from all render methods, as it has never been used. 2020-09-14 15:33:58 +01:00
Richard Davey
81800e0ce2 WebGLRenderer.whiteTexture is a new property that is a reference to a pure white 4x4 texture that is created during Boot by the Texture Manager. The Multi Pipeline uses this internally for all Graphic, Shape and fill rendering. 2020-09-14 14:44:29 +01:00