Hello,
I am using the SWT port 0.7.0 of JOGL (or JSR 231, don’t really know?!). I would like to use the following methods of com.sun.opengl.util.j2d.TextRenderer:
begin3dRendering()
draw[b]3d/b
end3dRendering()
However, none of these seam to exist, and the sole that are available are the 2d versions (beginRendering(), draw() and endRendering() ). Did I make a mistake or is it a common problem for those who work with SWT?
I then tried to use gl.glBitmap with that worked fine on AWT:
gl.glNewList(i + fontOffset, GL.GL_COMPILE);
gl.glBitmap(charWidth, charHeight, xorig, yorig, xmove, ymove, rasters[i - 32], 0);
gl.glEndList();
With the SWT GLCanvas, I got:
Exception in thread "main" javax.media.opengl.GLException: Method "wglGetExtensionsStringEXT" not available
at com.sun.opengl.impl.windows.WGLExtImpl.wglGetExtensionsStringEXT(WGLExtImpl.java:393)
at com.sun.opengl.impl.windows.WindowsGLContext.getPlatformExtensionsString(WindowsGLContext.java:232)
at com.sun.opengl.impl.FunctionAvailabilityCache.initAvailableExtensions(FunctionAvailabilityCache.java:116)
at com.sun.opengl.impl.FunctionAvailabilityCache.isExtensionAvailable(FunctionAvailabilityCache.java:104)
at com.sun.opengl.impl.GLContextImpl.isExtensionAvailable(GLContextImpl.java:353)
at com.sun.opengl.impl.GLImpl.isExtensionAvailable(GLImpl.java:30494)
at com.sun.opengl.impl.GLImpl.initBufferObjectExtensionChecks(GLImpl.java:30639)
at com.sun.opengl.impl.GLImpl.checkUnpackPBODisabled(GLImpl.java:30674)
at com.sun.opengl.impl.GLImpl.glBitmap(GLImpl.java:649)
at Text3D.initCharacterList(Text3D.java:34)
at Text3D.<init>(Text3D.java:13)
at MyGLTest2.main(MyGLTest2.java:65)
I tried removing the last argument , since the original open gl function has only 7 inputs (see http://www.glprogramming.com/blue/ch05.html#id5452091). Actually one can also use a GL.glBitmap function with a com.sun.opengl.util.BufferUtil as input instead of a byte[]. However, I have the same exception!
Any idea someone?
One last question: what are the differences between com.sun.opengl and javax.media.opengl?
Thanks!
Martin