Is your feature request related to a problem? Please describe.
Hi I was digging mesh generation, and came to
|
static CustomNodeDesc<TProceduralModel> NewMeshNode<TProceduralModel, TKey>(this IVLNodeDescriptionFactory factory, Func<TProceduralModel, TKey> getKey, string category = "Stride.Models.Meshes", string name = null, ImmutableArray<string> tags = default) |
So I attempted to us similar pattern for my process (note this raw unfinished code):
[ProcessNode]
public abstract class BezierSurfacewModelNode<T> : IDisposable
where T : struct
{
// ...
protected virtual void Generate()
{
var gameProvider = AppHost.Current.Services.GetGameProvider();
var surface = Surface;
var tessellation = Tesselation;
var key = (gameProvider, typeof(BezierSurfaceModel<T>), surface, tessellation);
var provider = ResourceProvider.NewPooledSystemWide(
key,
_ =>
{
return gameProvider.Bind(game =>
{
var model = new StrideModel();
var generator = new BezierSurfaceModel<T>(surface, tessellation);
generator.Generate(game.Services, model);
return ResourceProvider.Return(
model.Meshes[0],
m => m.ReleaseGraphicsResources() // <-- Getting error...
);
});
}
);
var meshHandle = provider.GetHandle();
_meshDisposable.Disposable = meshHandle;
Output = meshHandle.Resource;
}
// ...
public void Dispose()
{
_meshDisposable.Dispose();
}
}
So the issue seems to be two methods marked internal:
|
internal static void ReleaseGraphicsResources(this Mesh mesh) |
|
internal static void ReleaseGraphicsResources(this StrideModel model) |
Describe the solution you'd like
I don't think it unsafe to have those methods public.
Describe alternatives you've considered
Currently gonna copy paste to lib code...
Is your feature request related to a problem? Please describe.
Hi I was digging mesh generation, and came to
VL.StandardLibs/VL.Stride.Runtime/src/Rendering/RenderingNodes.cs
Line 263 in af420fa
So I attempted to us similar pattern for my process (note this raw unfinished code):
So the issue seems to be two methods marked internal:
VL.StandardLibs/VL.Stride.Runtime/src/Rendering/Models/ModelHelpers.cs
Line 97 in af420fa
VL.StandardLibs/VL.Stride.Runtime/src/Rendering/Models/ModelHelpers.cs
Line 91 in af420fa
Describe the solution you'd like
I don't think it unsafe to have those methods public.
Describe alternatives you've considered
Currently gonna copy paste to lib code...