2015-08-28 132 views
-1

我更新了opengl版本。awtPixelAttributesIntRGB3無法解析或不是字段

但我得到了一個錯誤:

  AWTGLPixelBuffer pixelBuffer = pixelBufferProvider.allocate(gl, 
      AWTGLPixelBuffer.awtPixelAttributesIntRGB3, 
      v.getWidth(), 
      v.getHeight(), 
      1, 
      true, 
      0); 

我的圖書館找不到awtPixelAttributesIntRGB3。如果我使用舊版本,它可以找到。

我導入相同的庫:import com.jogamp.opengl.util.awt.AWTGLPixelBuffer;

最後一件事,我下載的OpenGL的最後一個版本在這裏(jogamp-全platforms.7z): http://jogamp.org/deployment/jogamp-current/archive/

,我只加jogamp-所有。罐子到我的lib文件夾。

感謝您的建議。

回答

1

你給我們提供的信息很少。 例如我們甚至不知道從哪個版本升級到哪個新版本。

我想你的問題是,該字段awtPixelAttributesIntRGB3從版本2.2刪除到2.3API documentation of GLPixelBuffer.GLPixelBufferProvider#allocate很好地解釋瞭如何使用它。 關鍵是您需要以不同方式獲取pixelAttributes,例如通過getAttributes(GL, int, boolean)