The code is too long to put on Stack Overflow, so I put it in a Gist. To use the code, you need to use only one of the main.cpp files.
I am learning from learnopengl.com and I am at the point where I draw the triangle. However, my Object Oriented code does not draw the triangle. When I expanded my code (like macros, e.g. expanding ADD(x, y)
to x + y
when #define ADD(x, y) x + y
), the code worked. In fact, every time I tried to object orient OpenGL, it always failed. What am I doing wrong?