I’m looking for a convinient class that would help me building multiple static meshes proceduraly, using a single vertex/index buffer. Something practical that would help me adding vertices/indices, while keeping track of the offsets of every meshes. Idealy something that would track duplicated vertices, that would adjust the buffers in an optimal way.
Something I would call a “MeshBuilder”, is there something dedicated for this?
There is in XNA and IIRC there is a PR that started on the implementation, but the person that set up the PR got busy and never got back to it. Let me search for it
No worries, just helps create a resourceful environment when help is clear for new entrants we cannot assume everybody is familiar with even what the meaning of Platforms is without them thinking it is a pair of shoes
@Jjagg it is indeed exactly what I need
How comes it’s not implemented? I thought Monogame was a 99% XNA implementation. Well the question now is whether I should try this unfinished PR.
So you really think beginners need to know what a PR is?
Maybe people can use this on Windows if they’d like for now, but for the implementation in the core the audio frameworks we have in place should be used. XAudio2 for WinDX, OpenAL for GL platforms, MediaRecorder for Android, AVAudioRecorder for iOS… I think the implementations are pretty straightforward. It’s just that no one has taken the time to implement it yet.
@Jjagg If there was a guide to assist with implementation, it might actually happen, I found this an issue with my previous ‘platform’ toolset too, a lot of talk about using DLLs but there was never a solid guide or explanation, this resulted in the authors ending the platform too [Not because of the lack of documentation but it would have helped create more things if only they bothered making Modding easier…]
I have no idea what is involved with making MonoGame work, even if I had the skills to actually develop it… without a guide, only a select few can contribute… this is true of any project…
I guess we both agree on this
EDIT
Hate this reply system… the Reply to post button should just be removed…
I need a class that allows me to create multiple sub-meshes, declared using a AddSubMesh, and AddTriangle() method, when done it compiles a single Vertex/IndexBuffer, without duplicates, and returns a collection of MeshModelPart all pointing to the same Vertex/Index buffer.
The XNA implementation isn’t what I’m really looking for, as it returns a MeshContent while I’m looking for ModelMeshPart.
But now I’m discovering the MeshContent class, and it’s puzzling me, as it doesn’t seem to use ModelMeshPart.
MeshContent looks weird to me, as it seems more like some sort of ‘SceneGraphNode’ coupled with mesh data.
Anyone knows the history of this? it looks inconsistent with the ModelMesh approach.
The *Content classes represent data in an intermediate, design-time format in the Content Pipeline. I don’t think any are used at runtime.
MeshContent is used to build ModelMeshContent which “Stores design-time data for a ModelMesh asset”. ModelMeshContent has the MeshParts property, this is a basically just a collection of ModelMeshPartContent. ModelMeshPartContent in turn “Stores design-time data for a ModelMeshPart asset”.
It’s not completely clear from the documentation, but I think the MeshParts get populated when ModelMeshContent is created. The docs say that the ModeMeshContent property SourceMesh (of type MeshContent) is the “MeshContent source object used when creating this class”. That seems to imply it’s used to build the class but does not contain essential data after that. So my guess is the data in there is put in the MeshParts. I’m not sure if I got all that right, but that’s how I interpreted the docs.