explosiveduck / ed2d

Explosive Duck 2D
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

CSG Sphere does not render #2

Closed AlexMarinescu closed 9 years ago

AlexMarinescu commented 9 years ago

Creating a sphere to use with CSG is not rendering properly, subtract causes issues as well.

AlexMarinescu commented 9 years ago

Turns out that subtract function in CSG does not work between the two cubes, it could be a depth issue, or it could be a rendering issue like the sphere due to how the triangles get arranged.

AlexMarinescu commented 9 years ago

Looks like the indexer count and vertices count for the sphere object are not correct which most likely will cause the rest of the issues.

mdsitton commented 9 years ago

This is also probably related to issue #1 :P (Just thowing this here so the issue shows up in the other issue btw)

AlexMarinescu commented 9 years ago

So after further investigation, both cylinder and sphere csg functions have the same issues. In other words, vertices count is not actual therefore it will not upload correctly to the GPU. The cube function seems to work as expected but regardless I'm not sure what the cause is yet.

AlexMarinescu commented 9 years ago

Turns out the code is fine except when you run it with python 2.x the cylinder and sphere code do not work due to some changes that were made in python 3. So I will close this issue for now.