… and do the OpenGL TEXTURE_CUBE_MAP stuff with gl using WebGL commands.
But that’s not the question.
If I have this…
gl.texImage2D(target, level, internalFormat, format, type, faceTex);
Each faceTex is an loaded texture, which is a JS Image
But I want faceTex to be a createGraphics context. So, how to I render each face myself before it gets used as a skybox. Is there a good way of getting WebGL to recognise an off-screen graphics buffer as a WebGL texture please?
Thanks for the reply, mnse. I’ve enjoyed Dan’s videos, but he doesn’t cover cubemaps, as it’s not in p5, or processing. I didn’t realise the pixel format could be a simple array of data though, that’s brilliant. I will try that today.