I have this code.
class VBO (size: Int, usage: Int,
private val vao: Int = GL30.glGenVertexArray(),
private val vbo: Int = GL15.glGenBuffers())
Why can I use size and usage in other methods in the class? Also what are they considered (fields, methods, ect.)?
They are usable because, presumably, you need them for some reason, seeing as you declared them as parameters. They are effectively
private valif you use them ondeforlazy val. If you do not use them at all, or only to initializevalorvar, they exist only in the constructor, and are not part of the instances created.