2
我學習使用JOGL,我遇到了一個問題,下面這個教程時:JOGL動畫問題
- https://sites.google.com/site/justinscsstuff/jogl-tutorial-1
- https://sites.google.com/site/justinscsstuff/jogl-tutorial-2
- https://sites.google.com/site/justinscsstuff/jogl-tutorial-3
在其上運行的代碼第三個教程我看到了一個三角形,但它並沒有移動。我也有這個錯誤。
Exception in thread "main" java.lang.IllegalArgumentException: Drawable already added to animator: com.jogamp.opengl.util.Animator[started false, animating false, paused false, drawable 1, totals[dt 0, frames 0, fps 0.0], modeBits 1, init'ed true, animThread null, exclCtxThread false(null)], AWT-GLCanvas[Realized true,
jogamp.opengl.windows.wgl.WindowsOnscreenWGLDrawable,
Factory [email protected],
handle 0x0,
Drawable size 292x273,
AWT pos 4/23, size 292x273,
visible true, displayable true,
AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection \Display1, unitID 0, awtDevice D3DGraphicsDevice[screen=1], handle 0x0], idx 1],
chosen GLCaps[wgl vid 0x7 arb: rgba 8/8/8/0, trans-rgba 0x0/0/0/0, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
[email protected][dev=D3DGraphicsDevice[screen=1],pixfmt=7],
encapsulated WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[]], idx 1], pfdID 7, ARB-Choosen true,
requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
chosen GLCaps[wgl vid 0x7 arb: rgba 8/8/8/0, trans-rgba 0x0/0/0/0, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]]]]
at com.jogamp.opengl.util.AnimatorBase.add(AnimatorBase.java:183)
at SimpleScene.main(SimpleScene.java:33)
在教程的第一部分建立我的類路徑的時候,我發現了jogl-all.jar
和gluegen.jar
但我無法找到nativewindow.all.jar
或newt.all.jar
所以我選擇我能找到的最接近這是jogl-all-natives-windows-amd64.jar
和newt-natives-windows-amd64.jar
。 (我甚至不認爲我需要蠑螈,因爲我認爲這隻允許我使用除標準AWT框架之外的其他類型的框架。糾正我,如果我錯了。)這可能與這個問題有關嗎?