Package heronarts.glx
Class GLXUtils
java.lang.Object
heronarts.glx.GLXUtils
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBufferstatic GLXUtils.Imagestatic GLXUtils.ImageloadRaster(int[] argb, int width, int height) static ByteBufferloadResource(String resourcePath) Loads the resource at the given path into a newly allocated buffer.static InputStreamloadResourceStream(String resourcePath) Gets an input stream for the resource at the given pathstatic ByteBufferloadShader(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
-