webgl :create a texture with javascript

Started by
0 comments, last by lpcstr 12 years, 6 months ago
hello.
I have a huge number of object that change only for the color and the dimension.
I wish store all the colors and scale factor in a texture for don't call 3242134142 webgl draw .
The model is a static model .

how i can create a texture with javascript and webgl?
Is possible?
thanks.
Advertisement
The following: "I wish store all the colors and scale factor in a texture for don't call 3242134142 webgl draw" , made absolutely no sense to me.

Anyway, to try and answer your question "how i can create a texture with javascript and webgl?", you could use a canvas element to generate an image which could then be used as a texture.

If all you want to do it alter the color, then perhaps you could do that in the shared instead.

This topic is closed to new replies.

Advertisement