diff options
author | Sven Gothel <[email protected]> | 2009-10-04 17:11:11 -0700 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-10-04 17:11:11 -0700 |
commit | 7997824464198164a74f4d20620d2f432578024c (patch) | |
tree | dd8c288d66d279f10f9edb4d35d8abeb03ccf164 /src/demos/readbuffer/Main.java | |
parent | 4b9a72c24bb97ed81c79c3931d4ffb5fa53d9978 (diff) |
ReadBuffer Demos: Use NetPbmTextureWriter
Diffstat (limited to 'src/demos/readbuffer/Main.java')
-rwxr-xr-x | src/demos/readbuffer/Main.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/demos/readbuffer/Main.java b/src/demos/readbuffer/Main.java index ccc3988..cf281b6 100755 --- a/src/demos/readbuffer/Main.java +++ b/src/demos/readbuffer/Main.java @@ -65,12 +65,13 @@ public class Main implements WindowListener, MouseListener, SurfaceUpdatedListen return windowOffscreen; } - private void run(int typeNewt, boolean fullscreen, int typeTest, GLEventListener demo) { + private void run(String glProfileStr, int typeNewt, boolean fullscreen, int typeTest, GLEventListener demo) { + GLProfile glp = GLProfile.get(glProfileStr); int width = 800; int height = 480; System.out.println("readbuffer.Main.run() Test: "+typeTest); try { - GLCapabilities caps = new GLCapabilities(null); + GLCapabilities caps = new GLCapabilities(glp); // Full init pbuffer window .. GLWindow windowOffscreen = createOffscreen(caps, width, height); @@ -146,6 +147,7 @@ public class Main implements WindowListener, MouseListener, SurfaceUpdatedListen public static int TEST_READBUFFER2SCREEN = 2; public static void main(String[] args) { + String glProfileStr = null; boolean fullscreen = false; int typeNewt = USE_NEWT ; int typeTest = TEST_SURFACE2FILE; @@ -158,6 +160,8 @@ public class Main implements WindowListener, MouseListener, SurfaceUpdatedListen } else if(args[i].equals("-test")) { i++; typeTest = str2int(args[i], typeTest); + } else if(args[i].startsWith("-GL")) { + glProfileStr = args[i].substring(1); } i++; } @@ -176,7 +180,7 @@ public class Main implements WindowListener, MouseListener, SurfaceUpdatedListen } GLEventListener demo = (GLEventListener) demoObject; - new Main().run(typeNewt, fullscreen, typeTest, demo); + new Main().run(glProfileStr, typeNewt, fullscreen, typeTest, demo); System.exit(0); } |