Examples of GLCapabilities


Examples of javax.media.opengl.GLCapabilities

        assertNotNull(display);

        Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
        assertNotNull(screen);

        window = NewtFactory.createWindow(screen, new GLCapabilities(GLProfile.getDefault()));
        assertNotNull(window);

        window.setSize(640, 480);

        glWindow = GLWindow.create(window);
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

        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);

//            tGLCapabilities.setAccumAlphaBits(16);
//            tGLCapabilities.setAccumBlueBits(16);
//            tGLCapabilities.setAccumGreenBits(16);
//            tGLCapabilities.setAccumRedBits(16);
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

        timer = new Timer(true);

        juliaSlice = newDirectFloatBuffer(MU_RECT_SIZE * MU_RECT_SIZE * 4);

        canvas = new GLCanvas(new GLCapabilities(GLProfile.get(GLProfile.GL2)));
        canvas.addGLEventListener(this);

        usi = new UserSceneController();
        usi.init(this, canvas, config);

View Full Code Here

Examples of javax.media.opengl.GLCapabilities

    public MultiDeviceFractal(int width, int height) {

        this.width = width;
        this.height = height;

        canvas = new GLCanvas(new GLCapabilities(GLProfile.get(GLProfile.GL2)));
        canvas.addGLEventListener(this);
        initSceneInteraction();

        Frame frame = new Frame("JOCL Multi Device Mandelbrot Set");
        frame.addWindowListener(new WindowAdapter() {
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

    private void initUI() {

        this.width  = 600;
        this.height = 400;

        GLCapabilities config = new GLCapabilities(GLProfile.get(GLProfile.GL2));
        config.setSampleBuffers(true);
        config.setNumSamples(4);

        GLCanvas canvas = new GLCanvas(config);
        canvas.addGLEventListener(this);
        usi.init(canvas);
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

*/
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());
        glcanvas.setSize( 1000, 500 );
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

    overviewFrame.setUndecorated( true );
    overviewFrame.setSize( WiGiOverviewPanel.OVERVIEW_SIZE, WiGiOverviewPanel.OVERVIEW_SIZE );
    overviewFrame.setResizable( false );
    overviewFrame.setIconImage( handler.getWigiIconImage() );

    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered( true );
    caps.setHardwareAccelerated( true );
    WiGiOverviewPanel overviewPanel = new WiGiOverviewPanel( pb );
    overviewFrame.getContentPane().add( overviewPanel );

    caps = new GLCapabilities();
    caps.setDoubleBuffered( true );
    caps.setHardwareAccelerated( true );
    WiGiGUI canvas = new WiGiGUI( caps, pb, frame, overviewFrame, handler );
    overviewPanel.setRenderComponent( canvas );
    canvas.setBounds( 0, 0, pb.getWidthInt(), pb.getHeightInt() );
//    canvas.setDoubleBuffered( true );
    canvas.addMouseListener( canvas );
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

        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);
        caps.setDoubleBuffered(false);
        caps.setHardwareAccelerated(true);
        caps.setSampleBuffers(true);
        caps.setNumSamples(antiAliasing);

        //Buffer

        GLPbuffer pbuffer = GLDrawableFactory.getFactory(profile).createGLPbuffer(device, caps, null, tileWidth, tileHeight, null);
        BufferedImage image = null;
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

    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);
            caps.setHardwareAccelerated(true);

            //FSAA
            int antialisaing = vizController.getVizConfig().getAntialiasing();
            if (antialisaing == 0) {
                caps.setSampleBuffers(false);
            } else if (antialisaing == 2) {
                caps.setSampleBuffers(true);
                caps.setNumSamples(2);
            } else if (antialisaing == 4) {
                caps.setSampleBuffers(true);
                caps.setNumSamples(4);
            } else if (antialisaing == 8) {
                caps.setSampleBuffers(true);
                caps.setNumSamples(8);
            } else if (antialisaing == 16) {
                caps.setSampleBuffers(true);
                caps.setNumSamples(16);
            }
        } catch (javax.media.opengl.GLException ex) {
            Exceptions.printStackTrace(ex);
        }
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

    return this.frame;
  }

  public Window() {
    GLProfile glp = GLProfile.getMinimum(true);
    GLCapabilities caps = new GLCapabilities(glp);
    caps.setDepthBits(24);
    this.canvas = new GLCanvas(caps);

    this.frame = new JFrame("Hexel");
    this.frame.setSize(1280, 800);
    this.frame.add(this.canvas);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.