![]() But my question is from where glDrawArrays() get the points? In this example and it works fine taking the point from mLightPosInModelSpace. GLES20.glDrawArrays(GLES20.GL_POINTS, 0, 1) Īnd see that after enabling vertex Attribute Array glDrawArrays() get points from that enabled array. GLES20.glUniformMatrix4fv(pointMVPMatrixHandle, 1, false, mMVPMatrix, 0) Matrix.multiplyMM(mMVPMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0) Matrix.multiplyMM(mMVPMatrix, 0, mViewMatrix, 0, mLightModelMatrix, 0) GLES20.glDisableVertexAttribArray(pointPositionHandle) Since we are not using a buffer object, disable vertex arrays for this attribute. GLES20.glVertexAttrib3f(pointPositionHandle, mLightPosInModelSpace, mLightPosInModelSpace, mLightPosInModelSpace) private void drawLight()įinal int pointMVPMatrixHandle = GLES20.glGetUniformLocation(mPointProgramHandle, "u_MVPMatrix") įinal int pointPositionHandle = GLES20.glGetAttribLocation(mPointProgramHandle, "a_Position") The following function is used to draw the point with disabled Vertex Attribute Array. Here is a light point with 4 numbers: private final float mLightPosInModelSpace = new float News 1-21-12 - BlackBerry Native SDK and Linux/X11 ports of sample code added I am pleased to announce the availability of the OpenGL ES 2.0 Programming Guide sample code to two new platforms: BlackBerry Native SDK and Linux/X11. I am working with code segment taken from the following site: ![]() I have started learning Opengl ES 2.0 for android. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |