How would I go about drawing simple 3D shapes in 11.0? [Solved!]
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
How would I go about drawing simple 3D shapes in 11.0? [Solved!]
11.0 adds a bunch of new features to be used from shaders for supporting depth buffers, but I don't have any clue how I'd actually use them. Are there any examples out there or something to get me started?
Last edited by MarkSill on Mon Apr 23, 2018 1:41 am, edited 1 time in total.
Heyo, I'm MarkSill. I'm a programmer, and I like chips with salsa.
Re: How would I go about drawing simple 3D shapes in 11.0?
I've been working on trying to get it to work, and I've been making progress. I've been trying to adapt the love3d demos' code to work in my environment.
Doing the calculations outside of the shader code seems to suggest that it should be drawing something, but it's not.
(The drawn lines are drawn outside of the shader. Note the Z coordinates of the vertices, which seem to be much larger/smaller than they should be.)
GitHub repo containing my test code: https://github.com/MarkSill/love-3d-test
Doing the calculations outside of the shader code seems to suggest that it should be drawing something, but it's not.
(The drawn lines are drawn outside of the shader. Note the Z coordinates of the vertices, which seem to be much larger/smaller than they should be.)
GitHub repo containing my test code: https://github.com/MarkSill/love-3d-test
- Attachments
-
- test.love
- (151.95 KiB) Downloaded 196 times
Heyo, I'm MarkSill. I'm a programmer, and I like chips with salsa.
Re: How would I go about drawing simple 3D shapes in 11.0?
After fiddling with my matrix function, I got it to work! I'm not sure what the issue was, but now I've got a 3D triangle.
Also, turns out my calculations seem to have their Y coordinate flipped.
If you want to see how it works, you can visit the GitHub repo: https://github.com/MarkSill/love-3d-test
(Also, sorry for the triple post. I forgot the edit feature was a thing until after I'd already posted....)
Also, turns out my calculations seem to have their Y coordinate flipped.
If you want to see how it works, you can visit the GitHub repo: https://github.com/MarkSill/love-3d-test
(Also, sorry for the triple post. I forgot the edit feature was a thing until after I'd already posted....)
- Attachments
-
- test.love
- (286.37 KiB) Downloaded 178 times
Heyo, I'm MarkSill. I'm a programmer, and I like chips with salsa.
Re: How would I go about drawing simple 3D shapes in 11.0? [Solved!]
There are two problems you may have run into; one is https://github.com/excessive/cpml/issues/33 and the other is viewtopic.php?p=219678#p219678
Re: How would I go about drawing simple 3D shapes in 11.0? [Solved!]
Yeah, I did run into that. The makeProper function reorders the matrix.pgimeno wrote: ↑Mon Apr 23, 2018 9:28 am There are two problems you may have run into; one is https://github.com/excessive/cpml/issues/33 and the other is viewtopic.php?p=219678#p219678
Heyo, I'm MarkSill. I'm a programmer, and I like chips with salsa.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests