How to use ImmediateRenderObject?

Howdy!

I am trying to render a triangle with ImmediateRenderObject.
For some reason, it’s invisible (although draw call is present).

Fiddle: https://jsfiddle.net/flerokoo/fzarquvx/

What am i doing wrong?

I’ve tried changing verts order and adding normals, but had no luck.

You have to set mesh.count to 3. count specifies the number of vertices to be rendered.

https://jsfiddle.net/fzarquvx/24/

2 Likes