Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
eee39d6
initial changes
Shivansps Dec 4, 2025
af26eac
add GLAD_ES loader
Shivansps Aug 24, 2025
03cbcf8
Implement basic es compatibility header
Shivansps Aug 25, 2025
9340af3
re-add accidentally deleted break
Shivansps Aug 25, 2025
f3b6395
Add GLES BC7 extension to glad and improve extension support report
Shivansps Aug 26, 2025
9f25308
fix some enum mappings
Shivansps Aug 26, 2025
a19d6ea
Use the ARB name for geo shader check
Shivansps Aug 26, 2025
ab47159
Add es espand shader includes
Shivansps Aug 26, 2025
9128132
Fix glbufferstorage mapping
Shivansps Aug 26, 2025
86dd018
fix some gl errors on opengl es
Shivansps Aug 27, 2025
0c4a3f2
Enable GL_CLIP_DISTANCE
Shivansps Aug 28, 2025
252e603
Add format conversions
Shivansps Aug 28, 2025
57d0723
add bgba 8888 to rgba 8888 converter
Shivansps Aug 29, 2025
03c1977
disable GLAD_GL_ARB_timer_query
Shivansps Aug 30, 2025
250af02
Properly handle wgl + opengl es on windows
Shivansps Aug 30, 2025
9342a32
initial enable imgui gles
Shivansps Dec 4, 2025
4a01dd7
add GL_BGR to GL_RGBA conversion
Shivansps Aug 31, 2025
a8c414a
inform opengl es on menu
Shivansps Sep 1, 2025
8c16749
small corrections to the es header
Shivansps Sep 4, 2025
8ec4aec
small refactor of glTexSubImage3D
Shivansps Sep 5, 2025
8cec6d9
remove expandincludes, existing code already did that better
Shivansps Sep 6, 2025
d3a9953
change default graphic values for opengl es
Shivansps Sep 6, 2025
61cb70c
compile imgui with opengl es 3 on linux
Shivansps Sep 6, 2025
80e6b6e
allow qtfred to run on opengl es
Shivansps Sep 8, 2025
ccca7de
improve es compatibility header and remove shader precision quantific…
Shivansps Sep 13, 2025
047c371
add compiler hints
Shivansps Sep 17, 2025
6bdd5aa
remove unused structs
Shivansps Sep 18, 2025
37f8857
Fix imgui crashing on windows with gles, use angle lib
Shivansps Sep 24, 2025
becea4c
Do not use MSAA under OpenGL ES, at least for now
Shivansps Oct 23, 2025
3f55879
add missing profile handler
Shivansps Dec 4, 2025
f446f81
cleanup
Shivansps Dec 4, 2025
e6b3b09
revert color_attachment_4/5 fbo workarounds
Shivansps Dec 10, 2025
7f51cf1
Adjustments to log output and enable GL_BLEND
Shivansps Dec 10, 2025
f5b32e6
Implement glGetQueryObjectui64v on es layer
Shivansps Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,25 @@ OPTION(FSO_BUILD_WITH_DISCORD "Build with Discord support" ON)

OPTION(FSO_BUILD_WITH_OPENGL "Enable compilation of the OpenGL renderer" ON)
OPTION(FSO_BUILD_WITH_OPENGL_DEBUG "Enables debug option for OpenGL" OFF)
OPTION(FSO_BUILD_WITH_OPENGL_ES "When building OpenGL, use OpenGL ES compatibility layer (External shaders only!)" OFF)

OPTION(FSO_BUILD_WITH_VULKAN "Enable compilation of the Vulkan renderer" OFF)

IF(NOT APPLE)
if(NOT FSO_BUILD_WITH_OPENGL AND FSO_BUILD_WITH_OPENGL_ES)
# Disable GLES if not building with OpenGL
set(FSO_BUILD_WITH_OPENGL_ES OFF FORCE)
endif()


if(FSO_BUILD_WITH_OPENGL_ES)
add_definitions(-DUSE_OPENGL_ES)
IF(FSO_BUILD_WITH_OPENXR)
MESSAGE(WARNING "FSO_BUILD_WITH_OPENXR is ON. But not supported on OpenGL ES for now - setting to OFF.")
SET(FSO_BUILD_WITH_OPENXR OFF CACHE BOOL "" FORCE)
endif()
endif()

