3D Module
Nicholas Kingsley (2769) 31 posts |
Is there a 32-bit 3D module around ? I remember there being one for 3.1 (I think it was called RGL), as I used it in my Walker2 game. |
Uwe Kall (215) 120 posts |
Hi Nicholas. I once wrote a triangle list module intended for 3D but I think the module you are mentioning was more sophisticated? Can you tell something about the interface level/ operation basics of that module please? Best regards, Uwe |
Nicholas Kingsley (2769) 31 posts |
RGL is short for RealTimeGraphicsLanguage – I used it for the intro for my !Walker2 game. It was by Silicon Vision, and had lighting and various shading options. Objects were made up from different shapes. Unfortunately its not 32-bit compatible… |
Raik (463) 2026 posts |
Sure? RGL I not know but maybe you mean Virtual Reality Modeling Language (VRML)? !VMRLeyes was the free viewer. |
Nicholas Kingsley (2769) 31 posts |
Quite certain it was RGL. Some of the code for the intro sequence is : SYS “RGL_INIT”,SP% :REM Init RGL and specify object data address FOR I%=140 TO 55 STEP -2 FORI%=1TO50:SYS6,19:NEXT |
Raik (463) 2026 posts |
Sorry, it takes a while… you mean RiscGeL. |
Nicholas Kingsley (2769) 31 posts |
Ah – sound like the one. |
Nicholas Kingsley (2769) 31 posts |
Had anyone tried converting the Trenki 3D system (http://www.trenki.net/content/view/18/1/) to RISCOS ? As it uses SDL1, it should be quite possible… |
Raik (463) 2026 posts |
I have look at a 3DEngine after I back at home. |
Nicholas Kingsley (2769) 31 posts |
Trenki3D could be rather good – I’ve converted it to SDL2 (Windows of course) and it has a very decent speed. Plus it has texture mapping, lighting and whatnot. Its just a matter of getting used to it… |
Jeffrey Lee (213) 6046 posts |
I’ve heard rumours of there being a GL driver for the Pi but I’m not sure if that’s just wishful thinking on my part (the source code has been available for quite some time, it “just” needs someone to port it to RISC OS). In a perfect world we’d have a GL driver module for the Pi and a GL driver module for software rendering (or one GL driver module and multiple backends). But since it’s so hard to get good performance out of software GL implementations (just look at Mesa) I doubt that would really be feasible. So maybe the better approach would be a library which implements software rendering and can be optimised on a per-game basis (like the Trenki stuff) but is capable of calling through to a GL driver module if hardware acceleration is available. Although even Trenki isn’t perfect (I think it’s safe to assume that most people will be using machines with NEON, so a NEON-optimised software renderer which uses floats for most calculations would probably be faster, easier to work with, and more reliable than one which has been optimised for a 15+ year old integer-only CPU). If I had all the time in the world… |
Raik (463) 2026 posts |
There is a OpenGl experimental hardwaredriver for the Pi2 in Raspbian. I use it for my projects with FreeCAD. Is very fast but need a lot of memory. Thats the reason why it only works with the Pi2 (and 3). |
Nicholas Kingsley (2769) 31 posts |
So far (on Windows at the moment at least), Trenki3D generally works, but at the moment, I’m having trouble getting it to correct display a plane (from two triangles), and having to get the systems programmer to help – which does bring up the main problems with Trenki3D – no documentation and the comments in the source dont actually help :) |
Nicholas Kingsley (2769) 31 posts |
Solved my coding problem :) Can now proceed… |
Alan Buckley (167) 232 posts |
Lee Noar ported the Khronos driver for the Raspberry Pi. It is checked into the GCCSDK autobuilder. I built it and tried it briefly on my Raspberry Pi a while ago and it seemed to work. I don’t know what the current state of it is though. |
Jeffrey Lee (213) 6046 posts |
Looks like there are a couple of nasty bits where it’s peeking at internal definitions, so that’s probably something we should work to clean up. I should probably get in touch to find out what his long-term plans are. |
Nicholas Kingsley (2769) 31 posts |
Yes, would be a good idea. |
Nicholas Kingsley (2769) 31 posts |
Could someone try this !Squash file (Triority) on a proper machine. This is a very quick test of my processing system and the Trenki3D system in particular. The emulator is unfortunately too slow to render it all smoothly, and I just want to know whether real machines have a problem with speed or not… The program is, I think, 32-bit only and needs SDL1. It is an ELF app A quick piccie of it : https://drive.google.com/open?id=0Bzff3iRdz9JqLUNMV1lEM1RPbVU |
Chris Mahoney (1684) 2100 posts |
It runs at about one frame per second on my Pi 1 :( |
Nicholas Kingsley (2769) 31 posts |
I was afraid that might happen… I might try it with plotting pixels directly rather that use SDL_gfx in case it is continually locking and unlocking the screen – in which case there may be a substantial speed increase (hopefully) |
Tristan M. (2946) 1036 posts |
I tried to build it with the 4.x dev GCCSDK. Bits and pieces of the patching for the khronos package failed. Looks like some examples and some bits of khronos proper. |