Is there a flag for cube mode in the .b3d format?

Blitz3D Forums/Blitz3D Programming/Is there a flag for cube mode in the .b3d format?

JoshK(Posted 2004) [#1]
This should really be documented.


AntonyWells(Posted 2004) [#2]
If you mean the cube mapping mode of a texture, then no it's not in any of the standard documented chunks.

He may have added something new...but since b3d's are 'streamed' it's very unlikely, as it would almost definitely screw up existing loaders.


JoshK(Posted 2004) [#3]
It could be done with two flags in the texture structure, without changing the format.


Koriolis(Posted 2004) [#4]
No it wouldn't (well "shouldn't), because it is chunk based and every unrecognized chunk is supposed to be ignored. From the spec:
A file parser should ignore unrecognized chunks.

EDIT: it was a reply to Otacon.


fredborg(Posted 2004) [#5]
You can use the texture flags just as in regular blitz.


Koriolis(Posted 2004) [#6]
Sure but how are the six cube textures specified?
I guess that was the initial question.


AntonyWells(Posted 2004) [#7]
K, yes, but textures are already a seperate chunk. It's very unlikely imo mark would add an entirely new chunk type just to hold one flag.


fredborg(Posted 2004) [#8]
If the texture is in the standard cubemap dimensions/order, it's no problem. If you have a cubemap that's 128x128 you need an image with left, front, right, back, top, bottom placed next to each other in that order. Each side should be 128x128 pixels, so you end up with an image which is 768x128.


Koriolis(Posted 2004) [#9]
Oh you're right, I hadn't read the manual and simply assumed every face needed a call to SetCubeMap (which made me wonder how to achieve this via the .b3d). Glad to see Mark chose the convenient way of a single 6x1 strip.

But eh, I didn't ask the question...erm.
I always RTFM before asking a question ;p


JoshK(Posted 2004) [#10]
When I say 'flag' I mean another value in the integer that holds all the texture flags. This doesn't involve adding a new parameter, just recognition of another bitwise flag.


Koriolis(Posted 2004) [#11]
I've read your question as "which texture flag in a .b3d enables cube mapping", and so did Fredborg it seems.
If you're asking how to specify the equivalent to doing SetCubeMode, then that's actually a very good question.

Otacon, you were saying that the "stream" nature of the format was a problem, I just say it isn't. And if (or rather "as") no new chunk is needed but only new flags, same thing, adding a flag won't change anything.


AntonyWells(Posted 2004) [#12]
Kor, yep if he embeds it into the already existing flag(A question only mark can asnwer then, as it'll have to be some new unique id). But I read the questiona as is there a new flag in the texture chunk(I.e new seperate flag), in which case there can't be because that would mess up the 'streaming' nature of b3d loaders..(as they'll be expecting data in a certain order)

not that it matters, but just had to clear that up...;)