Hello,

I am trying to convert 3d coordinates into 2d in renderframe method using following code.

if (vbCounter>0)

{

// Render frame around button

glUseProgram(vbShaderProgramID);glVertexAttribPointer(vbVertexHandle, 3, GL_FLOAT, GL_FALSE, 0,

(const GLvoid*) &vbVertices[0]);glEnableVertexAttribArray(vbVertexHandle);

glUniformMatrix4fv(mvpMatrixHandle, 1, GL_FALSE,

(GLfloat*)&modelViewProjection.data[0] );// We multiply by 8 because that's the number of vertices per button

// The reason is that GL_LINES considers only pairs. So some vertices

// must be repeated.

glDrawArrays(GL_LINES, 0, target->getNumVirtualButtons()*8);SampleUtils::checkGlError("VirtualButtons drawButton");

glDisableVertexAttribArray(vbVertexHandle);

///////////////////////////////Light Rectangle /////////////////////////////////////////////////////

glGetDoublev(GL_MODELVIEW_MATRIX, ModelViewMat);

glGetDoublev(GL_PROJECTION_MATRIX, ProjMat);

glGetIntegerv(GL_VIEWPORT, Viewport);gluProject(-97.68f, -28.f, 0.f, modelViewMatrix.data,projectionMatrix.data,Viewport,& blY_Lite,& blX_Lite,&winZ);

gluProject(-15.93.f, -28.f, 0.f, modelViewMatrix.data,projectionMatrix.data,Viewport,& brY_Lite,& brX_Lite,&winZ);

gluProject(-97.68f, -50.52.f, 0.f, modelViewMatrix.data,projectionMatrix.data,Viewport,& tlY_Lite,& tlX_Lite,&winZ);

gluProject(-15.93f, -50.52f, 0.f, modelViewMatrix.data,projectionMatrix.data,Viewport,& trY_Lite,& trX_Lite,&winZ);

}

Now NDK does not build and give errors that it does not recognize GL_VIEWPORT, GL_PROJECTION_MATRIX and GL_MODELVIEW_MATRIX constants. Does anybody knows solution to it? It says opengl es2/gl2 at top. Does anybody knows how to get these constants.

Sounds great!