Package mdesl.graphics.glutils

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


    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

TOP

Related Classes of mdesl.graphics.glutils.FrameBuffer

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.