The B3D loader example.

BlitzMax Forums/BlitzMax Programming/The B3D loader example.

dangerdave(Posted 2004) [#1]
Has anyone tried the b3d loader example? Have you seen any problems with it? Is it loading all of the b3d files you have?

(I keep asking questions as i don't have a mac and therefore cannot see for myself)

Thanks.


SSS(Posted 2004) [#2]
works great here

if you wanna know 104 fps on a 256 MB, 667 Mhz,powerbook G4,
so really good


TeraBit(Posted 2004) [#3]
It works fairly well, the 3D engine demo is the one that has the most advanced B3D loader (at least of my examples), it handles multiple hierarchy multi surface, multi textured and alpha transparent models.

The main thing it doesn't deal with is animation in any shape or form. But it's just a 'Look what you can do even without a 3D engine' demo. ;)


Knotz(Posted 2004) [#4]
This example crashes on my comp (iBook g3 500Mhz, 256Mb, OSX 10.2), as does the GLCube example. Dunno if it it the iBook or BlitzMax, i suspect the shitty support for OGL on the iBook.


TeraBit(Posted 2004) [#5]
I suspect the shitty support for OGL on the iBook.


I was under the impression that OSX was OpenGL all the way. Try messing around with the examples and see if you can work out where it dies. I don't have a Mac, so I can't comment. :/


Knotz(Posted 2004) [#6]
This is the error i get:

Unhandled exception: Ateemp to access a field of method of a null object

Console:
Compiling:glhead.bmx
Linking:glhead.debug
ld: warning dynamic shared library: /System/Library/Frameworks/IOKit.framework/IOKit not made a weak library in output with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
Executing:glhead.debug
Unhandled Exception: Attempt to access field or method of Null object
ReadByte [$BMXPATH/mod/brl.mod/stream.mod/stream.bmx;506;2]
ReadChunk [$BMXPATH/samples/TeraBit/GLhead/b3dloader.bmx;130;1]
ReadB3D [$BMXPATH/samples/TeraBit/GLhead/b3dloader.bmx;11;1]
glhead [$BMXPATH/samples/TeraBit/GLhead/glhead.bmx;42;1]

This is on my iBook (G3 500Mhz, 10.2 and the December 2002 Dev Kit)


<EDIT>Found the problem, unix is case sensitive for filennames. The sample tries to load "head.b3d" while the file is named "Head.B3D".</EDIT>


BlitzSupport(Posted 2004) [#7]
That's a bit odd, as it works here without change, on 10.3 at least.


Knotz(Posted 2004) [#8]
see here:

http://www.blitzbasic.com/Community/posts.php?topic=41285


ImaginaryHuman(Posted 2004) [#9]
Hello fellow blitzmax'ers.

I have a similar (possibly) problem on my similarly spec'd ibook. It's a G3 300Mhz ibook with 288mb ram and osx panther 10.3.6.

none of the sample programs run. They all bomb out as soon as a screen has been opened.

I found that the following program:

Graphics 800,600

Bombs out with the following error:

"Unable to calculate tex size"

and the io window is as follows:

Compiling:untitled1.bmx
Linking:untitled1.debug
Executing:untitled1.debug
Unhandled Exception: Unable to calculate tex size
AdjustTexSize [$BMXPATH/mod/brl.mod/glmax2d.mod/glmax2d.bmx;114;27]
CreateFromPixmap [$BMXPATH/mod/brl.mod/glmax2d.mod/glmax2d.bmx;189;3]
CreateFrameFromPixmap [$BMXPATH/mod/brl.mod/glmax2d.mod/glmax2d.bmx;350;3]
Load [$BMXPATH/mod/brl.mod/max2d.mod/image.bmx;42;3]
CreateDefault [$BMXPATH/mod/brl.mod/pixmap.mod/pixmap.bmx;121;3]
Graphics [$BMXPATH/mod/brl.mod/max2d.mod/max2d.bmx;127;2]
untitled1 [$BMXPATH/tmp/untitled1.bmx;1;1]

Any ideas? Someone suggested unix case sensitivity but I have never reformatted this harddrive I don't think. How can I find out if that is the problem? In this program all I'm doing is opening a graphics display, there are no files being loaded extra.

??????????


BlitzSupport(Posted 2004) [#10]
Is 800 x 600 a supported resolution on the iBook? What happens with 640 x 480?

I'm in a bit of a hurry right now, but try calling GraphicsModeExists with the parameters you're trying to use for your display -- it'll return 0 if it's unavailable.


podperson(Posted 2004) [#11]
Works fine for me.

BlitzMax seems to require XCode (and not some previous version of the developer tools) to be installed. I don't know if XCode can be installed under 10.2 (it certainly requires a fairly up-to-date 10.2 if it can).

You should try 10.3.6 and XCode 1.5 if you can. (XCode is free from developer.apple.com.)

OSX is OpenGL all the way. If it boots, you have OpenGL. But that said, if your graphics card hasn't much memory, BlitzMax may kill it -- even the 2D graphics require significant video memory I believe.


ImaginaryHuman(Posted 2004) [#12]
James, 800x600 is normal on the ibook. GraphicsModeExists returns the width height depth and htz of the mode.. . although it returns htz as 0 instead of whatever it really is.


podperson(Posted 2004) [#13]
I've since been told on the realgurus.com forums (where BlitzMax has a lot of friends ;) ) that you can use the Dec 2002 Developer Tools if you're running 10.2.8.