When attempting to render a scene in two different renderers consecutively (not simultaneously), I encountered the error message "GL_INVALID_OPERATION".
Below is a snippet of the code:
var scene1 = new THREE.Scene();
var camera1 = new THREE.PerspectiveCamera( ... );
var renderer1= new THREE.WebGLRenderer( ... );
var renderer2= new THREE.WebGLRenderer( ... );
var camera2 = new THREE.PerspectiveCamera( ... );
//Render scene1 in renderer1
renderer1.render( scene1, camera1 );
//[After some user event...]
//Render scene1 in renderer2
renderer2.render( scene1, camera2 ); //This fails. getError()=1282 (i.e. GL_INVALID_OPERATION)
I am aware that it is not recommended to render the same scene in two different renderers even if done consecutively, but due to the complexity of my project, I couldn't find another solution.
I understand that there may be GL data associated with scene1 that are tied to renderer1, but how can I remove this data so that I can render scene1 again in a different renderer?
Just to clarify, I am not attempting to render the scene in both renderers simultaneously (as discussed here: https://github.com/mrdoob/three.js/issues/189).
Any assistance on this matter would be greatly appreciated. Thank you and best regards.