* Fix NPE in LwjglCanvas.restoreCanvas()

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7361 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..om 14 years ago
parent c407296ccb
commit a4e0e634c1
  1. 4
      engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java

@ -227,13 +227,15 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex
} }
} }
renderer.resetGLObjects();
logger.log(Level.INFO, "OGL: Creating display.."); logger.log(Level.INFO, "OGL: Creating display..");
// Set renderable to true, since canvas is now displayable. // Set renderable to true, since canvas is now displayable.
renderable.set(true); renderable.set(true);
createContext(settings); createContext(settings);
// must call after createContext, as renderer might be null
renderer.resetGLObjects();
logger.log(Level.INFO, "OGL: Waiting for display to become active.."); logger.log(Level.INFO, "OGL: Waiting for display to become active..");
while (!Display.isCreated()){ while (!Display.isCreated()){
try { try {

Loading…
Cancel
Save