Before this change, the pixel object buffer is unbound just after
getting a pointer by glMapBuffer. This seemed suspicious.
This change fixes to do all pixel manipulations once between
glMapBuffer and glUnmapBuffer without changing a bound buffer.
This might fix a wrong rendering on some machines, but I am not
sure.
Updates #993
This change is an experimental implementation to use Pixel Buffer
Objects. This reduces calls of glTexSubImage2D.
This works only on desktops. Unfortunately WebGL does not have
this features. Mobiles can have PBO as of OpenGL ES 3.
Updates #976
This enables thread available not only for the main thread but also
any threads.
This is a preparation for iOS Metal, that runs drawing functions on
a particular thread.
Updates #737
Attribute variables are often optimized out and it is really hard
to prevent this.
Instead of implicit indices of attribute variables, use explicit
indices by glBindAttribLocation.
Bug: #816
Now ReplacePixels command is called only when necessary.
This also ensures that DrawImage must be called after ReplacePixels
is called since there is a potential problem that rendering images
on a texture without initializing by replacing pixels might cause
problems (escpecially on Metal. Perhaps #593 might be related).