I can’t get the ‘#version’ syntax to compile and when I do, I get this error:
1>triangle.vert(1): fatal error C1021: invalid preprocessor command ‘version’
Am I don’t something wrong? The file I’m working with is a .vert file and the file name is ‘triangle.vert’.
Here’s the code for this file:
#version 430 core
layout(location = 0) in vec4 vPosition;
void main()
{
gl_Position = vPosition;
}
I’m getting this from a book but it doesn’t seem to help with it comes to actually setting up files.
The name of this book is called: “OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition)”