Custom grid mesh not working with new revisions


Since updating all the revisions in one go since alpha 3, my project has a few problems,

the first of which is a custom class I have which creates a grid mesh (it extends Mesh) by passing in an array of vertex positions.

These grids are created to populate the game world, however since the updates, they now flicker on and off depending on how the camera is pointing at them. Have spent all day trying to find the precise source of the problem.

Can anyone think of which of the revisions might be doing this?


You are displaying it with the WireFrame material, right? I have the same problem with that.

it’s the same with solidcolor and unshaded…

was thinking it might have something to do with the modelbounds not being right - it’s like the camera is trying to clip geometry thinking it is much bigger than it actually is. either way it has to do with creating a custom mesh (setting vertex buffers etc)- other primitives like boxes are okay…

Recently we required mesh data to be limited with its limit() value, so if you are generating vertex buffers manually you may need to call clear() on the buffer at the end

it’s okay I solved it, phew.

I hadn’t set a texcoord buffer (even though it’s just a wire/solidcolor material) - so now it works. But it strangely had worked before the latest revisions.