William
William

Reputation: 8808

"cannot find symbol variable BufferUtils"

I'm trying to load an image into Java to create a texture in JoGL. I need to use a call to BufferUtils for this:

dest = ByteBuffer.allocateDirect(data.length * BufferUtils.SIZEOF_INT);

But it's telling me that it can't find it. This is all I have imported:

import javax.media.opengl.*;
import javax.media.opengl.glu.*;
import com.sun.opengl.util.*;
import com.sun.opengl.util.j2d.*;

import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.io.*;
import java.net.*;
import java.nio.*;
import javax.imageio.*;
import javax.swing.*;

Upvotes: 1

Views: 708

Answers (1)

McDowell
McDowell

Reputation: 108899

I think you mean BufferUtil (no 's').

Upvotes: 1

Related Questions