On Saturday, 3 September 2016 at 16:01:34 UTC, Mike Parker wrote:

The following compiles, runs, and shows the triangle. It's the code you posted above with the corrected call to glBufferData along with more D style (as I would write it anyway) and less C.

One thing I overlooked. In lines where a variable is both declared and initialized, like this one:
GLFWwindow* window = glfwCreateWindow(...);

I normally let the compiler use type inference as I did in the manifest constant declarations:
auto window = glfwCreateWindow(...);

IMO, when you're dealing with long or ugly type names, it makes the code look cleaner.

Reply via email to