I learn from this blog and he's project. You can read detail from that blog.
The below are OpenGL documents:
- absolutely model OpenGL with version 4.x and use
<GL/glcorearb.h>
instead of<GL/gl.h>
and<GL/glext.h>
. - compared to the project above, this project use draw commands to draw an triangle.
- this project is based on msys2, sorry now, I don't provide solution for visual studio.
- download msys2, need
gcc
. - then just
make
. - run
main.exe
.
This is the runtime screenshot: