Package heronarts.glx

Class GLXUtils

java.lang.Object
heronarts.glx.GLXUtils

public class GLXUtils extends Object
  • Method Details

    • loadRaster

      public static GLXUtils.Image loadRaster(int[] argb, int width, int height)
    • loadImage

      public static GLXUtils.Image loadImage(String path) throws IOException
      Throws:
      IOException
    • loadShader

      public static ByteBuffer loadShader(GLX glx, String name) throws IOException
      Throws:
      IOException
    • loadResourceStream

      public static InputStream loadResourceStream(String resourcePath) throws IOException
      Gets an input stream for the resource at the given path
      Parameters:
      resourcePath - Path to the resource
      Returns:
      Resource input stream
      Throws:
      IOException - If loading resource stream fails
    • loadResource

      public static ByteBuffer loadResource(String resourcePath) throws IOException
      Loads the resource at the given path into a newly allocated buffer. The buffer is owned by the caller and must be freed explicitly.
      Parameters:
      resourcePath - Path to the resource
      Returns:
      Buffer allocated by MemoryUtil
      Throws:
      IOException - If there is an error loading the resource
    • loadFile

      public static ByteBuffer loadFile(String file) throws IOException
      Throws:
      IOException