If you're asking for my code, it's way too much to be posted easily and I have no access to my PC right now as we're moving and it's now packed.
Also the code is set up to be a library and I will be needing to post more stuff like the executable's code, a shader and a model file to be loaded.
And, the problem on its own has been resolved.