以下代码导致glGetError()
在加载OpenGL 3.3核心配置文件时返回1280或无效枚举的任何想法?
GLuint texture = 0;
glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture);
glTexImage2D(GL_TEXTURE_2D, 0,
GL_RGB,
textureImage.Width(), textureImage.Height(), 0,
GL_RGB, GL_UNSIGNED_BYTE,
textureImage.Bytes()
);
如果我不加载核心配置文件并且除了错误代码之外它似乎没有失败,如果我使用AMD的gDebugger来查看纹理的内容,它工作正常。纹理是256 x 256 png,我正在使用stb_image.c加载到ram中。
答案 0 :(得分:0)
glewInit()
实际上导致选择了核心配置文件的无效枚举。