Is there a way to add camera roll to third party webgl application?
Lets say, I have a webgl application, lets take ESRI Manhattan Skyscrappers Explorer as example.
ESRI camera api doesn't have Roll
angle for camera, but still it's webgl application.
First part of the question: can I get the same context as a running application with the following code:
var canvas = document.getElementById("canvas");
var gl = canvas.getContext("webgl");
Saying same context I mean, If I add a shader via gl.useProgram(shaderProgram);
is that possible to get access to the results of previously run shaders? Or are all of the shader programs isolated?
Next step: if I can submit a shader which will be able to modify vertex coordinates, how should I control the order of shader programs execution?
And finnaly if all that is possible maybe there is already something what I can use to calculate a right transform to get roll?
Is that even possible to "hijack" webgl camera or did I get the webgl pipline working principles wrong and it's impossible? Also I know that I can rotate the whole canvas element, but I'm looking for better approach, (canvas rotation is slow, and image quality is quite poor).