Closed uriid1 closed 3 years ago
But why?
But why?
To improve the usability. In addition, it may slightly reduce the calculations in resources.
In some engines, for example, love2d, we can do this more efficiently. (https://love2d.org/wiki/love.graphics.stencil)
This is certainly not a correct comparison.
dxCreateRenderTarget
returns a texture which has to be drawn every frame (onClientRender
) using dxDrawImage
.
The render target texture itself has no knowledge of position, and doesn't need to, since that information is supplied when displaying the texture with dxDrawImage
.
If you can provide a valid use-case where you need to set an initial offset position for the render target then feel free (although again, that can be done when displaying the texture with dxDrawImage
) - otherwise I think this can be closed as invalid.
In function:
X and Y arguments are missing.
And this worsens the use of the dxCreateRenderTarget function, since X and Y are defined in 0 coordinates, i.e. in the upper-left corner of the window.
Maybe you can extend the function to:
If I understand correctly how it works, of course, and if it doesn't break anything, of course.
As a result, users could get: element dxCreateRenderTarget(int x, int y, int width, int height [, bool withAlpha = false ]);
UPD: I understand that you may say "This is the implementation that will break the function for players who have used it before". And if this is critical, you can add X and Y as optional arguments.
With respect to the project.:)