mirror of
https://github.com/Nexoniarz/Fry3DX.git
synced 2026-11-03 04:24:26 +00:00
OpenGL ES 3.0 for phones without Vulkan; the old-GPU renderer draws the grid; site fonts
- Android: Vulkan 1.3 if the phone has it, else OpenGL ES 3.0 (the fallback renderer, which now also runs on ES); the APK no longer needs Vulkan to install - The fallback renderer draws sprites and streaks: the grid and axes - The website ships its fonts (Inter, JetBrains Mono): no more falling back to whatever the visitor has - Android: link the log library (GitHub's build) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMSrd5oe1GpUD7E6d825KP
This commit is contained in:
parent
65705d82f3
commit
5e84ef0e13
13 changed files with 348 additions and 53 deletions
|
|
@ -19,8 +19,8 @@ namespace keel {
|
|||
class Window;
|
||||
using TextureId = uint32_t;
|
||||
|
||||
// OpenGL40/OpenGL31: the cut-down fallback for old GPUs (rhi/gl/gl_legacy.cpp).
|
||||
enum class RenderApi { Vulkan, OpenGL, OpenGL40, OpenGL31 };
|
||||
// OpenGL40/OpenGL31/GLES30: the cut-down fallback for old GPUs and phones (rhi/gl/gl_legacy.cpp).
|
||||
enum class RenderApi { Vulkan, OpenGL, OpenGL40, OpenGL31, GLES30 };
|
||||
|
||||
// Texture slots. 0 and 1 are created by the renderer; 2-4 are the backend's render targets
|
||||
// (sampled through the same table); loaded textures start at kFirstTextureSlot.
|
||||
|
|
@ -235,6 +235,6 @@ public:
|
|||
|
||||
std::unique_ptr<RenderBackend> createVulkanBackend();
|
||||
std::unique_ptr<RenderBackend> createOpenGLBackend();
|
||||
std::unique_ptr<RenderBackend> createLegacyOpenGLBackend(int major, int minor);
|
||||
std::unique_ptr<RenderBackend> createLegacyOpenGLBackend(int major, int minor, bool es = false);
|
||||
|
||||
} // namespace keel
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ bool Renderer::init(const Window& window, bool validation, RenderApi api) {
|
|||
case RenderApi::OpenGL: backend_ = createOpenGLBackend(); break;
|
||||
case RenderApi::OpenGL40: backend_ = createLegacyOpenGLBackend(4, 0); break;
|
||||
case RenderApi::OpenGL31: backend_ = createLegacyOpenGLBackend(3, 1); break;
|
||||
case RenderApi::GLES30: backend_ = createLegacyOpenGLBackend(3, 0, true); break;
|
||||
default: backend_ = createVulkanBackend(); break;
|
||||
}
|
||||
if (!backend_->init(window, validation)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue