smealum/ctrulib — pull request #14 by StapleButter (2014-10-23 16:05:21+00:00)
Title: Alphablending, color logic op, alphatest, multitexturing, and more stability

Notes:

GPU_FinishDrawing() is to be called after a batch of GPU_DrawArray() or GPU_DrawElements() calls if a) you're done drawing or b) you intend to change the GPU configuration before drawing more.

GPU no longer freezes if GPU_DrawArray/Elements is called an even number of times.

GPU_SetTextureEnable() takes a bitmask specifying which textures to enable. GPU_SetTextureEnable(GPU_TEXUNIT0|GPU_TEXUNIT1|GPU_TEXUNIT2); would enable all three texture units for example.

In consequence, GPU_SetTexture() takes an extra parameter (GPU_TEXUNIT0/1/2) specifying which texture unit to setup.