I am trying to follow the OpenGL Superbible (4th Edition) example (ThunderbirdGL) and they have a function glMapBuffers() in a VBOMesh.cpp file and I can't get that function to be recognized by any header that is included with GL. Am I missing something simple?
///////////////////////////////////////////////////////////////////////////
// Scale of the vertices. The only way to do this is to map the VBO back
// into client memory, then back again
void CVBOMesh::Scale(GLfloat fScaleValue)
{
glFuncs.glBindBuffer(GL_ARRAY_BUFFER, bufferObjects[VERTEX_DATA]);
M3DVector3f *pVertexData = (M3DVector3f *)glMapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE);
if(pVertexData != NULL)
{
for(unsigned int i = 0; i < nNumVerts; i++)
m3dScaleVector3(pVertexData[i], fScaleValue);
glUnmapBuffer(GL_ARRAY_BUFFER);
}
}
///////////////////////////////////////////////////////////////////////////
// Scale of the vertices. The only way to do this is to map the VBO back
// into client memory, then back again
void CVBOMesh::Scale(GLfloat fScaleValue)
{
glFuncs.glBindBuffer(GL_ARRAY_BUFFER, bufferObjects[VERTEX_DATA]);
M3DVector3f *pVertexData = (M3DVector3f *)glMapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE);
if(pVertexData != NULL)
{
for(unsigned int i = 0; i < nNumVerts; i++)
m3dScaleVector3(pVertexData[i], fScaleValue);
glUnmapBuffer(GL_ARRAY_BUFFER);
}
}
To copy to clipboard, switch view to plain text mode
The error I see from the compiler is:
../shared/VBOMesh.cpp:204: error: 'glMapBuffer' was not declared in this scope
../shared/VBOMesh.cpp:211: error: 'glUnmapBuffer' was not declared in this scope
where shared is the folder that VBOMesh is in.
http://www.opengl.org/sdk/docs/man/x...lMapBuffer.xml reference for glMapBuffer
http://www.opengl.org/sdk/docs/man4/...lMapBuffer.xml reference for glUnmapBuffer
Any help would be awesome! Thanks
Bookmarks