Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are all the simple functions gone in WebGL?

glBegin/glEnd and per-vertex drawing with glVertex I can understand that using arrays can be faster.

But where is glLoadIdentity? glMultMatrix? glTranslate? glRotate?

Why do we have to handle all the matrix stuff ourselves?

like image 582
Manux Avatar asked Jul 24 '10 23:07

Manux


1 Answers

WebGL is an Open ES 2.0 binding. OpenGL ES 2.0 (and modern OpenGL 3.2+) does not have these deprecated functions, everything must be done in shaders and or your own matrix libraries.

Good thing is that there is plenty of matrix libraries available for WebGL, one of the best/fastest being glMatrix ( https://github.com/toji/gl-matrix ).

like image 161
neonux Avatar answered Oct 16 '22 13:10

neonux