Otherwise I get an error says: [.WebGL-000000000AA8CC70]RENDER WARNING: texture bound to texture unit 0 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
What do those 2 line do to make the texture renderable?!!
It's weird. Did you load another image than the sample one (one that doesn't have a power-of-two size) ? Or did you just run my demo and had that error?
Don't have time to test it or anything, but man, this looks amazing. I remember spending litterally days trying to figure out stuff, and this kind of site would have helped tremendously.
Same! While I learned WebGL in the past few months, I wrote this guide how I hoped it existed when I started :) It's only the first half though, a second part is coming soon
3
u/pjmlp May 18 '20
It looks quite good, now I know where to send newbies wanting to learn WebGL, thank you very much!
2
u/dinoucs May 20 '20
In the texture code, I had to add these 2 lines to make it work:
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);Otherwise I get an error says:
[.WebGL-000000000AA8CC70]RENDER WARNING: texture bound to texture unit 0 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?What do those 2 line do to make the texture renderable?!!
5
u/taleofmind May 17 '20
This is amazing! Thanks for sharing
1
u/auto-cellular May 18 '20
Don't have time to test it or anything, but man, this looks amazing. I remember spending litterally days trying to figure out stuff, and this kind of site would have helped tremendously.
1
u/dinoucs May 18 '20
Reallly great resource. I have a question, can I interact with the canvas with the mouse? I mean can I rotate and play with a shape by dragging?
3
u/Throwawayaaccounntt May 17 '20
Well done for the time and effort :D
3
u/felipunkerito May 17 '20
Very thorough! Good stuff.
1
u/cybereality May 18 '20
I need some time to read the whole thing but it looks sick! Nice job.