Package heronarts.glx
Class GLXUtils
java.lang.Object
heronarts.glx.GLXUtils
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBuffer
static GLXUtils.Image
static GLXUtils.Image
loadRaster
(int[] argb, int width, int height) static ByteBuffer
loadResource
(String resourcePath) Loads the resource at the given path into a newly allocated buffer.static InputStream
loadResourceStream
(String resourcePath) Gets an input stream for the resource at the given pathstatic ByteBuffer
loadShader
(GLX glx, String name)
-
Method Details
-
loadRaster
-
loadImage
- Throws:
IOException
-
loadShader
- Throws:
IOException
-
loadResourceStream
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
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
- Throws:
IOException
-