2015-08-28 125 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)