Commit Graph
4 Commits
Author SHA1 Message Date
Nunuhara Cabbage 2237bb814c Implement various HLL functions for Rance Quest
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?!?!).
2023-02-12 15:59:36 -08:00
kichikuou da5ac4a26c Support OpenGL ES 3.0
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.
2021-06-20 17:12:35 +09:00
kichikuou 7fcacb3c16 Fix OpenGL issues on MacOS
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
2020-09-03 23:16:08 +09:00
Nunuhara Cabbage e90821cc20 Use OpenGL instead of SDL's 2D graphics API
This will be necessary for supporting 3D games in the future (Rance VI,
GALZOO, etc.).
2019-12-16 19:59:17 -08:00