IF(NOT APPLE AND NOT FSO_BUILD_WITH_OPENGL_ES)
SET(OPENXR_BUILD_DEFAULT ON)
ELSE()
SET(OPENXR_BUILD_DEFAULT OFF)
Expand Down Expand Up @@ -156,6 +171,7 @@ mark_as_advanced(FORCE FSO_BUILD_WITH_FFMPEG)
mark_as_advanced(FORCE FSO_BUILD_WITH_DISCORD)
mark_as_advanced(FORCE FSO_BUILD_WITH_OPENGL)
mark_as_advanced(FORCE FSO_BUILD_WITH_OPENGL_DEBUG)
mark_as_advanced(FORCE FSO_BUILD_WITH_OPENGL_ES)
mark_as_advanced(FORCE FSO_BUILD_WITH_VULKAN)
mark_as_advanced(FORCE FSO_BUILD_WITH_OPENXR)
mark_as_advanced(FORCE FSO_BUILD_WITH_OPENXR_DEBUG)
Expand Down Expand Up @@ -242,5 +258,6 @@ message(STATUS "Release logging: ${FSO_RELEASE_LOGGING}")
message(STATUS "With FFmpeg: ${FSO_BUILD_WITH_FFMPEG}")
message(STATUS "With Discord: ${FSO_BUILD_WITH_DISCORD}")
message(STATUS "With OpenGL: ${FSO_BUILD_WITH_OPENGL}")
message(STATUS "With OpenGL ES: ${FSO_BUILD_WITH_OPENGL_ES}")
message(STATUS "With Vulkan: ${FSO_BUILD_WITH_VULKAN}")
message(STATUS "With OpenXR: ${FSO_BUILD_WITH_OPENXR}")
3 changes: 2 additions & 1 deletion code/cfile/cfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ cf_pathtype Pathtypes[CF_MAX_PATH_TYPES] = {
{ CF_TYPE_MOVIES, "data" DIR_SEPARATOR_STR "movies", ".mve .msb .ogg .mp4 .srt .webm .png",CF_TYPE_DATA },
{ CF_TYPE_INTERFACE, "data" DIR_SEPARATOR_STR "interface", ".pcx .ani .dds .tga .eff .png .jpg .rml .rcss", CF_TYPE_DATA },
{ CF_TYPE_FONT, "data" DIR_SEPARATOR_STR "fonts", ".vf .ttf .otf", CF_TYPE_DATA },
{ CF_TYPE_EFFECTS, "data" DIR_SEPARATOR_STR "effects", ".ani .eff .pcx .neb .tga .jpg .png .dds .sdr", CF_TYPE_DATA },
{ CF_TYPE_EFFECTS, "data" DIR_SEPARATOR_STR "effects", ".ani .eff .pcx .neb .tga .jpg .png .dds .sdr .vert .frag .glsl", CF_TYPE_DATA },
{ CF_TYPE_HUD, "data" DIR_SEPARATOR_STR "hud", ".pcx .ani .eff .tga .jpg .png .dds", CF_TYPE_DATA },
{ CF_TYPE_PLAYERS, "data" DIR_SEPARATOR_STR "players", ".hcf", /* DON'T add pilot files here!! */ CF_TYPE_DATA },
{ CF_TYPE_PLAYER_IMAGES, "data" DIR_SEPARATOR_STR "players" DIR_SEPARATOR_STR "images", ".pcx .png .dds", CF_TYPE_PLAYERS },
Expand Down Expand Up @@ -186,6 +186,7 @@ int cfile_init(const char *exe_dir, const char *cdrom_dir)
char buf[CFILE_ROOT_DIRECTORY_LEN];

strncpy(buf, exe_dir, CFILE_ROOT_DIRECTORY_LEN - 1);

buf[CFILE_ROOT_DIRECTORY_LEN - 1] = '\0';

// are we in a root directory?
Expand Down
3 changes: 3 additions & 0 deletions code/ddsutils/ddsutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#include "ddsutils/ddsutils.h"
#include "cfile/cfile.h"
#include "osapi/osregistry.h"
#ifdef USE_OPENGL_ES
#include "graphics/opengl/es_compatibility.h"
#endif

#ifdef WITH_OPENGL
#include <glad/glad.h>
Expand Down
3 changes: 3 additions & 0 deletions code/globalincs/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ SCP_string get_version_string()
switch (gr_screen.mode) {
case GR_OPENGL:
str += " OpenGL";
#ifdef USE_OPENGL_ES
str += " ES";
#endif
break;
case GR_VULKAN:
str += " Vulkan";
Expand Down
8 changes: 8 additions & 0 deletions code/graphics/2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,11 @@ void removeResolutionVROption()
options::OptionsManager::instance()->removeOption(ResolutionVROption);
}

#ifndef USE_OPENGL_ES
bool Gr_enable_soft_particles = true;
#else
bool Gr_enable_soft_particles = false;
#endif

static void parse_soft_particle_func() {
bool value;
Expand Down Expand Up @@ -697,7 +701,11 @@ static void parse_post_processing_func()
Gr_post_processing_enabled = value;
}

#ifndef USE_OPENGL_ES
bool Gr_post_processing_enabled = true;
#else
bool Gr_post_processing_enabled = false;
#endif

static auto PostProcessOption __UNUSED = options::OptionBuilder<bool>("Graphics.PostProcessing",
std::pair<const char*, int>{"Post processing", 1726},
Expand Down
Loading
Loading