Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
3697ee0
Initial build
Shivansps Aug 23, 2025
e9b44a7
fix test errors
Shivansps Aug 23, 2025
c6bf16b
Fix test errors
Shivansps Aug 23, 2025
f35b4b5
add FSO_BUILD_WITH_OPENGL_ES flag
Shivansps Aug 24, 2025
4a991cd
add GLAD_ES loader
Shivansps Aug 24, 2025
efb1c4c
Implement basic es compatibility header
Shivansps Aug 25, 2025
ae09d7a
re-add accidentally deleted break
Shivansps Aug 25, 2025
92cd750
Add GLES BC7 extension to glad and improve extension support report
Shivansps Aug 26, 2025
6059d9f
fix some enum mappings
Shivansps Aug 26, 2025
e205a63
Use the ARB name for geo shader check
Shivansps Aug 26, 2025
4288a1f
Add es espand shader includes
Shivansps Aug 26, 2025
ea1dfff
Fix glbufferstorage mapping
Shivansps Aug 26, 2025
e5371e6
fix some gl errors on opengl es
Shivansps Aug 27, 2025
ce4c2ee
Enable GL_CLIP_DISTANCE
Shivansps Aug 28, 2025
ee36520
Add format conversions
Shivansps Aug 28, 2025
499bb2d
add bgba 8888 to rgba 8888 converter
Shivansps Aug 29, 2025
c052d98
disable GLAD_GL_ARB_timer_query
Shivansps Aug 30, 2025
6e3a16e
revert variable order change in glpolygonmode
Shivansps Aug 30, 2025
62027a5
Properly handle wgl + opengl es on windows
Shivansps Aug 30, 2025
aa3cf99
Clean up cmake build files
Shivansps Aug 30, 2025
f225dfb
add GL_BGR to GL_RGBA conversion
Shivansps Aug 31, 2025
3cbec62
add SDL hint to start in landscape mode on android
Shivansps Aug 31, 2025
65eaf95
inform opengl es on menu
Shivansps Sep 1, 2025
124edc7
Add working_folder cmdline arg to set the working folder on android
Shivansps Sep 2, 2025
214d65a
small corrections to the es header
Shivansps Sep 4, 2025
dc63e6f
Support Android TTS
Shivansps Sep 4, 2025
a63452a
Determine max texture size on DDS software decompression based on ram
Shivansps Sep 4, 2025
630cb71
small refactor of glTexSubImage3D
Shivansps Sep 5, 2025
b351a49
remove expandincludes, existing code already did that better
Shivansps Sep 6, 2025
d2520e0
change default graphic values for opengl es
Shivansps Sep 6, 2025
36eabde
compile imgui with opengl es 3 on linux
Shivansps Sep 6, 2025
9073a25
allow qtfred to run on opengl es
Shivansps Sep 8, 2025
a7f8067
improve es compatibility header and remove shader precision quantific…
Shivansps Sep 13, 2025
1197a19
add compiler hints
Shivansps Sep 17, 2025
f06070e
Initial KTX1/ETC2 support
Shivansps Sep 17, 2025
5314957
Conditional glad include
Shivansps Sep 17, 2025
b53a995
remove unused function
Shivansps Sep 17, 2025
7f427b8
define glenum for non opengl build
Shivansps Sep 18, 2025
69a65c8
remove unused param
Shivansps Sep 18, 2025
589131b
fix qtbuild
Shivansps Sep 18, 2025
b91bcca
change ktx format to enum
Shivansps Sep 18, 2025
8577323
use nullptr
Shivansps Sep 18, 2025
42b66db
remove unused structs
Shivansps Sep 18, 2025
ca6b8a7
ktx: support the same etc2 formats available in amd compressonator
Shivansps Sep 20, 2025
d334231
android tts: determine jni company/appname in runtime
Shivansps Sep 24, 2025
369f772
Fix imgui crashing on windows with gles, use angle lib
Shivansps Sep 24, 2025
6c2a9e5
Do not use MSAA under OpenGL ES, at least for now
Shivansps Oct 23, 2025
41840fa
revert color_attachment_4/5 fbo workarounds
Shivansps Dec 10, 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
42 changes: 34 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ endif()

PROJECT(FS2_Open LANGUAGES ${FSO_LANGUAGES})

if (ANDROID)
message(STATUS "Building for Android (NDK)")
add_definitions(-DPLATFORM_ANDROID)
set(FSO_BUILD_INCLUDED_LIBS ON FORCE)
set(USING_PREBUILT_LIBS ON FORCE)
set(FSO_BUILD_WITH_OPENGL_ES ON)
set(SDL2_USE_PRECOMPILED ON FORCE)
set(OPENAL_USE_PRECOMPILED ON FORCE)
endif()

# Check if the external modules exists
IF(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/external/rpavlik-cmake-modules/launcher-templates")
message(FATAL_ERROR "External submodules could not be found. Please make sure you have updated your submodules.")
Expand Down Expand Up @@ -74,9 +84,9 @@ IF(RESET_INSTALL_PREFIX)
ENDIF(NOT $ENV{FS2PATH} STREQUAL "")
ENDIF(RESET_INSTALL_PREFIX)

IF(WIN32 OR APPLE)
IF(WIN32 OR APPLE OR ANDROID)
OPTION(FSO_USE_SPEECH "Use text-to-speach libraries" ON)
ENDIF(WIN32 OR APPLE)
ENDIF(WIN32 OR APPLE OR ANDROID)

IF (WIN32)
OPTION(FSO_USE_VOICEREC "Enable voice recognition support" ON)
Expand All @@ -94,8 +104,8 @@ OPTION(FSO_DEVELOPMENT_MODE "Generate binaries in development mode, only use if

OPTION(FSO_BUILD_QTFRED "Build qtFRED2 binary" OFF)

IF(WIN32 OR APPLE)
# On windows and mac the default should be to always build the included libraries
IF(WIN32 OR APPLE OR ANDROID)
# On windows, mac and android the default should be to always build the included libraries
SET(FSO_BUILD_INCLUDED_LIBS_DEFAULT ON)
ELSE()
SET(FSO_BUILD_INCLUDED_LIBS_DEFAULT OFF)
Expand Down Expand Up @@ -125,17 +135,31 @@ 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 path instead of core (for testing 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 ANDROID AND NOT FSO_BUILD_WITH_OPENGL_ES)
SET(OPENXR_BUILD_DEFAULT ON)
ELSE()
SET(OPENXR_BUILD_DEFAULT OFF)
ENDIF()
OPTION(FSO_BUILD_WITH_OPENXR "Build with OpenXR support" ${OPENXR_BUILD_DEFAULT})
IF(FSO_BUILD_WITH_OPENXR AND APPLE)
MESSAGE(WARNING "FSO_BUILD_WITH_OPENXR is ON. Not supported on macOS - setting to OFF.")
IF(FSO_BUILD_WITH_OPENXR AND (APPLE OR ANDROID))
MESSAGE(WARNING "FSO_BUILD_WITH_OPENXR is ON. Not supported on macOS/Android - setting to OFF.")
SET(FSO_BUILD_WITH_OPENXR OFF CACHE BOOL "" FORCE)
ENDIF()

Expand All @@ -156,6 +180,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 @@ -226,7 +251,7 @@ include(package)
include(doxygen)

# Print used options to log
IF(WIN32 OR APPLE)
IF(WIN32 OR APPLE OR ANDROID)
message(STATUS "Using text to speech: ${FSO_USE_SPEECH}")
ENDIF()
IF (WIN32)
Expand All @@ -242,5 +267,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}")
4 changes: 2 additions & 2 deletions cmake/finder/FindSpeech.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ if (WIN32)
if (NOT HAVE_SAPI_H)
message(SEND_ERROR "sapi.h could not be found on your platform. Please disable speech support.")
endif()
elseif(APPLE)
# it should just work
elseif(APPLE OR ANDROID)
# it should just work (TM)
else()
message(SEND_ERROR "Text to Speech is not supported on this platform!")
endif()
Expand Down
19 changes: 10 additions & 9 deletions code/bmpman/bm_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct bitmap_entry {
// Stuff to keep track of usage
ubyte preloaded; //!< If set, then this was loaded from the lst file
int preload_count; //!< how many times this gets used in game, for unlocking
ushort used_flags; //!< What flags it was accessed thru
uint used_flags; //!< What flags it was accessed thru
int load_count;

bitmap bm; //!< Bitmap info
Expand All @@ -93,14 +93,15 @@ struct bitmap_slot {
};

// image specific lock functions
void bm_lock_ani( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, ushort flags );
void bm_lock_dds( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, ushort flags );
void bm_lock_png( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, ushort flags );
void bm_lock_apng( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, ushort flags );
void bm_lock_jpg( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, ushort flags );
void bm_lock_pcx( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, ushort flags );
void bm_lock_tga( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, ushort flags );
void bm_lock_user( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, ushort flags, bool convert = true );
void bm_lock_ani( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, uint flags );
void bm_lock_dds( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, uint flags );
void bm_lock_png( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, uint flags );
void bm_lock_apng( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, uint flags );
void bm_lock_jpg( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, uint flags );
void bm_lock_pcx( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, uint flags );
void bm_lock_tga( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, uint flags );
void bm_lock_user( int handle, bitmap_slot *bs, bitmap *bmp, int bpp, uint flags, bool convert = true );
void bm_lock_ktx1(int handle, bitmap_slot* bs, bitmap* bmp, int bpp, uint flags);

const size_t BM_BLOCK_SIZE = 4096;

Expand Down
Loading
Loading