Examples of PixelFormat


Examples of org.lwjgl.opengl.PixelFormat

        if (_inited) {
            return;
        }

        // create the Display.
        final PixelFormat format = new PixelFormat(_settings.getAlphaBits(), _settings.getDepthBits(),
                _settings.getStencilBits()).withSamples(_settings.getSamples()).withStereo(_settings.isStereo());

        try {
            Display.setParent(_canvas);
            // NOTE: Workaround for possible lwjgl "pixel not accelerated" bug, as suggested by user "faust"
View Full Code Here

Examples of org.lwjgl.opengl.PixelFormat

        final int width = _settings.getWidth();
        final int height = _settings.getHeight();

        try {
            // Create a Pbuffer so we can have a valid gl context to work with
            final PixelFormat format = new PixelFormat(_settings.getAlphaBits(), _settings.getDepthBits(),
                    _settings.getStencilBits());
            _buff = new Pbuffer(1, 1, format, null);
            _buff.makeCurrent();
        } catch (final LWJGLException ex) {
            ex.printStackTrace();
View Full Code Here

Examples of org.lwjgl.opengl.PixelFormat

    // '_updated'
    private CountDownLatch _latch = null;

    public LwjglAwtCanvas(final DisplaySettings settings, final LwjglCanvasRenderer canvasRenderer)
            throws LWJGLException {
        super(new PixelFormat(settings.getColorDepth(), settings.getAlphaBits(), settings.getDepthBits(), settings
                .getStencilBits(), settings.getSamples()).withStereo(settings.isStereo()));
        _settings = settings;
        _canvasRenderer = canvasRenderer;
        _canvasRenderer.setCanvasCallback(new LwjglCanvasCallback() {
            @Override
View Full Code Here

Examples of org.lwjgl.opengl.PixelFormat

            }
        } else {
            mode = new DisplayMode(_settings.getWidth(), _settings.getHeight());
        }

        final PixelFormat format = new PixelFormat(_settings.getAlphaBits(), _settings.getDepthBits(),
                _settings.getStencilBits()).withSamples(_settings.getSamples()).withStereo(_settings.isStereo());

        try {
            Display.setDisplayMode(mode);
            Display.setFullscreen(_settings.isFullScreen());
View Full Code Here

Examples of org.lwjgl.opengl.PixelFormat

   */
  private void init() throws SlickException {
    try {
      Texture tex = InternalTextureLoader.get().createTexture(image.getWidth(), image.getHeight());

      pbuffer = new Pbuffer(screenWidth, screenHeight, new PixelFormat(8, 0, 0), null, null);
      // Initialise state of the pbuffer context.
      pbuffer.makeCurrent();

      initGL();
      image.draw(0,0);
View Full Code Here

Examples of org.lwjgl.opengl.PixelFormat

  private void init() throws SlickException {
    try {
      Texture tex = InternalTextureLoader.get().createTexture(image.getWidth(), image.getHeight());
     
      final RenderTexture rt = new RenderTexture(false, true, false, false, RenderTexture.RENDER_TEXTURE_2D, 0);
      pbuffer = new Pbuffer(screenWidth, screenHeight, new PixelFormat(8, 0, 0), rt, null);

      // Initialise state of the pbuffer context.
      pbuffer.makeCurrent();

      initGL();
View Full Code Here

Examples of org.lwjgl.opengl.PixelFormat

      // // Pbuffer pbuffer = null;
      width = 800;
      height = 600;
      try {

        pbuffer = new Pbuffer(width, height, new PixelFormat(), null,
            null);
        if (pbuffer.isBufferLost()) {
          System.err.println("PBuffer is lost!");
        }
        pbuffer.makeCurrent();
View Full Code Here

Examples of org.lwjgl.opengl.PixelFormat

   *
   * @throws SlickException Indicates a failure to create the shared drawable
   */
  public static void enableSharedContext() throws SlickException {
    try {
      SHARED_DRAWABLE = new Pbuffer(64, 64, new PixelFormat(8, 0, 0), null);
    } catch (LWJGLException e) {
      throw new SlickException("Unable to create the pbuffer used for shard context, buffers not supported", e);
    }
  }
View Full Code Here

Examples of org.lwjgl.opengl.PixelFormat

  public void run(GameSystem system) {
    try {
      //Display.setDisplayMode(new DisplayMode(600, 400));
      Display.setDisplayModeAndFullscreen(Display.getDesktopDisplayMode());
      Display.create(new PixelFormat(8, 24, 0, 4));
      Display.setVSyncEnabled(true);
    } catch (LWJGLException e) {
      e.printStackTrace();
      System.exit(0);
    }
View Full Code Here

Examples of org.lwjgl.opengl.PixelFormat

  }

  public int getMaxAA() throws LWJGLException {
    int result = 0;
    PixelFormat format = new PixelFormat(0, 24, 0, 0);
    Pbuffer pb = new Pbuffer(10, 10, format, null);
    pb.makeCurrent();
    if (GLContext.getCapabilities().GL_ARB_multisample) {
      result = glGetInteger(GL30.GL_MAX_SAMPLES);
    }
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.