From d3258429ec1e648c75d7c926bad1d60becc55b0d Mon Sep 17 00:00:00 2001 From: shadowislord Date: Fri, 5 Dec 2014 22:36:55 -0500 Subject: [PATCH] Use unified renderer architecture for LWJGL by default (other backends pending) --- .../main/java/com/jme3/system/lwjgl/LwjglContext.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglContext.java b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglContext.java index ee6a29300..b548b3dd5 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglContext.java +++ b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglContext.java @@ -37,7 +37,9 @@ import com.jme3.input.lwjgl.LwjglKeyInput; import com.jme3.input.lwjgl.LwjglMouseInput; import com.jme3.renderer.Renderer; import com.jme3.renderer.RendererException; -import com.jme3.renderer.lwjgl.LwjglRenderer; +import com.jme3.renderer.lwjgl.LwjglGL; +import com.jme3.renderer.lwjgl.LwjglGLExt; +import com.jme3.renderer.opengl.GLRenderer; import com.jme3.system.AppSettings; import com.jme3.system.JmeContext; import com.jme3.system.JmeSystem; @@ -205,8 +207,10 @@ public abstract class LwjglContext implements JmeContext { if (settings.getRenderer().equals(AppSettings.LWJGL_OPENGL2) || settings.getRenderer().equals(AppSettings.LWJGL_OPENGL3)) { - renderer = new LwjglRenderer(); - ((LwjglRenderer) renderer).initialize(); + LwjglGL gl = new LwjglGL(); + LwjglGLExt glext = new LwjglGLExt(); + renderer = new GLRenderer(gl, glext); + renderer.initialize(); } else { throw new UnsupportedOperationException("Unsupported renderer: " + settings.getRenderer()); }