Hello All,
Don't know if this is the correct way to submit a proposal for code change. If this
is not the correct way, please let me know,
Thanks, the shoe
I am working embedding jme in swt, using the swtlwjgl bindings.
All the functionality of LWJGLRenderer is the same except the buffer swap.
The DisplayBackBuffer currently has 2 responsiblities
1) renders items in the queue
2) swap buffer
I would like to propose that we split these responsibilites between 2 functions.
I do this in a local copy, and it allows me to over ride the new function.
Note: this is the only function that I need to override for a SwtLWJGLRenderer
current function
/**
* <code>displayBackBuffer</code> renders any queued items then flips the
* rendered buffer (back) with the currently displayed buffer.
*
* @see com.jme.renderer.Renderer#displayBackBuffer()
*/
public void displayBackBuffer() {
renderQueue();
prevColor = prevNorms = prevVerts = null;
Arrays.fill(prevTex, null);
GL11.glFlush();
if (!headless)
Display.update();
}
Proposed Split functionality
/**
* <code>displayBackBuffer</code> renders any queued items then flips the
* rendered buffer (back) with the currently displayed buffer.
*
* @see com.jme.renderer.Renderer#displayBackBuffer()
*/
public void displayBackBuffer() {
renderQueue();
prevColor = prevNorms = prevVerts = null;
Arrays.fill(prevTex, null);
GL11.glFlush();
if (!headless){
swapBackBuffer();
}
}
public void swapBackBuffer(){
Display.update() ;
}