Examples of Pbuffer


Examples of org.lwjgl.opengl.Pbuffer

  UniqueRenderer(final int width, final int height, final int texID) {
    super(width, height, texID);
  }

  protected Pbuffer init(final int width, final int height, final int texID) {
    Pbuffer pbuffer = null;

    try {
      pbuffer = new Pbuffer(width, height, new PixelFormat(16, 0, 0, 0, 0), null, null);

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

      PbufferTest.initGLState(width, height, 0.5f);
      glBindTexture(GL_TEXTURE_2D, texID);

      Display.makeCurrent();
View Full Code Here

Examples of org.lwjgl.opengl.Pbuffer

    super(width, height, texID);
  }

  // Initialize texture renderer
  protected Pbuffer init(final int width, final int height, final int texID) {
    Pbuffer pbuffer = null;

    try {
      final RenderTexture rt = new RenderTexture(true, false, false, false, RenderTexture.RENDER_TEXTURE_2D, 0);
      pbuffer = new Pbuffer(width, height, new PixelFormat(16, 0, 0, 0, 0), rt, null);

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

      PbufferTest.initGLState(width, height, 0.5f);
      glBindTexture(GL_TEXTURE_2D, texID);

      Display.makeCurrent();
View Full Code Here

Examples of org.lwjgl.opengl.Pbuffer

   * Initializes the test
   */
  private void initialize() {
    try {
      //find displaymode
      pbuffer = new Pbuffer(512, 512, new PixelFormat(), null, null);
      mode = findDisplayMode(800, 600, 16);
      Display.setDisplayMode(mode);
      // start of in windowed mode
      Display.create();
//      gl = new GLWindow("Test", 50, 50, mode.width, mode.height, mode.bpp, 0, 0, 0);
View Full Code Here

Examples of org.lwjgl.opengl.Pbuffer

  private void render() {
    if (pbuffer.isBufferLost()) {
        System.out.println("Buffer contents lost - will recreate the buffer");
        pbuffer.destroy();
  try {
          pbuffer = new Pbuffer(512, 512, new PixelFormat(), null, null);
          initPbuffer();
  } catch (LWJGLException e) {
    e.printStackTrace();
  }
    }
View Full Code Here

Examples of org.lwjgl.opengl.Pbuffer

   *
   * @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.Pbuffer

                ContextManager.removeContext(_pbuffer);
            }
            final PixelFormat format = new PixelFormat(_settings.getAlphaBits(), _settings.getDepthBits(),
                    _settings.getStencilBits()).withSamples(_settings.getSamples())
                    .withBitsPerPixel(_settings.getColorDepth()).withStereo(_settings.isStereo());
            _pbuffer = new Pbuffer(_width, _height, format, _texture, null);
            final Object contextKey = _pbuffer;
            try {
                _pbuffer.makeCurrent();
            } catch (final LWJGLException e) {
                throw new RuntimeException(e);
View Full Code Here

Examples of org.lwjgl.opengl.Pbuffer

        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.Pbuffer

   */
  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.Pbuffer

  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.Pbuffer

      // // 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
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.