I'm trying to write a wrapper for the following bit of scala code:
val vertBuffer: FloatBuffer = createFloatBuffer(vertex_positions.length) vertBuffer.put(vertex_positions) vertBuffer.flip()
However, the class will be used almost exclusively in things like this:
val vboId = glGenBuffers() glBindBuffer(GL_ARRAY_BUFFER, vboId) glBufferData(GL_ARRAY_BUFFER, vertBuffer, GL_STATIC_DRAW)
I'm looking for a way to avoid having to type something similar to
and be able to write just
Thank you for your time.