我正在使用glext.h(http://oss.sgi.com/projects/ogl-sample/ABI/glext.h)来访问Windows窗体应用程序的OpenGL缓冲区函数。
PFNGLGENBUFFERSPROC myglGenBuffers = PFNGLGENBUFFERSPROC)wglGetProcAddress("glGenBuffers");
PFNGLGENBUFFERSPROC myglBindBuffer = (PFNGLGENBUFFERSPROC)wglGetProcAddress("glBindBuffer");
PFNGLGENBUFFERSPROC myglBufferData = (PFNGLGENBUFFERSPROC)wglGetProcAddress("glBufferData");
PFNGLGENBUFFERSPROC myglDeleteBuffer = (PFNGLGENBUFFERSPROC)wglGetProcAddress("glDeleteBuffer");
除glBufferData外,它们似乎都有效。 myglBufferData需要
(GLsizei, GLuint *)
而不是
(GLenum, GLsizeiptr, const GLvoid *, GLenum)^
作为输入参数,我无法弄清楚原因。我做错了什么?
不幸的是,使用GLEW不是一种选择。
^ glBufferData规范
答案 0 :(得分:3)
复制粘贴错误?
PFNGLGENBUFFERSPROC应该是PFNGLBUFFERDATAPROC(等等)?