Examples of Framebuffer


Examples of mdesl.graphics.glutils.FrameBuffer

      int width = track.getWidth();
      int height = track.getHeight();
     
      //create a new FBO with the width and height of our track
      if (Texture.isNPOTSupported()) {
        fbo = new FrameBuffer(width, height);
        fboRegion = new TextureRegion(fbo.getTexture());
      } else {
        int texWidth = Texture.toPowerOfTwo(width);
        int texHeight = Texture.toPowerOfTwo(height);
        fbo = new FrameBuffer(texWidth, texHeight);
        fboRegion = new TextureRegion(fbo.getTexture(), 0, texHeight-height, width, height);
      }
      fboRegion.flip(false, true);
      //GL uses lower left coords... we use upper-left for textures, so we need to flip Y
     
View Full Code Here

Examples of mdesl.graphics.glutils.FrameBuffer

    Display.setResizable(false);
   
    //load our shader program and sprite batch
    try {
      //create our FBOs
      blurTargetA = new FrameBuffer(FBO_SIZE, FBO_SIZE, Texture.LINEAR);
      blurTargetB = new FrameBuffer(FBO_SIZE, FBO_SIZE, Texture.LINEAR);
     
      //our basic pass-through vertex shader
      final String VERT = Util.readFile(Util.getResourceAsStream("res/shadertut/lesson5.vert"));

      //our fragment shader, which does the blur in one direction at a time
View Full Code Here

Examples of sprites.base.ogl.Framebuffer

    this.gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
   
    this.gl.glBindTexture(GL_TEXTURE_2D, 0);
    this.gl.glBindFramebuffer(GL_FRAMEBUFFER, 0);
   
    return new Framebuffer(fb, texture);
  }
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.