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
Richard Davey
4ade25fc79
No longer read private values for tint
...
The `Multi Pipeline`, `Bitmap Text`, `Render Texture`, `Text`, `TileSprite` and `Camera` now all read the tint values from the public properties instead of the private `_tintTL` etc ones. They also now set the `tintEffect` value directly from the `tintFill` property, removing another conditional check.
2020-09-14 11:05:09 +01:00
Richard Davey
e4b1093e72
The WebGLRenderer.resize
and onResize
methods no longer receives or uses the resolution
parameter.
2020-09-12 11:58:08 +01:00
Richard Davey
da4c387d86
Reference fixes
2020-09-09 13:21:38 +01:00
Richard Davey
7e840b2670
Removed all of the pipeline methods and added the Pipeline Manager instance
2020-09-09 13:05:18 +01:00
Richard Davey
d92195a8b8
Default rotation as well
2020-09-02 22:55:51 +01:00
Richard Davey
1562525a51
When using Camera.setRenderToTexture
its zoom
value would be applied twice. Fix #4221
2020-09-02 22:50:27 +01:00
Richard Davey
6aef37572d
WebGLRenderer.previousPipeline
is a new property that is set during a call to clearPipeline
and used during calls to rebindPipeline
, allowing the renderer to rebind any previous pipeline, not just the Multi Pipeline.
...
The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well.
2020-09-01 13:05:31 +01:00
Richard Davey
809b8a41d9
The WebGLRenderer.updateCanvasTexture
method will now set gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL
to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064
2020-08-26 00:19:19 +01:00
Richard Davey
791704febe
WebGLRenderer.finalType
is a new boolean property that signifies if the current Game Object being rendered is the final one in the list.
2020-08-25 18:24:42 +01:00
Richard Davey
de0133e3cc
Spine Game Objects can now be rendered to Render Textures. Fix #5184
2020-08-25 14:11:37 +01:00
Richard Davey
ca99c4564f
Added reset
property to Bind to get new vertex attrib locations
2020-08-25 13:24:56 +01:00
Richard Davey
0cd4d0fc54
Update WebGLRenderer.js
2020-08-21 16:23:04 +01:00
Richard Davey
0dd07333af
Updated to use MultiPipeline
2020-08-21 16:14:59 +01:00
Richard Davey
209b39b38c
New pipeline names and single texture flag
2020-08-21 16:03:29 +01:00
Richard Davey
84ef02743b
The WebGL Renderer will now add the pipelines during the boot
method, instead of init
.
2020-08-20 10:48:30 +01:00
Richard Davey
75da5b2f22
Reset all textures on rebind, which is what Externs need when finishing
2020-08-06 17:06:26 +01:00
Richard Davey
4baa0522b9
Bumping to 3.50
2020-07-31 13:41:29 +01:00
Richard Davey
c31a9ad4e5
WebGLRenderer.unbindTextures
is a new method that will activate and then null bind all WebGL textures.
2020-07-23 16:24:44 +01:00
Richard Davey
8210700124
Enable the pipelines again
2020-07-17 17:04:49 +01:00
Richard Davey
8d976d6ed5
WebGLRenderer.textureFlush
is a new property that keeps track of the total texture flushes per frame.
2020-07-17 16:36:18 +01:00
Richard Davey
fea1ade5b7
Update WebGLRenderer.js
2020-07-16 16:59:45 +01:00
Richard Davey
12fc51e2e2
If normal map set, advance the current active texture
2020-07-16 16:17:16 +01:00
Richard Davey
85f63c4a19
WebGLRenderer.isNewNormalMap
is a new method that returns a boolean if the given parameters are not currently used.
2020-07-16 15:11:43 +01:00
Richard Davey
93d0378143
Added missing jsdocs
2020-07-16 11:03:49 +01:00
Richard Davey
3b9d115d0c
Reset just units 0 and 1
2020-07-16 03:13:47 +01:00
Richard Davey
1f3b79cf11
Normal map additions
...
* `WebGLRenderer.normalTexture` is a new property that holds the currently bound normal map (texture unit one).
* `WebGLRenderer.setNormalMap` is a new method that sets the current normal map texture.
* `WebGLRenderer.clearNormalMap` is a new method that clears the current normal map texture.
* `WebGLRenderer.resetTextures` is a new method that flushes the pipeline, resets all textures back to the temporary ones and resets the active texture counter.
2020-07-16 02:15:01 +01:00
Richard Davey
94d333ee1e
Use new texture unit
2020-07-16 00:00:49 +01:00
Richard Davey
9e9e45261f
Added setTextureZero and clearTextureZero
...
* `WebGLRenderer.setTextureZero` is a new method that activates texture zero and binds the given texture to it. Useful for fbo backed game objects.
* `WebGLRenderer.clearTextureZero` is a new method that clears the texture tha was bound to unit zero.
* `WebGLRenderer.textureZero` is a new property that holds the currently bound unit zero texture.
2020-07-15 18:03:03 +01:00
Richard Davey
216d7cb1fa
Updated WebGLRenderer to support new texture assignment
...
* The property `WebGLRenderer.currentActiveTextureUnit` has been renamed to `currentActiveTexture`.
* `WebGLRenderer.startActiveTexture` is a new read-only property contains the current starting active texture unit.
* `WebGLRenderer.maxTextures` is a new read-only property that contains the maximum number of texture units WebGL can use.
* `WebGLRenderer.textureIndexes` is a new read-only array that contains all of the available WebGL texture units.
* `WebGLRenderer.tempTextures` is a new read-only array that contains temporary WebGL textures.
* The `WebGLRenderer.currentTextures` property has been removed, as it's no longer used.
* `WebGLRenderer.currentTextures` has been removed, as it's no longer used internally.
* `WebGLRenderer.setBlankTexture` no longer has a `force` parameter, as it's set by default.
* `WebGLRenderer.setTextureSource` is a new method, used by pipelines and Game Objects, that will assign a texture unit to the given Texture Source.
* The `WebGLRenderer.setTexture2D` method has been updated to use the new texture unit assignment. It no longer takes the `textureUnit` or `flush` parameters and these have been removed from its method signature.
2020-07-15 17:11:01 +01:00
Richard Davey
9a45517efd
Pass max textures to pipeline (disable other pipelines for now)
2020-07-14 17:44:17 +01:00
Richard Davey
0003d278fd
Updated to use new external MVP functions
2020-07-14 16:49:30 +01:00
Volodymyr Linyvyi
8d217d53fa
Set TextureTintPipeline on each 'postRenderCamera' call
2020-04-19 18:44:03 +03:00
Richard Davey
03ee36f9ba
Finished JSDocs
2020-02-04 17:30:27 +00:00
Richard Davey
0eaf0c47b5
Respect Camera.renderToGame property
2020-01-27 23:35:52 +00:00
Richard Davey
0af1303ba2
Added TextureTintStrip pipeline
2020-01-17 17:38:24 +00:00
Richard Davey
ff65e69cd1
Changed copyright date to 2020
2020-01-15 12:07:09 +00:00
Richard Davey
7d53dc3447
Added support for mipmap texture generation and filter levels
2019-11-19 13:00:54 +00:00
Richard Davey
61f5fadddf
Split up canvas and video texture creation and updating.
2019-10-10 12:26:39 +01:00
Richard Davey
5de4641e49
Added jsdocs
2019-10-04 11:13:05 +01:00
Richard Davey
49012d6237
Added createTexture2D.forceSize parameter, videoToTexture method and strengthened empty texture creation
2019-10-03 17:49:58 +01:00
Richard Davey
e3039ffb64
Added antialiasGL
option
2019-08-29 11:46:58 +01:00
Richard Davey
f4002471d7
Updated context lost / restored handlers
2019-07-17 16:38:00 +01:00
Richard Davey
630382e88d
Added Game Object type look ahead and state for custom batching.
2019-07-16 17:41:08 +01:00
Richard Davey
58865f2c34
The WebGL Lost and Restored Context callbacks were never removed, which could cause them to hold onto stale references. Fix #3610
2019-07-15 15:28:46 +01:00
Richard Davey
15d7b9c6ef
Fixed jsdoc typos and added single pixel support
2019-07-14 13:56:44 +01:00
Richard Davey
285babaf8c
Added the new snapshotFramebuffer method
2019-07-13 15:20:57 +01:00
Richard Davey
79b2048ae0
Fixed addBlendMode type. Fix #4625
2019-06-28 14:53:12 +01:00
Richard Davey
3bf3057da0
WebGLRenderer.setScissor
will default the drawingBufferHeight
if no argument is provided, stopping NaN scissor heights.
2019-06-25 23:03:57 +01:00
Richard Davey
254eef9787
Use the event constant instead of a string
2019-06-06 15:56:45 +01:00
Richard Davey
12bcda98a6
Added support for a desynchronized context and alpha support in 2D
2019-06-04 19:13:49 +01:00
Richard Davey
c91ed91ce3
License link update
2019-05-10 16:15:04 +01:00
Richard Davey
a6341a97a8
Fixed Types references
2019-05-09 15:32:53 +01:00
Richard Davey
11d6f2e802
Renderer Types
2019-05-09 12:36:36 +01:00
Richard Davey
3d40a95a00
Added glFuncMap
2019-05-01 12:29:45 +01:00
Richard Davey
84e898fd90
Fixed nested bitmap mask issue
2019-04-29 14:45:54 +01:00
Richard Davey
3efcd1ca49
New cam mask object
2019-04-29 14:28:58 +01:00
Richard Davey
cf878ca553
Better stencil mask checking
2019-04-26 19:13:24 +01:00