1

I have a BufferedImage, but I need to make it into a ByteBuffer so I can apply it to a CubeMap face.

Jerem
  • 1,725
  • 14
  • 24
Ryan Reed
  • 9
  • 1
  • 3
  • I don't know about the Bufferedimage part but here is a tutorial to load a ByteBuffer into a cubemap: http://www.java-tips.org/other-api-tips/jogl/how-to-use-cube-map-textures.html – Jerem Apr 02 '15 at 07:15
  • Please take a look at Harald's response to this question: http://stackoverflow.com/questions/29301838/converting-bufferedimage-to-bytebuffer – Vincent B. Jul 21 '15 at 23:09

1 Answers1

0

Create a byte[] from the BufferedImage that you can put into the ByteBuffer.

Example to create a byte[] can be found here: http://www.mkyong.com/java/how-to-convert-bufferedimage-to-byte-in-java/

Simon Martinelli
  • 34,053
  • 5
  • 48
  • 82