For a while now, I have been learning VBO’s more and trying to move away from deprecated code.
My main struggle was sending the texture coordinates to the shader, I knew what I had to do, but I could never get the them to work.
I finally got the texture coordinates to the shader, but the problem now is the positioning in the VBO.
I have used SHC’s VBO Tutorial and LWJGL Wiki on Textured Quads to produce my VBO Class.
It’s probably not the best VBO class, but its good enough for my testing of drawing 2 squares on the screen currently as I am only testing before I implement it into my game.
The question is what have I done or what do I need to add to allow for sending the x, y, width and height parameters in addRectangle() for values such as 800, 600, 100, 200 etc. Currently I need to supply values in floats between -1f and 1f. Is their a way I can just send 800, 600 etc or will I need to create a method to convert 800 down to a float between -1f and 1f?
also any recommendations on improving my VBO class will be good, but this is not its final state, just its current working state.