Sign in to follow this  
giugio

webgl :create a texture with javascript

Recommended Posts

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.

Share this post


Link to post
Share on other sites
The following: [b]"I wish store all the colors and scale factor in a texture for don't call 3242134142 webgl draw" [/b], made absolutely no sense to me.

Anyway, to try and answer your question [b]"how i can create a texture with javascript and webgl?"[/b], 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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this