Examples of GLCapabilities


Examples of javax.media.opengl.GLCapabilities

    private Window(WindowSettings settings,
                  Provider<Scene> sceneProvider,
                  Provider<Controller> controllerProvider) {

        final GLProfile profile = GLProfile.getDefault();
        final GLCapabilities capabilities = new GLCapabilities(profile);
        logger.info(capabilities.toString());
        window = GLWindow.create(capabilities);

        window.setSize(settings.getWidth(), settings.getHeight());
        window.setTitle(settings.getTitle());
        window.setFullscreen(settings.isFullScreen());
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

            if (gc == null) {
                GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
                GraphicsDevice gd = ge.getDefaultScreenDevice();
                gc = gd.getDefaultConfiguration();
            }
            caps = new GLCapabilities(Xenon3D.getProfile());
            caps.setDoubleBuffered(isDoubleBufferAvailable());
            caps.setHardwareAccelerated(isHardwareAccelerationAvailable());
        }
        this.gc = gc;
        this.offScreen = offScreen;
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

  public static final int INIT_HEIGHT = 600;

  private final TestbedController controller;

  public JoglPanel(final TestbedModel model, final TestbedController controller) {
    super(new GLCapabilities(GLProfile.getDefault()));
    this.controller = controller;
    setSize(600, 600);
    setPreferredSize(new Dimension(600, 600));
    setAutoSwapBufferMode(true);
    addGLEventListener(this);
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

public class Test {

  public static void main(String... args){
//    GLProfile glp = GLProfile.getDefault(GLProfile.getDefaultDevice());
    GLProfile glp = GLProfile.get(GLProfile.GL4);
    GLCapabilities caps = new GLCapabilities(glp);
    GLWindow window = GLWindow.create(caps);
   
    SpritesListener listener = new SpritesListener(new Configuration(null, null, 800, 600, 800, 600));
   
    Animator animator = new Animator(window);
View Full Code Here

Examples of javax.media.opengl.GLCapabilities

  protected void allocate() {
    if (context == null) {
//        System.out.println("PGraphicsOpenGL.allocate() for " + width + " " + height);
//        new Exception().printStackTrace(System.out);
        // If OpenGL 2X or 4X smoothing is enabled, setup caps object for them
        GLCapabilities capabilities = new GLCapabilities();
        // Starting in release 0158, OpenGL smoothing is always enabled
        /*//     
        if (!hints[DISABLE_OPENGL_2X_SMOOTH]) {
          capabilities.setSampleBuffers(true);
          capabilities.setNumSamples(2);
        } else if (hints[ENABLE_OPENGL_4X_SMOOTH]) {
          capabilities.setSampleBuffers(true);
          capabilities.setNumSamples(4);
        }
        */
       
        //FIXME ADDED
        if (MT4jSettings.getInstance().isMultiSampling()){
          capabilities.setSampleBuffers(true);
          capabilities.setNumSamples(MT4jSettings.getInstance().getNumSamples());
//        capabilities.setNumSamples(4);
        }

        //We need a stencil buffer!
        capabilities.setStencilBits(8);
       
//        capabilities.setDepthBits(4);
//        capabilities.setDepthBits(32);

        // get a rendering surface and a context for this canvas
View Full Code Here

Examples of net.java.games.jogl.GLCapabilities

        canvas.removeGLEventListener(this);

        this.c3d = c3d;
        glc = gc;
        if (glc==null) glc = new GLCapabilities();
        if (ctx==null) ctx = GLContextFactory.getFactory().createGLContext((Component)owner, glc, new DefaultGLCapabilitiesChooser(), null);
        if (!ctx.canCreatePbufferContext()) throw new RuntimeException("PBuffers not supported.");
        pbuffer = new GLPbufferImpl(ctx.createPbufferContext(glc,width,height));

        pbuffer.addGLEventListener(this);
View Full Code Here

Examples of net.java.games.jogl.GLCapabilities

        pbuffer.addGLEventListener(this);
    }

    public static void initContext(Object owner) {
        ctx = GLContextFactory.getFactory().createGLContext((Component)owner, new GLCapabilities(), new DefaultGLCapabilitiesChooser(), null);
    }
View Full Code Here

Examples of net.java.games.jogl.GLCapabilities

    private FlatRenderer flatRenderer = null;
    private JPanel panel = null;
    private Image lastImage;

    public OpenGLRenderer() {
        GLCapabilities capbilities = new GLCapabilities();
        capbilities.setDoubleBuffered(true);
        capbilities.setAlphaBits(8);
        capbilities.setRedBits(8);
        capbilities.setGreenBits(8);
        capbilities.setBlueBits(8);       
        System.out.println("OpenGL Renderer: cons");
        canvas = GLDrawableFactory.getFactory().createGLCanvas(capbilities);
        flatRenderer = new FlatRenderer();
        //flatRenderer.init(canvas);
        addRenderEventListener(flatRenderer);
View Full Code Here

Examples of net.java.games.jogl.GLCapabilities

    // since we doing active rendering
   
    this.renderer = new JOGLRenderer(vsync);
   
    this.canvas = GLDrawableFactory.getFactory().createGLCanvas(
            new GLCapabilities());
    this.canvas.addGLEventListener(this.renderer);
    this.canvas.setNoAutoRedrawMode(true);
   
    this.canvas.setFocusable(true);
    this.canvas.setSize(this.size);
View Full Code Here

Examples of net.java.games.jogl.GLCapabilities

    // time to create OpenGL canvas
    // create the JOGL event listener and renderer
    this.renderer = new JOGLRenderer(vsync);
   
    this.canvas = GLDrawableFactory.getFactory().createGLCanvas(
            new GLCapabilities());
    this.canvas.addGLEventListener(this.renderer);
    this.canvas.setNoAutoRedrawMode(true);
   
    this.canvas.setFocusable(true);
    this.canvas.setSize(this.size);
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.