Is this Single Surface?

Blitz3D Forums/Blitz3D Programming/Is this Single Surface?


1) If my model has 8 textures, will there be a surface for each texture



Yes.


Every time i create a sprite, is this a new surface



Sort of. The surface mechanism in Blitz automatically discards redundant renderstate changes, so the overhead *may* be small - or it may not. If the engine ends up displaying the same sprite 1000 time at different locations, and they all share the same texture/color/shininess etc there will be little slowdown.


Please can someone once and for all; explain surfaces to me



A surface binds a vertex/triangle mesh (not a Blitz mesh - I regret that now - badly named!) to a brush.

Internally, there is a surface 'class' that looks a bit like:

class Surface{
Mesh *mesh;
Brush *brush;
};

Which is not quite optimal. These 2 should be separated, but to do so needs something like an immediate mode. I'm working on it.