本文整理汇总了Java中com.jogamp.newt.NewtFactory.createWindow方法的典型用法代码示例。如果您正苦于以下问题:Java NewtFactory.createWindow方法的具体用法?Java NewtFactory.createWindow怎么用?Java NewtFactory.createWindow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jogamp.newt.NewtFactory
的用法示例。
在下文中一共展示了NewtFactory.createWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initGL
import com.jogamp.newt.NewtFactory; //导入方法依赖的package包/类
private static void initGL() {
_window = NewtFactory.createWindow(
new GLCapabilities(GLProfile.getDefault()));
assertNotNull(_window);
_glWindow = GLWindow.create(_window);
assertNotNull(_glWindow);
_glWindow.setVisible(true);
_glContext = _glWindow.getContext();
assertNotNull(_glContext);
_glContext.makeCurrent();
}
示例2: ClearGLWindow
import com.jogamp.newt.NewtFactory; //导入方法依赖的package包/类
public ClearGLWindow(final String pWindowTitle,
final int pDefaultWidth,
final int pDefaultHeight,
final String pGLVersion,
final int pNumberOfSamples,
final ClearGLEventListener pClearGLWindowEventListener) {
mWindowTitle = pWindowTitle;
mWindowDefaultWidth = pDefaultWidth;
mWindowDefaultHeight = pDefaultHeight;
mProjectionMatrix = new GLMatrix();
mViewMatrix = new GLMatrix();
final GLProfile lProfile = GLProfile.get(pGLVersion);
System.out.println(this.getClass().getSimpleName() + ": "
+ lProfile);
final GLCapabilities lCapabilities = new GLCapabilities(lProfile);
lCapabilities.setSampleBuffers(pNumberOfSamples > 1);
lCapabilities.setNumSamples(pNumberOfSamples);
lCapabilities.setDepthBits(24);
lCapabilities.setHardwareAccelerated(true);
final GLCapabilitiesChooser lMultisampleChooser = new MultisampleChooser();
mWindow = NewtFactory.createWindow(lCapabilities);
mGlWindow = GLWindow.create(mWindow);
mGlWindow.setCapabilitiesChooser(lMultisampleChooser);
mGlWindow.setTitle(pWindowTitle);
pClearGLWindowEventListener.setClearGLWindow(this);
mGlWindow.addGLEventListener(pClearGLWindowEventListener);
mGlWindow.setSurfaceSize(pDefaultWidth, pDefaultHeight);
mGlWindow.setAutoSwapBufferMode(true);
// lAnimator.add(mClearGLWindow.getGLAutoDrawable());
}