From 549d167635bf494a996725c1de3a540fa10f95ed Mon Sep 17 00:00:00 2001 From: "sha..rd" Date: Sun, 8 May 2011 17:54:41 +0000 Subject: [PATCH] * Let implementation choose appropriate pixel format for pbuffer. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7469 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java | 4 +++- .../ogre/com/jme3/scene/plugins/ogre/SceneLoader.java | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java b/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java index 1daa03bc8..18376abf5 100644 --- a/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java +++ b/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java @@ -268,7 +268,9 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex logger.log(Level.WARNING, "PBuffer was lost!"); pbuffer.destroy(); } - pbuffer = new Pbuffer(1, 1, acquirePixelFormat(), null); + // Let the implementation choose an appropriate pixel format. + pbuffer = new Pbuffer(1, 1, new PixelFormat(0, 0, 0, 0, 0), null); + //pbuffer = new Pbuffer(1, 1, acquirePixelFormat(), null); logger.log(Level.INFO, "OGL: Pbuffer has been created"); } } diff --git a/engine/src/ogre/com/jme3/scene/plugins/ogre/SceneLoader.java b/engine/src/ogre/com/jme3/scene/plugins/ogre/SceneLoader.java index 6f83f5f0f..f867467a2 100644 --- a/engine/src/ogre/com/jme3/scene/plugins/ogre/SceneLoader.java +++ b/engine/src/ogre/com/jme3/scene/plugins/ogre/SceneLoader.java @@ -282,9 +282,12 @@ public class SceneLoader extends DefaultHandler implements AssetLoader { node.setLocalScale(SAXUtil.parseVector3(attribs)); } else if (qName.equals("light")) { parseLight(attribs); - } else if (qName.equals("colourDiffuse")) { - assert elementStack.peek().equals("light"); - light.setColor(parseColor(attribs)); + } else if (qName.equals("colourDiffuse") || qName.equals("colorDiffuse")) { + if (elementStack.peek().equals("light")){ + light.setColor(parseColor(attribs)); + }else{ + assert elementStack.peek().equals("environment"); + } } else if (qName.equals("normal")) { parseLightNormal(attribs); } else if (qName.equals("lightAttenuation")) {