Most of the functionality of gfx_render_texture (draw method, blend
rate) is moved into sprite_render, since this was the only place using
it.
The draw method and blend rate are now stored in sact_sprite objects
instead of textures.
sact_sprite now has two renderers: the old SACT2 renderer (with blend
rate as the only shader parameter) and the new ChipmunkSpriteEngine
renderer, which supports multiply/add colors and the "surface area"
feature from PartsEngine.
Rance Quest now runs up to the first Flash-related function call
(Flash?!?!).
This adds `USE_GLES` compile-time flag. If it's defined, gfx_init()
requests an OpenGL ES >=3.0 context.
This also makes the following changes to make it work with OpenGL ES:
- The USE_GLES flag also switches shader's #version directive, which is
now provided separately from the .glsl file.
- Implicit conversion between int and float is not supported in GLSL ES.
- Use GL_RGB in gfx_copy_main_surface. Because main_surface is in GL_RGB
format, using GL_RGBA generates GL_INVALID_OPERATION in OpenGL ES.
MacOS does not support OpenGL compatibility profile, so the following
changes had to be made:
- Replaced deprecated texture2D() with texture() in shaders
- Renamed `texture` uniform variable to `tex`, to avoid name conflict
- Use VAO, which is mandatory in OpenGL 3 core profile