I am trying to develop using opengles2 in android platform. But i can’t find glMatrixMode method in GLES2/gl2.h header file, but i can find it in GLES/gl.h. Should i include gl.h at the same time i include gl2.h? Is matrix mode necessary in opengles2?
I am trying to develop using opengles2 in android platform. But i can’t find
Share
There is no matrix stack in OpenGL-ES-2. It has been removed entirely. The same goes for modern OpenGL (OpenGL-3 core and later).
You’re supposed to manage matrices yourself, the way every serious 3D graphics application does for years. The matrix stack of <=OpenGL-2.1 and OpenGL-ES-1 never was feature complete and is cumbersome to work with. Good riddance.
There are a number of libraries that implement 3D graphics matrix math. Google for “GLM”, “Eigen” or “linmath.h”