Java Code Examples for com.jogamp.opengl.GLProfile#getDefault()
The following examples show how to use
com.jogamp.opengl.GLProfile#getDefault() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Test.java From jogl-samples with MIT License | 5 votes |
private GLProfile getGlProfile() { switch (profile) { case ES: switch (major) { case 1: return GLProfile.get(GLProfile.GL2ES1); case 2: return GLProfile.get(GLProfile.GL2ES2); case 3: return GLProfile.get(GLProfile.GL4ES3); default: return GLProfile.getDefault(); } case CORE: switch (major) { case 1: return GLProfile.get(GLProfile.GL2); case 2: return GLProfile.get(GLProfile.GL2); case 3: if (profile == Profile.COMPATIBILITY) { return GLProfile.get(GLProfile.GL3bc); } else { return GLProfile.get(GLProfile.GL3); } case 4: if (profile == Profile.COMPATIBILITY) { return GLProfile.get(GLProfile.GL4bc); } else { return GLProfile.get(GLProfile.GL4); } } } return GLProfile.getDefault(); }
Example 2
Source File: SWTOpenGLDisplaySurface.java From gama with GNU General Public License v3.0 | 5 votes |
public GLCanvas createCanvas(final Composite parent) { final GLProfile profile = GLProfile.getDefault(); final GLCapabilities cap = new GLCapabilities(profile); cap.setDepthBits(24); cap.setDoubleBuffered(true); cap.setHardwareAccelerated(true); cap.setSampleBuffers(true); cap.setAlphaBits(8); cap.setNumSamples(8); final GLCanvas canvas = new GLCanvas(parent, SWT.NONE, cap, null) { @SuppressWarnings ("restriction") @Override public Rectangle getClientArea() { // see Issue #2378 // if (isWindows() || isLinux()) { return autoScaleUp(super.getClientArea()); } return super.getClientArea(); } }; canvas.setAutoSwapBufferMode(true); final SWTGLAnimator animator = new SWTGLAnimator(canvas); animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, null); renderer.setCanvas(canvas); final FillLayout gl = new FillLayout(); canvas.setLayout(gl); return canvas; }
Example 3
Source File: JOGLContextCreator.java From settlers-remake with MIT License | 5 votes |
@Override public void initSpecific() { GLCapabilities caps = new GLCapabilities(GLProfile.getDefault()); caps.setStencilBits(1); canvas = new GLJPanel(caps); ((GLJPanel)canvas).addGLEventListener(this); new GOSwingEventConverter(canvas, parent); }
Example 4
Source File: GlCapabilities.java From jtk with Apache License 2.0 | 4 votes |
public GlCapabilities() { super(GLProfile.getDefault()); }