1

In The Ray lib Cheat sheet I cant see anyway of importing a 3D model. I have tried searching online but haven't found anything

TheBeeDev
  • 21
  • 2

2 Answers2

1

Yes you can. To do so, use the LoadModel(const char *fileName); function.

As of version 4.2.0, it supports the following formats.

  • Wavefront (.obj)
  • MagicalVoxel (.vox)
  • Inter-Quake Model (.iqm)
  • glTF (.glTF)

The LoadModel function will automatically detect the file type.

See the models section of Raylib Github Examples page.

There are a variety of tools that can be used to generate these. Blender 3.2.2 has the ability to export models in Wavefront format built in. There may be plugins for the other file formats.

R Schultz
  • 486
  • 5
  • 10
0

Check the examples. There are 3D model imports. You can also load Textures into memory. After that check the cheat sheet again.

Abyzls
  • 33
  • 6