Texture Mapping extension

Re: Texture Mapping extension
Allen Smith Wrote:
Alex Taylor Wrote:1. Are there any meta-commands which may not appear in the geometry sections? Is, for example, nesting !TEXMAP blocks in the same file supported?

NOFILE aborts the texture. I am proposing that STEP will also implicitly abort it. http://forums.ldraw.org/showthread.php?t...90#pid6390 If there are any other metas which have multiline "scope," they should not overlap a texture. I can't think of any at the moment though.

That brings up an interesting point: whilst a NOFILE is pretty unambiguous, suppose you encounter the following code:

0 !: <geometry>
0 !: <geometry>

I agree that the STEP should abort the texture, but what should be done with the second block of <geometry> - and should the parser report an error when it hits what is now effectively an invalid "0 !TEXMAP END" statement?

Might it in fact be simpler to just prohibit the appearance of STEP inside a texmap block?

Quote:Nesting is supported according to the spec, but really, why would you want to? (I haven't implemented support for it yet.)

Yes, that's pretty much my take on it - it's a strange thing to need to do - but from reading the spec, the only indication I can see that nesting is permitted is when one file calls another via a type-1 line. I can't see anything that would permit (or, admittedly, prohibit) the code I gave in my last post.

Quote:3. Is it the case that you use either geometry1+geometry3 or geometry2, or can you use geometry2 in combination with either of the others?

geometry1 and geometry3 are mutually exclusive when drawing the file. Geometry2 (geometry not prefixed with !Smile will be displayed unconditionally, so yes, you may use it with either of the others.

I'm struggling to think of a situation where you would need to use geometry2 in conjunction with the others, tbh. I can see why it exists, but to me it only makes sense if used on its own.

Quote:4. The description states that "If an END command given in a sub file stops the use of a texture specified in a calling file, then that texture will be restored to use when the sub file is exited." Does this mean that you can use "0 !TEXMAP END" in a file without it being preceded (in the same file) by an "0 !TEXMAP START"?

Don't do it!

Again, see my proposal at http://forums.ldraw.org/showthread.php?t...90#pid6390

Yes, that's what I figured, but of course as an author I can only follow the published spec... :-)
« Next Oldest | Next Newest »

Messages In This Thread
Re: Texture Mapping extension - by Tim Gould - 2012-04-14, 22:08
Re: Texture Mapping extension - by Alex Taylor - 2012-10-25, 21:44
Re: Texture Mapping extension - by Tim Gould - 2012-11-15, 22:51
Re: Texture Mapping extension - by Tim Gould - 2012-11-30, 21:55

Forum Jump:

Users browsing this thread: 1 Guest(s)