I am doing Opengl-es 2.0 in ununtu 10.10 through the use of kronos and pvrsdk .Now code
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
==========|||||||||||||||||||||||||||||||||||===================
GLfloat *pData = glMapBufferOES (GL_ARRAY_BUFFER, GL_WRITE_ONLY_OES);
for(i=0; i<triNum[surfnum]; ++i,pData+=9)
{
memcpy(pData, triArray[surfnum][i].pt1, 3*sizeof(GLfloat));
memcpy(pData+3, triArray[surfnum][i].pt2, 3*sizeof(GLfloat));
memcpy(pData+6, triArray[surfnum][i].pt3, 3*sizeof(GLfloat));
}
glUnmapBufferOES (GL_ARRAY_BUFFER);
Error :
src/Hello.cpp: In function 'int main(int, char**)':
src/Hello.cpp:279: error: 'glMapBufferOES' was not declared in this scope
src/Hello.cpp:282: error: 'memcpy' was not declared in this scope
src/Hello.cpp:286: error: 'glUnmapBufferOES' was not declared in this scope
I know that these are in gl2ext.h I have included this file also but still its giving error there is something i am missing please tell me.You can ask me for any other question or information.
In my glext.h :
/* GL_OES_mapbuffer */
#ifndef GL_OES_mapbuffer
#define GL_OES_mapbuffer 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
#endif
typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
#endif
i have this defined already still its giving these functions as undeclared . so do you know anychange in it so that it cam be used.