render confusion..

Pulled cvs last night…

making this call


 	  canvas = Canvas3DWrapper.createStandalone(Canvas3DWrapper.OpenGLLayer.JOGL, Canvas3DWrapper.Resolution.RES_800X600, "Game");

which calls


/**
     * Creates a new instance of Canvas3DWrapper as a standalone, normal Canvas3D with desktop resolution.
     * 
     * @param layer the OpenGL layer to use
     * @param res the resolution to use
     * @param title the new window's title
     */
    public static Canvas3DWrapper createStandalone(OpenGLLayer layer, Resolution res, String title)
    {
        return(new Canvas3DWrapper(layer, res, ColorDepth.getDefault(), DisplayMode.NORMAL, title));
    }

which calls

 
public static ColorDepth getDefault()
        {
            switch (lastUsedOGLLayer)
            {
                case LWJGL:
                    return(org.xith3d.render.canvas.utils.CanvasUtilsLWJGL.getBestColorDepth());
                    
                    //break;
                    
                case JOGL:
                default:
                    return(B32);
            }
        }


why is a static lastUsedOGLLayer variable used when an explicit request for opengl was made

Thread [main] (Suspended (exception UnsatisfiedLinkError))
Sys.() line: 82
Display.() line: 103
CanvasUtilsLWJGL.getBestColorDepth() line: 22
Canvas3DWrapper$ColorDepth.getDefault() line: 164
Canvas3DWrapper.createStandalone(Canvas3DWrapper$OpenGLLayer, Canvas3DWrapper$Resolution, String) line: 680
Xith3DFrame.main(String[]) line: 147

I am dying on some LWJGL thing even though I wanted opengl…

case LWJGL:
return(org.xith3d.render.canvas.utils.CanvasUtilsLWJGL.getBestColorDepth());

I need some more info. Do you want to use LWJGL? Or is Canvas3DWrapper choosing it by accident?

The static variable is used to define a default. The default “by default” is JOGL. But if you’ve once chosen LWJGL the default is switched to LWJGL. So when you create a Canvas3DWrapper without explictly selecting a specific OpenGLLayer after you created a first one, the second one is created with the new default OpenGLLayer. Is there something that annoys you with this behaviour? Maybe we can find a better one.

Marvin