mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-21 18:11:11 +00:00
Add static glTF support (#14557)
Co-authored-by: Lars Mueller <appgurulars@gmx.de> Co-authored-by: jordan4ibanez <jordan4ibanez@users.noreply.github.com> Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
parent
8972c80d7d
commit
ac11a14509
47 changed files with 2863 additions and 28 deletions
|
@ -86,6 +86,17 @@ public:
|
|||
mesh buffer. */
|
||||
virtual IMeshBuffer *getMeshBuffer(const video::SMaterial &material) const = 0;
|
||||
|
||||
//! Minetest binds textures (node tiles, object textures) to models.
|
||||
// glTF allows multiple primitives (mesh buffers) to reference the same texture.
|
||||
// This is reflected here: This function gets the texture slot for a mesh buffer.
|
||||
/** \param meshbufNr: Zero based index of the mesh buffer. The maximum value is
|
||||
getMeshBufferCount() - 1;
|
||||
\return number of texture slot to bind to the given mesh buffer */
|
||||
virtual u32 getTextureSlot(u32 meshbufNr) const
|
||||
{
|
||||
return meshbufNr;
|
||||
}
|
||||
|
||||
//! Get an axis aligned bounding box of the mesh.
|
||||
/** \return Bounding box of this mesh. */
|
||||
virtual const core::aabbox3d<f32> &getBoundingBox() const = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue