Код: Выделить всё
#include
#include
#include
// C/C++ -> Code Generation -> Runtime Library -> /MD
static unsigned int CompileShader(unsigned int type, const std::string& source) {
unsigned int id = glCreateShader(type);
const char* src = source.c_str();
glShaderSource(id, 1, &src, nullptr);
glCompileShader(id);
int result;
glGetShaderiv(id, GL_COMPILE_STATUS, &result);
if (result == GL_FALSE) {
int length;
glGetShaderiv(id, GL_INFO_LOG_LENGTH, &length);
char* message = (char*)alloca(length * sizeof(char));
glGetShaderInfoLog(id, length, &length, message);
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79150278/i-am-getting-multiple-errors-in-glew-glfw[/url]