That's the short answer, and it's basically correct.
A longer answer is that it depends on the implementation.
For one thing, some implementations will assume that a cube is SOLID,
and will therefore do backface removal. Since the default ShapeHints
settings (in VRML 1.0) are shapeType UNKNOWN_SHAPE_TYPE and vertexOrdering
UNKNOWN_ORDERING, backface removal can't be done on an IndexedFaceSet node.
Therefore a cube made of out of an IndexedFaceSet node will actually be slower
to esnder than a Cube node (at least in some implementations).
Obviously, the difference will be irrelevant for a single cube; if you have
enough of them, though, it would certainly add up. If you know the cube
is a cube, then use something like
ShapeHints { shapeType SOLID vertexOrdering COUNTERCLOCKWISE }
in front of the IndexedFaceSet and you should get (more or less) the same
performance as you would from a Cube node.
Note that one of the proposed changes for VRML 1.1 is to set those values
(SOLID and COUNTERCLOCKWISE) as the defaults for the ShapeHints node.
As an aside, there are other optimizations that a clever browser might do for
a Cube (as opposed to a general IndexedFaceSet) but they're not worth delving
into eight now.
-- Bernie Roehl University of Waterloo Dept of Electrical and Computer Engineering Mail:[email protected] Voice: (519) 888-4567 x 2607 [work] URL:http://sunee.uwaterloo.ca/~broehl