[Public WebGL] Is it possible to use multiple indexes in WebGL when drawing?

Thatcher Ulrich [email protected]
Fri Feb 11 01:56:36 PST 2011


Of the top of my head, no.  Although using Vertex Texture Fetch you could
simulate this by packing indices and attributes into a texture and do the
lookups explicitly in your vertex shader.  VTF isn't available on some
hardware, and there are some other caveats, like performance, and the
precision of attributes pulled from a texture.

-T
On Feb 11, 2011 2:05 AM, "Ivan Popov" <[email protected]> wrote:
> Hi,
>
> Is it possible to use multiple indexes in WebGL when drawing?
> The idea is to use its own index for each attribute.
>
> For example:
> for the square:
> 0 4 1 4 2 4 0 4 3 4 2 4
> here in each pair of indices, first index - the index of the vertex, the
> second - the index of normal
>
> --
> Best Regards, Ivan Popov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20110211/ec768ab8/attachment.html>


More information about the public_webgl mailing list