Package javax.media.opengl

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


            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

  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

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

  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

TOP

Related Classes of javax.media.opengl.GLCapabilities

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.