defun-games / claylib

A Common Lisp 2D/3D game toolkit built on top of Raylib 4.5.
zlib License
73 stars 4 forks source link

Certain GEN-MESH-* functions are broken #16

Closed shelvick closed 2 years ago

shelvick commented 2 years ago

In core example 24, we're using gen-mesh-cube because gen-mesh-cylinder gave me floating point errors. This also occurred with some of the other functions, like gen-mesh-cone, gen-mesh-sphere, and gen-mesh-torus, run directly via claylib/ll.

At one point I thought maybe Autowrap was using a double float for pi while Raylib was expecting a single float. After spending more time than I care to admit figuring out how to redefine pi, I was unable to prove this -- most likely a red herring but I couldn't completely rule it out either.

Curious whether it works for you, @mjkalyan. To test, all you have to do is replace the gen-mesh-cube call in core example 24 with a gen-mesh-cylinder call.

mjkalyan commented 2 years ago

Replacing with (gen-mesh-cylinder 0.2 1 32) also gives me a floating point error. Sadly I don't have any other insight at this time.

shelvick commented 2 years ago

https://github.com/raysan5/raylib/commit/bf07d17cece1421af6227a3e8c823aec58131b36 :thinking:

shelvick commented 2 years ago

Fixed in 4.2 branch.