如何同时使用GLAD.h和freeglut.h?

问题描述 投票:0回答:0
#include freeglut.h
#include glad.h

我收到错误 “已经包含 OpenGL 标头,删除这个包含,很高兴已经提供了它”

我需要用

unsigned int skyboxVAO, skyboxVBO, skyboxEBO;
glGenVertexArrays(1, &skyboxVAO);
glGenBuffers(1, &skyboxVBO);
glGenBuffers(1, &skyboxEBO);
glBindVertexArray(skyboxVAO);

但这些只是在 glad.h

我还需要使用 freeglut.h 中的函数。我如何使用这两个包含函数?

我尝试调换#include freeglut.h 和#include glad.h 的顺序,但它不起作用

c++ opengl glut glad
© www.soinside.com 2019 - 2024. All rights reserved.