I have recently started programming in java again after about a year doing other stuff.
Now I wanted to refurbish an old engine I had laying around.
I upgraded it from OpenGL 1.1/Immediate mode, to OpenGL 3.2 Core.
But for some reason it won’t display the vertices(I am completely new to Modern OpenGL).
If someone could take a look and help, I would greatly appreciate it
Affected source code:
Gist: View on Github Gist
Source Code: Download (OneDrive)
Edit:
I have also tested with a simple Triangle, and still nothing…
Reference I used: https://github.com/SilverTiger/lwjgl3-tutorial/wiki/Rendering
EDIT 2:
I figured it out…
I set the perspective matrix zNear to negative value :emo: , while it should be above 0
This:
matrixPerspective = Matrix4f.perspective(45, ratio, -1f, 1024f);
should be something like this:
matrixPerspective = Matrix4f.perspective(45, ratio, 0.1f, 1024f)