[Beware: Highly Noobish question incoming!]
Hello folks!
So I'm just starting with OpenGL or graphics programming in general. I wanted to use a higher-order language such as Scala and figured I could use lwjgl (version 3) to learn about all this stuff.
I started coding and after a few bugs I mentioned in another thread, I was advised to open another one, because some of my problems were obviously my own faults, coming from me being a noob. (
http://forum.lwjgl.org/index.php?topic=4800.msg29804#msg29804)
So, here I am, sitting in front of my PC, trying to figure out what I am doing wrong. I'm not a native speaker so maybe that's it, but spasi said that it's not the actual code in my main rendering-loop, but the actual order of rendering, which seems to be a contradiction to me.
Anyway, here is what I think I'm doing/trying to do:
At first I create a window, set my callbacks and some glfw hints.
Then I create a new Loader. A Loader may "load" some kind of information into VertexArrayObjects which consists of VertexBufferObjects, currently basically the positions of the vertices and the indices to save memory and returns a Model, which holds the id of the VAO.
Then I update my window as long as it's not closed. That means I prepare my renderer (Clearing the window), swap the buffers, poll events and render my model.
I'm not sure where I should place my "swapping", because everything I tried does not work. So, maybe I've got it all wrong and need to start over?
I've attached a copy of my current code, it's just a few basic classes which should've helped me to understand what's going on and render a rectangle on screen. (Oh, and I thought, maybe it's not getting color, so I started with a ShaderProgram, but as soon as I initialize that I get a black screen
)