GLBasic forum

Main forum => Off Topic => Topic started by: MrTAToad on 2016-Apr-28

Title: Trenki3D
Post by: MrTAToad on 2016-Apr-28
As we all know, Gernot uses Trenki3D for the 3D stuff for the GP2X and the standard system does work  :



Unfortunately the documentation is non-existent and the comments for the code dont hope (or explain anything) - this is a bit of a problem as I'm trying to get my system to display a plane (with two triangles), but only half is displayed, which is weird (and annoying), so hopefully the author would be able to help.

The reason I'm interested in it, is that it might be interesting converting either Triority (or GLBasic) to RISCOS (which has no hardware rendering or floating-point  hardware - whilst it may seem a hinderance, it is no slouch in the 3D department) :

Title: Re: Trenki3D
Post by: Ian Price on 2016-Apr-28
Good luck :)
Title: Re: Trenki3D
Post by: MrTAToad on 2016-Apr-28
I finally figured out the problem.  As usual with C, the "easiest" problems are the hardest to find, namely :

Using
Code (glbasic) Select
{ vec3x(1,0,1) },{ vec3x(0, 0, 0) }, was incorrect (as it was storing the position in every other index).  Instead
Code (glbasic) Select
{ vec3x(1,0,1) , vec3x(0, 0, 0) }, should have been used ...

Spent 2 days on this  :whistle:
Title: Re: Trenki3D
Post by: erico on 2016-Apr-28
Nice project. So I assume 3d would work on the Caanoo? I tried it a long ago without success, I should be trying again anytime soon.
I like those flat polygons.
Title: Re: Trenki3D
Post by: MrTAToad on 2016-Apr-28
Yes, it should - at a decent speed too.  With GLBasic, it does seem that quite a few functions on the handhelds, won't, according to the source code, do anything - X_DRAWAXIS for example - I presume the idea was originally to add the code for it later.
Title: Re: Trenki3D
Post by: MrTAToad on 2016-Jun-12
Got the basics of Triority working on RISCOS now : https://m.youtube.com/watch?v=OCpbYToOEwQ

I'm hoping a proper machine will have much better FPS, but it does show that GLBasic could work on this machine