Login  Register

Re: Can someone go over the mechanics of rendering shaders and texture objects

Posted by ElvJOGL on Feb 12, 2016; 2:30pm
URL: https://forum.jogamp.org/Can-someone-go-over-the-mechanics-of-rendering-shaders-and-texture-objects-tp4036186p4036193.html

Everything is referenced the right way now.

But there still seem something wrong in here.

    private void initVbo(GL4 gl4) {

        gl4.glGenBuffers(1, objects, Semantic.Object.VBO);
        gl4.glBindBuffer(GL4.GL_ARRAY_BUFFER, objects[Semantic.Object.VBO]);
        {
///////////////////////////--> pointing to error /////////////////////////////////////////////////////////////
/            //the GLBuffers reference seems broken, I don't know why I am getting RED.
/            //the eclipse error message says this:
/            //"The type com.jogamp.common.nio.Buffers cannot be resolved. It is
/            //indirectly referenced from required .class files"
/     // ----->      ByteBuffer vertexBuffer = GLBuffers.newDirectByteBuffer(vertexData);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            int size = vertexData.length * Byte.BYTES;
            gl4.glBufferData(GL4.GL_ARRAY_BUFFER, size, vertexBuffer, GL4.GL_STATIC_DRAW);
            BufferUtils.destroyDirectBuffer(vertexBuffer);
        }
        gl4.glBindBuffer(GL4.GL_ARRAY_BUFFER, 0);

        checkError(gl4, "initVbo");
    }

-------------------------

Maybe I am missing a jar?

Like I followed what your GitHub readme file says, to only include the jogl-all.jar in the library path.

But if I need to include something else let me know. please.