-
-
Notifications
You must be signed in to change notification settings - Fork 87
Texture.Update(Texture, uint, uint) not found? #223
Copy link
Copy link
Closed
Labels
Description
Tried to use the Texture.Update method to update from another texture, but got a C++ exception about missing entry point:
Exception thrown: 'System.EntryPointNotFoundException' in SFML.Graphics.dll
An unhandled exception of type 'System.EntryPointNotFoundException' occurred in SFML.Graphics.dll
Unable to find an entry point named 'sfTexture_updateFromTexture' in DLL 'csfml-graphics'.
SFML.Net/src/SFML.Graphics/Texture.cs
Lines 230 to 233 in f678eb2
| public void Update(Texture texture, uint x, uint y) | |
| { | |
| sfTexture_updateFromTexture(CPointer, texture.CPointer, x, y); | |
| } |
(Also looks like the overload without the x, y values and just taking the Texture directly is missing?)
Using NuGet package 2.5.0.
Code:
RenderTexture buff1 = new(800, 600);
Texture buff2 = new(800, 600);
// ... Draw stuff to buff1 ...
buff2.Update(buff1.Texture, 0, 0); // FailsI was creating a whole new Texture each time before (which works), but is eating memory and causing issues with Garbage Collection:
Sprite buff2Sprite = new();
buff2Sprite.Texture = new Texture(buff1.Texture);Is there some other way I should be doing this operation?
Reactions are currently unavailable
