I am new for three.js,but I know three.js is a great project! If I ask some stupid question,I am say sorry at begin…
Because I want to create my own batching module(for gui or 2d sprite),so I am look for some logic for render Immediaterenderobject,I has below question
1.Is RenderCallback can call multi times in one Immediaterenderobject? I look code for WebGLRenderer.renderBufferImmediate ,I think ,RenderCallback should call multi times in a Immediaterenderobject.
2.In WebGLRenderer.renderBufferImmediate，Is There have a unrelease gl buffer Issue？
var buffers = properties.get( object );
if ( object.hasPositions && ! buffers.position ) buffers.position = _gl.createBuffer(); if ( object.hasNormals && ! buffers.normal ) buffers.normal = _gl.createBuffer(); if ( object.hasUvs && ! buffers.uv ) buffers.uv = _gl.createBuffer(); if ( object.hasColors && ! buffers.color ) buffers.color = _gl.createBuffer();
in above code from WebGLRenderer.renderBufferImmediate method， when user pass a new ImmediaterenderobjectData to this method，It may create some gl buffers，but I search code for WebGLRenderer，I could not find where will release these buffers。Is am I miss something？If It dose not release gl buffers，When Immediaterenderobject created number increase（some instance may destroyed),
unrelease gl buffer will increase become a problem?
Sorry for my english,