Conversation
- Add Renderer.CreateImage() - Add Renderer.RenderToSurface() - Add Temporary Image.Render()
- Add Renderer.GetShaderByType() - Add Renderer.GetPixelationAmount() - Add Renderer.GetClipPaneNormal() - Add Renderer.GetClipPaneThreshold() - Finalize Image.Render() - Add Image.RenderWithShader() - Add Image.GetWidth() - Add Image.GetHeight() - Add Image.GetPaddedWidth() - Add Image.GetPaddedHeight() - Add DestinationQuad.__tostring() - Add DestinationQuad.Translate() - Add DestinationQuad.Scale() - Add DestinationQuad.Rotate() - Add DestinationQuad.Shear() - Add DestinationQuad.ApplyMatrix() - Add DestinationQuad.Flip() - Add SourceQuad.ConvertToPixelSpace() - Add SourceQuad.ConvertToUVSpace() - Specialize SourceQuad.__tostring()
- Add Renderer.LoadShader() - Add Renderer.VertexAttributeFormat enum. - Disable unused Renderer classes constructors.
- Fix messed up pointer arithmetic in Shader constructor.
- Add Image.GetTexelRegion() - Add Image.GetName()
Add additional checks when using ANM2 custom shaders.
- Add DestinationQuad.Copy() - Add SourceQuad.Copy() - Add SourceQuad.IsUVSpace()
- Remove leftover logic which accounted for the 3rd row.
| return 1; | ||
| } | ||
|
|
||
| LUA_FUNCTION(Lua_Renderer_RenderToSurface) { |
There was a problem hiding this comment.
Should this be called RenderToImage? (Actually just asking)
For our lua API purposes it seems like the target is always known as an Image
There was a problem hiding this comment.
I've mostly seen render targets either being defined as RenderTexture or Surface in other APIs.
In our case not every image is a valid render target, so maybe we should change CreateImage into CreateSurface?
There was a problem hiding this comment.
Due to the Image userdata class I think it's fine to keep CreateImage named as-is. The distinction doesn't seem to be super important. I think Image is generally an intuitive name for that class.
So per our lua APIs you will be rendering to Images, but if you're content with the current naming of RenderToSurface its not a huge deal.
Renderer,ImageandQuadclasses, primarily focused on enabling rendering using low-level images and custom shaders.Renderer.LoadShadermethod, and it replaces the old loader for ANM2 Custom Shaders.Added Lua Methods: