Hi
I'm trying to render line list using indices of triangles as follow
uint16_t *indices = static_cast<uint16_t *>(indexBuffer->lock(Ogre::HardwareBuffer::HBL_DISCARD));
int l, t;
int numTriangles = out.numberoftrifaces;
for (l = 0, t = 0; t<numTriangles; t += 3) {
// Each vertex has to be listed twice
indices[l] = out.trifacelist[t]; l++;
indices[l] = out.trifacelist[t + 1]; l++;
indices[l] = out.trifacelist[t + 1]; l++;
indices[l] = out.trifacelist[t + 2]; l++;
indices[l] = out.trifacelist[t + 2]; l++;
indices[l] = out.trifacelist[t]; l++;
}
indexBuffer->unlock();
The problem that ogre renders broken triangles and it's completely wrong. I'm not doing anything wrong regarding rendering the lines that the triangles are composed
I'm using ogre 1.9
Ogre Render Line list completely wrong
-
- Kobold
- Posts: 38
- Joined: Wed Dec 31, 2014 2:26 am
- x 2
-
- Kobold
- Posts: 38
- Joined: Wed Dec 31, 2014 2:26 am
- x 2