diff options
author | Carsten Weisse <[email protected]> | 2004-12-16 21:13:06 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2004-12-16 21:13:06 +0000 |
commit | b106585d8408b9776c0654ae21f0990ea66c8b3d (patch) | |
tree | dbbdff30eecc50e01b4c6dd00cf730c55ee743ae /src | |
parent | 974b11b93e66a7bded58f06458d9a629f1e9d4ee (diff) |
checks the runtime package for opengl drivers
Diffstat (limited to 'src')
-rw-r--r-- | src/jake2/render/Renderer.java | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/jake2/render/Renderer.java b/src/jake2/render/Renderer.java index 2d26eb9..e20332c 100644 --- a/src/jake2/render/Renderer.java +++ b/src/jake2/render/Renderer.java @@ -2,7 +2,7 @@ * Renderer.java * Copyright (C) 2003 * - * $Id: Renderer.java,v 1.4 2004-12-14 12:58:05 cawe Exp $ + * $Id: Renderer.java,v 1.5 2004-12-16 21:13:06 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -36,18 +36,24 @@ import jake2.client.refexport_t; */ public class Renderer { - static Vector drivers = new Vector(3); - public static final String DEFAULT = JoglRenderer.DRIVER_NAME; - private static final String DEFAULT_CLASS = "jake2.render.JoglRenderer"; - static { try { - Class.forName("jake2.render.JoglRenderer"); - Class.forName("jake2.render.FastJoglRenderer"); - Class.forName("jake2.render.LWJGLRenderer"); - } catch (ClassNotFoundException e) { + try { + Class.forName("net.java.games.jogl.GL"); + Class.forName("jake2.render.JoglRenderer"); + Class.forName("jake2.render.FastJoglRenderer"); + } catch (ClassNotFoundException e) { + // ignore the jogl drivers if runtime not in classpath + } + try { + Class.forName("org.lwjgl.opengl.GL11"); + Class.forName("jake2.render.LWJGLRenderer"); + } catch (ClassNotFoundException e) { + // ignore the lwjgl driver if runtime not in classpath + } + } catch (Throwable e) { e.printStackTrace(); } }; |