> On May 1, 2018, at 9:56 PM, Michael Van Canneyt <mich...@freepascal.org> 
> wrote:
> 
> You must do
>  gl := TJSWebGLRenderingContext(canvas.getContext('webgl'));
> 
> because getContext can return various classes depending on the argument.

Ok so getContext is method of TJSElement I guess.

Btw I’ve been reading and I don’t see WebGL examples using interlaced vertex 
data like I suggested in my record question. Rather they all seem to be using 
different buffer objects for each type of vertex attribute (position, color, 
texture coord etc…).

Can anyone confirm WebGL just doesn’t support this? OpenGL heavily relies on 
the idea of pointers with byte offsets but perhaps JavaScript just can’t 
support that so they opted for 0-offset single type arrays in all cases. That 
would be too bad though since it makes laying out data more difficult.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to