Package javax.media.opengl

Examples of javax.media.opengl.GLProfile


                giveBackContext();
                ContextManager.removeContext(_offscreenDrawable.getContext());
            }

            // Make our GLPbuffer...
            final GLProfile profile = _capsUtil.getProfile();
            final GLDrawableFactory fac = GLDrawableFactory.getFactory(profile);
            final GLCapabilities caps = new GLCapabilities(profile);
            caps.setHardwareAccelerated(true);
            caps.setDoubleBuffered(true);
            caps.setAlphaBits(_settings.getAlphaBits());
View Full Code Here


  public Whiteboard(Composite parent, int style) {
    super(parent, style | SWT.EMBEDDED);
   
    // TODO: Use GL4 instead of GL2
   
    GLProfile profile = GLProfile.getDefault();
    GLCapabilities caps = new GLCapabilities(profile);
   
    frame = SWT_AWT.new_Frame(this);
    frame.setLayout(new BorderLayout());
    canvas = new GLCanvas(caps);
View Full Code Here

    BorderLayout frameLayout = new BorderLayout();
    frameLayout.setHgap(0);
    frameLayout.setVgap(0);
    frame.setLayout(frameLayout);
   
    GLProfile profile = GLProfile.getDefault();
    GLCapabilitiesImmutable capabilities = new GLCapabilities(profile);
    canvas = new GLCanvas(capabilities);
    canvas.addGLEventListener(this);
    frame.add(canvas, BorderLayout.CENTER);
   
View Full Code Here

    public Test() {
        initGL();
    }

    private void initGL() {
        GLProfile profile = GLProfile.getDefault();

        GLCapabilities capabilities = new GLCapabilities(profile);

        canvas = new GLCanvas(capabilities);
View Full Code Here

* @author Wade Walker
*/
public class OneTriangleSWTAWTBridge {

    public static void main( String [] args ) {
        GLProfile glprofile = GLProfile.getDefault();
        GLCapabilities glcapabilities = new GLCapabilities( glprofile );
        final GLCanvas glcanvas = new GLCanvas( glcapabilities );

        Display display = new Display();
        final Shell shell = new Shell( display );
View Full Code Here

        gldata.doubleBuffer = true;
        // need SWT.NO_BACKGROUND to prevent SWT from clearing the window
        // at the wrong times (we use glClear for this instead)
        final GLCanvas glcanvas = new GLCanvas( composite, SWT.NO_BACKGROUND, gldata );
        glcanvas.setCurrent();
        GLProfile glprofile = GLProfile.getDefault();
        final GLContext glcontext = GLDrawableFactory.getFactory( glprofile ).createExternalGLContext();

        // fix the viewport when the user resizes the window
        glcanvas.addListener( SWT.Resize, new Listener() {
            public void handleEvent(Event event) {
View Full Code Here

        this.bounds = bounds;
        this.glxNode = glxNode;

        this.ships = SpaceshipState.stateType.newArray(maxItems);

        final GLProfile glp = GLProfile.get(GLProfile.GL3);
        final GLCapabilitiesImmutable glcaps = (GLCapabilitiesImmutable) new GLCapabilities(glp);
        final GLAutoDrawable drawable;
        final GLCapabilities tGLCapabilities = new GLCapabilities(glp);
        tGLCapabilities.setSampleBuffers(true);
        tGLCapabilities.setNumSamples(1);
View Full Code Here

* Package: PACKAGE_NAME
*/
public class JOGL {
    public static void main(String[] args) {
        // setup OpenGL Version 2
        GLProfile profile = GLProfile.get(GLProfile.GL2);
        GLCapabilities capabilities = new GLCapabilities(profile);

        // The canvas is the widget that's drawn in the JFrame
        GLCanvas glcanvas = new GLCanvas(capabilities);
        glcanvas.addGLEventListener(new Renderer());
View Full Code Here

        int tileWidth = width / 16;
        int tileHeight = height / 12;
        int imageWidth = width;
        int imageHeight = height;

        GLProfile profile = GLProfile.get(GLProfile.GL2);
        GLCapabilities caps = new GLCapabilities(profile);
        AbstractGraphicsDevice device = GLDrawableFactory.getFactory(profile).getDefaultDevice();
        //Caps

        caps.setAlphaBits(8);
View Full Code Here

    protected abstract void reshape3DScene(GL2 gl);

    protected abstract void setCameraPosition(GL2 gl, GLU glu);

    protected GLCapabilities getCaps() {
        GLProfile profile = GLProfile.get(GLProfile.GL2);
        GLCapabilities caps = new GLCapabilities(profile);

        try {
            caps.setAlphaBits(8);    //if NOT opaque
            caps.setDoubleBuffered(true);
View Full Code Here

TOP

Related Classes of javax.media.opengl.GLProfile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.