OpenB3D - 'working' version - please test!

BlitzMax Forums/MiniB3D Module/OpenB3D - 'working' version - please test!

BlitzSupport(Posted 2016) [#1]
Hi all, I've attempted to put a 'working' copy of Munch/markcw's OpenB3D Wrapper online at https://github.com/DruggedBunny/openb3d.mod/releases

Munch stopped working on the wrapper, but the last version at https://github.com/markcwm/openb3d.mod doesn't work, so it would be nice to have an easy way to access a working release.

This release is an older branch with a few minor fixes/additions, and should build in bmx-ng once installed as mod\openb3d.mod. I removed my copy of the module, downloaded the release version at the top and ran some of the examples without any problems.

(Oddly, it doesn't appear to have ever built for me in 'vanilla' BlitzMax, but I would like to know if others get the same "undefined reference" errors that I do -- or solutions to same!)

I'm not a real programmer, so if it doesn't work, or if you find any bugs (there are quite a few lurking, I believe), then please don't expect much from me! This is intended as an easy way to access a working, or at least building -- in bmx-ng -- copy.

Back up your existing openb3d.mod if already installed!

Have a look at the Status section of the readme on https://github.com/DruggedBunny/openb3d.mod to get an idea of changes, plus guidance on easy access to bmx-ng, etc.


RustyKristi(Posted 2016) [#2]
This is nice James, good share! Actually I have no problems with mark's repo and so if you're not familiar with github, just 2-3 steps will provide you with the download link (if you're not using git console and head command.)

1. Click on commits link (120 is the latest count), Find the last version before any GLES mention which is May 7th. This is again before where the discontinued upgrade and issues first appeared.
2. At the right, just click browse files
3. Then just click on the normal download the link.

(Oddly, it doesn't appear to have ever built for me in 'vanilla' BlitzMax, but I would like to know if others get the same "undefined reference" errors that I do -- or solutions to same!)


Actually, munch's wrapper is specifically built for vanilla, NG has its own version and is a bit outdated and I have mentioned about this before, I think Brucey can confirm on this.

Anyway, so here's the officially repo for NG: https://github.com/bmx-ng/b3d.mod

I won't be surprised with different versions since NG is now on a different path and a lot more going on.


BlitzSupport(Posted 2016) [#3]

munch's wrapper is specifically built for vanilla, NG has its own version and is a bit outdated



Strange, as I'm not using the ng version of the mod, so I wonder why it won't build in vanilla for me. I'm using a version of markcw's that I think you might have posted the link to!


1. Click on commits link (120 is the latest count), Find the last version before any GLES mention which is May 7th. This is again before where the discontinued upgrade and issues first appeared.
2. At the right, just click browse files
3. Then just click on the normal download the link.



Er, yeah, this a half the reason for 'my' version!

Really odd that it doesn't build for me on 'vanilla' -- I even built within a Windows shell with custom paths set to the 32-bit MinGW. Maybe I need to try the actual branch I started from, but I don't get why my updated release would cause build errors in actual applications. (The mod itself builds no problem!)


RustyKristi(Posted 2016) [#4]
Strange, as I'm not using the ng version of the mod, so I wonder why it won't build in vanilla for me. I'm using a version of markcw's that I think you might have posted the link to!

Really odd that it doesn't build for me on 'vanilla' -- I even built within a Windows shell with custom paths set to the 32-bit MinGW. Maybe I need to try the actual branch I started from, but I don't get why my updated release would cause build errors in actual applications. (The mod itself builds no problem!)




Ok I see and that's really unexpected. Yes, you should try pulling out the latest working commit version that I posted, so far that worked for me when I need a clean install.


Really odd that it doesn't build for me on 'vanilla' -- I even built within a Windows shell with custom paths set to the 32-bit MinGW. Maybe I need to try the actual branch I started from, but I don't get why my updated release would cause build errors in actual applications. (The mod itself builds no problem!)



I'm using 4.8.1 32bit for vanilla if that helps.


BlitzSupport(Posted 2016) [#5]

I'm using 4.8.1 32bit for vanilla if that helps.


Ah, of course! I'll try that, never even occurred to me...


RustyKristi(Posted 2016) [#6]
Ah good, that figures! Maybe that's why with NG it works for you because it requires higher MingW version. I'm using 5.1 with NG btw.

If I remember correctly you will still encounter some issues if you get serious with openb3d+ng unless you use the specific version that Brucey made.


feeble1(Posted 2016) [#7]
@BlitzSupport Have you been able to run all of the examples on NG?


BlitzSupport(Posted 2016) [#8]
I know quite a few don't build on NG, but I think most of the errors are of the "unable to find overload for float/double" kind, which will be easy enough to fix. It'll give me something useful to do, as well as a first Github update experience! Maybe at the weekend...


RustyKristi(Posted 2016) [#9]
@feeble

take note that with NG, it will only run on desktop builds as GLES is currently not working, so I guess the only advantage is having a 64bit build.


feeble1(Posted 2016) [#10]
Very limited things seem to run fine, I am not sure if you have ever gotten ifsoGui to play nice with NG.

@RustyKristi, 64 bit is still pretty nice, just to have the extra RAM to play with.


BlitzSupport(Posted 2016) [#11]
Just found a cool way to build all examples in a folder from command line, using the Windows "forfiles" command (apparently in Windows 7 upwards) -- might be of use to others, though this assumes each .bmx file to be a standalone program (ie. no .bmx include files), as is the case with the OpenB3D examples. I'm using NG, so note that the output shows it building the modules as needed.

Example running from command line within the "mod\openb3d.mod\examples\blitz3d" folder:


forfiles /m *.bmx /c "cmd /c bmk makeapp @file"



Broken down, this is:


forfiles -- the command
/m *.bmx -- mask (look for .bmx only in this case)
/c -- command to run

"cmd /c bmk makeapp @file"

This runs a new command line instance (cmd), where cmd's /c parameter auto-runs the command that follows, which is the normal bmk makeapp with filename filled in by forfiles (@file). I believe you can account for spaces with \"@file\"" -- that is, backslashed quotes around @file. Not sure why you can't run bmk directly without cmd /c, but you can't.



Off to try adding the /s (recurse into folders) to see if I can build all directories in one go!



Thought it worth posting anyway, should save me some time. forfiles is awesome!


BlitzSupport(Posted 2016) [#12]
It's even awesomer running from the \examples directory with /s added just after forfiles, builds all examples in one go and I can launch each one from Explorer as it's built. Errors get noted but it moves on to the next build anyway.

[Later]
The command below (silently) redirects all output to a logfile, so upon running forfiles again after building all, I now have a list of build errors just for those that failed:


forfiles /s /m *.bmx /c "cmd /c bmk makeapp @file" > buildlog.txt 2>&1


That horrible 2>&1 -- not a typo or formatting error! -- is redirecting stdout and stderr redirection to the same file.