]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/vertexsetup.cpp
Use friend declarations to access OpenGL IDs of objects
[libs/gl.git] / source / core / vertexsetup.cpp
index 0971aed1c62f08c8c2823e873bcf86ce5ba15ba4..cda38b458fbb670bca4426d2c7060e4d7786d0f2 100644 (file)
@@ -137,9 +137,9 @@ void VertexSetup::update() const
        if(dirty&INDEX_BUFFER)
        {
                if(direct)
-                       glVertexArrayElementBuffer(id, index_buffer->get_id());
+                       glVertexArrayElementBuffer(id, index_buffer->id);
                else
-                       glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer->get_id());
+                       glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer->id);
        }
 
        dirty = 0;
@@ -150,14 +150,14 @@ void VertexSetup::update_vertex_array(const VertexArray &array, unsigned binding
        if(!direct)
        {
                Buffer::unbind_scratch();
-               glBindBuffer(GL_ARRAY_BUFFER, array.get_buffer()->get_id());
+               glBindBuffer(GL_ARRAY_BUFFER, array.get_buffer()->id);
        }
 
        const VertexFormat &fmt = array.get_format();
        unsigned stride = fmt.stride();
        if(direct)
        {
-               glVertexArrayVertexBuffer(id, binding, array.get_buffer()->get_id(), 0, stride);
+               glVertexArrayVertexBuffer(id, binding, array.get_buffer()->id, 0, stride);
                glVertexArrayBindingDivisor(id, binding, divisor);
        }